\begin{tikzpicture}[x=1cm,y=1cm,every node/.style={font=\small}] \path[use as bounding box] (0,0) rectangle (14.7,5.7); \node[anchor=west] at (.1,5.35) {(a)}; \node at (3.75,5.35) {\(k=2,\qquad I=\{3,4\}\)}; \node[anchor=west] at (7.85,5.35) {(b)}; \node at (11.15,5.35) {The two largest weights}; \node[font=\footnotesize] at (.8,4.55) {column \(j\)}; \node[font=\footnotesize] at (.8,4.0) {\(q_j\)}; \foreach \j/\q/\c in {0/2/2,1/3/2,2/0/0,3/1/1,4/2/1}{ \node at ({1.8+.8*\j},4.55) {\(\j\)}; \node at ({1.8+.8*\j},4.0) {\(\q\)}; \node at ({1.8+.8*\j},1.55) {\(\c\)}; } \node[font=\footnotesize] at (6.35,4.0) {demand}; \foreach \i/\y in {3/3.2,4/2.45}{ \node[text=black] at (.75,\y) {\(i=\i\)}; \node at (6.35,\y) {\(3\)}; \foreach \j in {0,...,4} \draw[black!50] ({1.45+.8*\j},{\y-.32}) rectangle ++(.7,.64); } \foreach \j in {0,1,4} \fill[blue!70!black] ({1.8+.8*\j},3.2) circle (2.2pt); \foreach \j in {0,1,3} \fill[blue!70!black] ({1.8+.8*\j},2.45) circle (2.2pt); \foreach \x/\y in {4.2/3.2,5.0/2.45}{ \fill[orange!12] (\x-.34,\y-.31) rectangle ++(.68,.62); \draw[very thick,orange!85!black] (\x-.13,\y-.13)--(\x+.13,\y+.13); \draw[very thick,orange!85!black] (\x-.13,\y+.13)--(\x+.13,\y-.13); } \node[anchor=west,font=\footnotesize] at (.1,1.55) {capacity}; \node at (3.6,.82) {\(6\le 2+2+0+1+1=6\)}; \begin{scope}[shift={(8.65,1.5)}] \draw[-{Latex}] (-.45,0)--(4.2,0) node[right,font=\footnotesize] {\(i\)}; \draw[-{Latex}] (-.45,0)--(-.45,2.95); \node[above,font=\footnotesize] at (-.45,2.95) {\(w_i^{(2)}\)}; \foreach \v in {1,2,3,4}{ \draw (-.51,{.6*\v})--(-.39,{.6*\v}); \node[left,font=\footnotesize] at (-.52,{.6*\v}) {\(\v\)}; } \foreach \j/\v in {0/1,1/2,2/1,3/3,4/4}{ \ifnum\j<3 \fill[blue!55] ({.85*\j-.24},0) rectangle ({.85*\j+.24},{.6*\v}); \else \fill[orange!70] ({.85*\j-.24},0) rectangle ({.85*\j+.24},{.6*\v}); \fi \node[above,font=\footnotesize] at ({.85*\j},{.6*\v+.04}) {\(\v\)}; \node[below] at ({.85*\j},-.03) {\(\j\)}; } \end{scope} \node[text=black,font=\footnotesize] at (11.9,4.65) {\(3+4=7\)}; \node at (11.0,.82) {\(\sum_j\min(q_j,2)=7\)}; \node[font=\footnotesize] at (7.35,.2) {One unit of diagonal loss: \(\quad 6\le6\quad\Longleftrightarrow\quad7\le7\).}; \end{tikzpicture}