I want to draw a network like this using tikz.
I tried to draw it using Matrix but it needs some modifications! My code:
\begin{figure}
\fbox{
\begin{tikzpicture}[
inner/.style={circle,draw=black!50,fill=white!20,thick,inner sep=5pt},
outer/.style={ column sep=1cm, row sep=1cm},
innerbox/.style={fill=white!20,thick,innerbox},
outerbox/.style={rectangle,draw=white,fill=white!20,thick,innerbox },
outerT/.style={rectangle,draw=white,fill=white!20,thick,inner sep=10pt, column sep=1cm, row sep=1cm},
]
\matrix (A) [matrix of nodes, outer, nodes={inner} ]{
0 \\
};
\matrix (B) [matrix of nodes, outer, nodes={inner}, right=of A]{
0 \\
1 \\
2\\
\vdots\\
n-1\\
n\\
};
\matrix (X) [matrix of nodes, outer, nodes={inner}, right=of B]{
$\cdots$\\
$\cdots$\\
$\cdots$\\
$\cdots$\\
$\cdots$\\
};
\matrix (C) [matrix of nodes, outer, nodes={inner}, right=of X]{
0 \\
1 \\
2\\
\vdots\\
n-1\\
n\\
};
\matrix (D) [matrix of nodes, outer, nodes={inner}, right=of C]{
0 \\
1 \\
2\\
\vdots\\
n-1\\
n\\
};
\matrix (E) [matrix of nodes, outer, nodes={inner}, right=of D]{
1 \\
2\\
\vdots\\
n-1\\
n\\
};
\draw[black, thick] (A-1-1)--(B-2-1);
\draw[black, thick] (A-1-1)--(B-3-1);
\draw[black, thick] (A-1-1)--(B-5-1);
\draw[black, thick] (A-1-1)--(B-6-1);
\draw[black, thick] (B-1-1)--(C-2-1);
\draw[black, thick] (B-1-1)--(C-3-1);
\draw[black, thick] (B-1-1)--(C-5-1);
\draw[black, thick] (B-1-1)--(C-6-1);
\draw[black, thick] (C-1-1)--(D-2-1);
\draw[black, thick] (C-1-1)--(D-3-1);
\draw[black, thick] (C-1-1)--(D-5-1);
\draw[black, thick] (C-1-1)--(D-6-1);
\draw[black, thick] (D-1-1)--(E-1-1);
\draw[black, thick] (D-1-1)--(E-2-1);
\draw[black, thick] (D-1-1)--(E-4-1);
\draw[black, thick] (D-1-1)--(E-5-1);
\draw[black, thick] (B-2-1)--(C-3-1);
\draw[black, thick] (B-2-1)--(C-5-1);
\draw[black, thick] (B-2-1)--(C-6-1);
\draw[black, thick] (B-3-1)--(C-2-1);
\draw[black, thick] (B-3-1)--(C-5-1);
\draw[black, thick] (B-3-1)--(C-6-1);
\draw[black, thick] (B-5-1)--(C-2-1);
\draw[black, thick] (B-5-1)--(C-3-1);
\draw[black, thick] (B-5-1)--(C-6-1);
\draw[black, thick] (B-6-1)--(C-2-1);
\draw[black, thick] (B-6-1)--(C-3-1);
\draw[black, thick] (B-6-1)--(C-5-1);
\draw[black, thick] (C-2-1)--(D-3-1);
\draw[black, thick] (C-2-1)--(D-5-1);
\draw[black, thick] (C-2-1)--(D-6-1);
\draw[black, thick] (C-3-1)--(D-2-1);
\draw[black, thick] (C-3-1)--(D-5-1);
\draw[black, thick] (C-3-1)--(D-6-1);
\draw[black, thick] (C-5-1)--(D-2-1);
\draw[black, thick] (C-5-1)--(D-3-1);
\draw[black, thick] (C-5-1)--(D-6-1);
\draw[black, thick] (C-6-1)--(D-2-1);
\draw[black, thick] (C-6-1)--(D-3-1);
\draw[black, thick] (C-6-1)--(D-5-1);
\draw[black, thick] (D-1-1)--(E-1-1);
\draw[black, thick] (D-1-1)--(E-2-1);
\draw[black, thick] (D-1-1)--(E-4-1);
\draw[black, thick] (D-1-1)--(E-5-1);
\draw[black, thick] (D-2-1)--(E-2-1);
\draw[black, thick] (D-2-1)--(E-4-1);
\draw[black, thick] (D-2-1)--(E-5-1);
\draw[black, thick] (D-3-1)--(E-1-1);
\draw[black, thick] (D-3-1)--(E-4-1);
\draw[black, thick] (D-3-1)--(E-5-1);
\draw[black, thick] (D-5-1)--(E-1-1);
\draw[black, thick] (D-5-1)--(E-2-1);
\draw[black, thick] (D-5-1)--(E-5-1);
\draw[black, thick] (D-6-1)--(E-1-1);
\draw[black, thick] (D-6-1)--(E-2-1);
\draw[black, thick] (D-6-1)--(E-4-1);
\end{tikzpicture}
}
\caption{}
\label{}
\end{figure}
I appreciate any comment in advance.
This is the output of my code. So ugly!



