1 \begin{tikzpicture}[scale=0.80,auto]
4 \foreach \line in {0, 1, 2, 3}
5 \path[edge,rounded corners,color=red]
6 (1+2*\line, 9.0) -- (1+2*\line, 5.5)
7 -- (1+ \line, 4.5) -- (1+ \line, 1.5)
8 -- (1+2*\line, 0.5) -- (1+2*\line,-1.0);
11 \foreach \line in {0, 1, 2, 3}
12 \path[edge,rounded corners,color=blue]
13 (2+2*\line, 9.0) -- (2+2*\line, 5.5)
14 -- (5+ \line, 4.5) -- (5+ \line, 1.5)
15 -- (2+2*\line, 0.5) -- (2+2*\line,-1.0);
18 \foreach \line in {0, 1, 2, 3}
19 \node at (1+\line,9.3) {$u_\line$};
20 \foreach \line in {0, 1, 2, 3}
21 \node at (5+\line,9.3) {$v_\line$};
22 \foreach \line in {0, ..., 7}
23 \node at (1+\line,-1.3) {$w_\line$};
25 % Left sorted list box
26 \draw[fill=white] (0.75,6) rectangle (4.25,8);
27 \path[gray box] (1,6.25) -- (4,7.75) -- (4,6.25) -- cycle;
29 % Right sorted list box
30 \draw[fill=white] (4.75,6) rectangle (8.25,8);
31 \path[gray box] (8,6.25) -- (8,7.75) -- (5,6.25) -- cycle;
34 \draw[fill=white] (0.75,2) rectangle (4.25,4);
35 \node at (2.5,3) {\small $\textrm{OEM}\left(\left\lceil\frac{n}{2}\right\rceil, \left\lceil\frac{m}{2}\right\rceil\right)$};
38 \draw[fill=white] (4.75,2) rectangle (8.25,4);
39 \node at (6.5,3) {\small $\textrm{OEM}\left(\left\lfloor\frac{n}{2}\right\rfloor, \left\lfloor\frac{m}{2}\right\rfloor\right)$};
41 \foreach \line in {0, 1, 2}
43 \path[comp,very thick] (2+2*\line,0) -- (3+2*\line,0);
44 \draw (2+2*\line,0) circle(5pt)[color=black,fill=black] {};
45 \draw (3+2*\line,0) circle(5pt)[color=black,fill=black] {};