diff --git a/ex06/crossSwitchPlot.png b/ex06/crossSwitchPlot.png new file mode 100644 index 0000000..2dab5e5 --- /dev/null +++ b/ex06/crossSwitchPlot.png Binary files differ diff --git a/ex06/kn06.pdf b/ex06/kn06.pdf index 4ce2993..1481f15 100644 --- a/ex06/kn06.pdf +++ b/ex06/kn06.pdf Binary files differ diff --git a/ex06/kn06.tex b/ex06/kn06.tex index e31bba1..3b29deb 100644 --- a/ex06/kn06.tex +++ b/ex06/kn06.tex @@ -120,12 +120,15 @@ \begin{enumerate} \item There are $10^{2i}$ crosspoints (in $\times$ out) \item At maximum there are $10^i$ crosspoints active simultaneously ($\min$(in,out)) - \item %TODO + \item $C_N$ has the double slope of $X_N$, the ratio has a negative slope since $C_N$ is growing faster than $X_N$. The ratio describes kind of the efficiency of the switch, we see that it decreases for a large number of connections.\\ + \includegraphics[width=.5\textwidth]{crossSwitchPlot.png} \item $n$ for minimal number of crosspoints: $\left\lceil \sqrt{\frac{10^i}{2}}\right\rceil=3,8,23,71,224$\\ $k\geq 2n-1$ : $k=5,15,45,141,447$ \item We use the minimal number of crosspoints above:\\ $C_{N,opt}=\frac{N}{n}\cdot n\cdot k + k\cdot \frac{N}{n}\cdot\frac{N}{n}+ \frac{N}{n}\cdot k\cdot n\\ =153,5337,175043,5617042,178486160$ - \item %TODO + \item The optimal number of crosspoints for large N is lower than the number of crosspoints in the crossswitch. For small $N$ vice versa.\\ + $C_{N,opt}$ is numerically not stable because of the ceiling function for $n$.\\ + \includegraphics[width=.5\textwidth]{multiStageSwitchPlot.png} \end{enumerate} \end{document} diff --git a/ex06/multiStageSwitchPlot.png b/ex06/multiStageSwitchPlot.png new file mode 100644 index 0000000..b456485 --- /dev/null +++ b/ex06/multiStageSwitchPlot.png Binary files differ diff --git a/ex06/plots.py b/ex06/plots.py new file mode 100755 index 0000000..5341289 --- /dev/null +++ b/ex06/plots.py @@ -0,0 +1,37 @@ +#!/usr/bin/python +import matplotlib.pyplot as plt +import numpy as np + +def copt(N): + n=np.ceil(np.sqrt(N/2.)) + k=2*n-1 + return 2*N*k + k*(N*1./n)**2 + + +fig = plt.figure() +ax = fig.add_subplot(1,1,1) +N=np.arange(1,10**5,1) +ax.plot(N, N**2,label="C_N") +ax.plot(N,N,label="X_N") +ax.plot(N,1./N,label="X_N/C_N") +ax.set_xscale('log') +ax.set_yscale('log') +#ax.axis((1,10**5,1/100.,10**10)) +ax.legend() +fig.show() + +raw_input('press return to continue') + +fig = plt.figure() +ax = fig.add_subplot(1,1,1) +N=np.arange(1,10**5,1) +ax.plot(N, N**2,label="C_N") +ax.plot(N,copt(N),label="C_N,opt") +ax.plot(N,N**2*1./copt(N),label="C_N/C_N,opt") +ax.set_xscale('log') +ax.set_yscale('log') +#ax.axis((1,10**5,1/100.,10**10)) +ax.legend() +fig.show() + +raw_input('press return to continue')