\begin{tikzpicture}[scale=0.70,auto]
\path[edge] (1,0) node at ++(0,-0.5) {$w_0$} -- (1,12) node at ++(0,.5) {$u_0$};
\path[edge] (2,0) node at ++(0,-0.5) {$w_1$} -- (2,12) node at ++(0,.5) {$u_1$};
\path[edge] (3,0) node at ++(0,-0.5) {$w_2$} -- (3,12) node at ++(0,.5) {$u_2$};
\path[edge] (4,0) node at ++(0,-0.5) {$w_3$} -- (4,12) node at ++(0,.5) {$u_3$};
\path[edge] (5,0) node at ++(0,-0.5) {$w_4$} -- (5,12) node at ++(0,.5) {$v_0$};
\path[edge] (6,0) node at ++(0,-0.5) {$w_5$} -- (6,12) node at ++(0,.5) {$v_1$};
\path[edge] (7,0) node at ++(0,-0.5) {$w_6$} -- (7,12) node at ++(0,.5) {$v_2$};
\path[edge] (8,0) node at ++(0,-0.5) {$w_7$} -- (8,12) node at ++(0,.5) {$v_3$};

\path[red box] (0.75,9) -- (4.25,9) -- (4.25,11) -- cycle;
\path[blue box] (4.75,9) -- (8.25,9) -- (4.75,11) -- cycle;

\node[vertex] (v0) at (1,8) {};
\node[vertex] (v4) at (5,8) {};
\path[comp] (v0) -- (v4);

\node[vertex] (v1) at (2,7.667) {};
\node[vertex] (v5) at (6,7.667) {};
\path[comp] (v1) -- (v5);

\node[vertex] (v2) at (3,7.333) {};
\node[vertex] (v6) at (7,7.333) {};
\path[comp] (v2) -- (v6);

\node[vertex] (v3) at (4,7) {};
\node[vertex] (v7) at (8,7) {};
\path[comp] (v3) -- (v7);

\path[red box] (0.75,4) -- (2.4,4) -- (2.4,4.95) -- cycle;
\path[blue box] (2.6,4) -- (4.25,4) -- (2.6,4.95) -- cycle;

\path[blue box] (4.75,4) -- (6.4,4) -- (6.4,5.05) -- (4.75,6) -- cycle;
\path[red box] (6.6,4) -- (8.25,4) -- (8.25,6) -- (6.6,5.05) -- cycle;

\draw[fill=white] (0.75,1) rectangle (4.25,3);
\node at (2.5,2) {\small $\bm{\frac{n}{2}}$};

\draw[fill=white] (4.75,1) rectangle (8.25,3);
\node at (6.5,2) {\small $\bm{\frac{n}{2}}$};

\end{tikzpicture}
