% Draw the odd lines
\foreach \line in {0, 1, 2, 3}
\path[edge,rounded corners,color=red]
- (1+2*\line, 9.0) -- (1+2*\line, 5.5)
+ (1+2*\line, 8.5) -- (1+2*\line, 5.5)
-- (1+ \line, 4.5) -- (1+ \line, 1.5)
- -- (1+2*\line, 0.5) -- (1+2*\line,-1.0);
+ -- (1+2*\line, 0.5) -- (1+2*\line,-0.7);
% Draw the even lines
\foreach \line in {0, 1, 2, 3}
\path[edge,rounded corners,color=blue]
- (2+2*\line, 9.0) -- (2+2*\line, 5.5)
+ (2+2*\line, 8.5) -- (2+2*\line, 5.5)
-- (5+ \line, 4.5) -- (5+ \line, 1.5)
- -- (2+2*\line, 0.5) -- (2+2*\line,-1.0);
+ -- (2+2*\line, 0.5) -- (2+2*\line,-0.7);
% Line labels
\foreach \line in {0, 1, 2, 3}
- \node at (1+\line,9.3) {$u_\line$};
+ \node at (1+\line,8.8) {$u_\line$};
\foreach \line in {0, 1, 2, 3}
- \node at (5+\line,9.3) {$v_\line$};
+ \node at (5+\line,8.8) {$v_\line$};
\foreach \line in {0, ..., 7}
- \node at (1+\line,-1.3) {$w_\line$};
+ \node at (1+\line,-1.0) {$w_\line$};
% Left sorted list box
-\draw[fill=white] (0.75,6) rectangle (4.25,8);
-\path[gray box] (1,6.25) -- (4,7.75) -- (4,6.25) -- cycle;
+\path[gray box] (0.75,6) -- (4.25,6) -- (4.25,8) -- cycle;
% Right sorted list box
-\draw[fill=white] (4.75,6) rectangle (8.25,8);
-\path[gray box] (8,6.25) -- (8,7.75) -- (5,6.25) -- cycle;
+\path[gray box] (4.75,6) -- (8.25,6) -- (8.25,8) -- cycle;
% Left OEM block
\draw[fill=white] (0.75,2) rectangle (4.25,4);