\begin{tikzpicture} \tikzstyle{prob}=[minimum width=0.4em, fill=blue!15,inner sep=0pt] \node[draw,fill=red!20,inner sep=0pt,minimum width=3em,minimum height=5em](key) at (0,0){}; \draw[] ([yshift=0.5em]key.180) -- ([yshift=0.5em]key.0); \draw[] ([yshift=1.5em]key.180) -- ([yshift=1.5em]key.0); \draw[] ([yshift=-0.5em]key.180) -- ([yshift=-0.5em]key.0); \draw[] ([yshift=-1.5em]key.180) -- ([yshift=-1.5em]key.0); \node[draw,fill=blue!20,inner sep=0pt,minimum width=3em,minimum height=5em](value) at (3em,0){}; \draw[] ([yshift=0.5em]value.180) -- ([yshift=0.5em]value.0); \draw[] ([yshift=1.5em]value.180) -- ([yshift=1.5em]value.0); \draw[] ([yshift=-0.5em]value.180) -- ([yshift=-0.5em]value.0); \draw[] ([yshift=-1.5em]value.180) -- ([yshift=-1.5em]value.0); \node[anchor=south,font=\footnotesize,inner sep=0pt] at ([yshift=0.1em]key.north){key}; \node[anchor=south,font=\footnotesize,inner sep=0pt] at ([yshift=0.2em]value.north){value}; \node[anchor=south,font=\footnotesize,inner sep=0pt] (cache)at ([yshift=2em,xshift=1.5em]key.north){\small\bfnew{Cache}}; \node[draw,anchor=east,minimum size=2.4em] (dt) at ([yshift=1.4em,xshift=-4em]key.west){$\mathbi{d}_\mathbi{t}$}; \node[draw,anchor=east,minimum size=2.4em] (st) at ([xshift=-4em]dt.west){$\mathbi{s}_\mathbi{t}$}; \node[draw,anchor=east,minimum size=2.4em] (st2) at ([xshift=-0.8em,yshift=4em]dt.west){$ \widetilde{\mathbi{s}}_\mathbi{t}$}; \node[draw,anchor=north,circle,inner sep=0pt, minimum size=1.2em,fill=yellow] (add) at ([yshift=-1em]st2.south){+}; \node[anchor=north,inner sep=0pt,font=\footnotesize,text=red] at ([yshift=-1em]add.south){combining}; \node[draw,anchor=east,minimum size=2.4em] (ct) at ([xshift=-3em,yshift=-3.5em]st.west){$ \widetilde{\mathbi{C}}_\mathbi{t}$}; \node[anchor=east] (y) at ([xshift=-6em,yshift=1em]st.west){$\mathbi{y}_{\mathbi{t}-\mathbi{1}}$}; \node[draw,anchor=east,minimum width=8em,minimum height=1.6em,fill=blue!20] (output) at ([xshift=-2.6em,yshift=2.6em]st2.west){}; \node[anchor=south] (yt) at ([yshift=5em]output.north){$\mathbi{y}_{\mathbi{t}}$}; \draw[] ([xshift=-0.8em]output.90) -- ([xshift=-0.8em]output.-90); \draw[] ([xshift=-2.4em]output.90) -- ([xshift=-2.4em]output.-90); \draw[] ([xshift=0.8em]output.90) -- ([xshift=0.8em]output.-90); \draw[] ([xshift=2.4em]output.90) -- ([xshift=2.4em]output.-90); \foreach \x/\y in {1/2,2/1,3/5,4/1,5/1,6/1,7/3,8/4,9/2,10/3,11/5,12/5,13/2,14/5,15/5,16/5,17/13,18/2,19/4,20/1} \node[draw=blue!20,anchor=south,prob,minimum height=0.2em*\y] at ([yshift=1em,xshift=-4.2em+0.4em*\x]output.north){}; \begin{pgfonlayer}{background} \node[inner sep=3pt,draw,dotted,rounded corners=2pt,very thick][fit=(key)(value)(cache)](box){}; \end{pgfonlayer} \draw[-latex,dashed,very thick,out=-145,in=10] ([yshift=1.6em]box.180) to node[above,font=\footnotesize,text=red,rotate=25]{reading}(dt.0); \draw[-latex,dashed,very thick,out=-5,in=-170] (ct.0) to node[above,font=\footnotesize,text=red,pos=0.7,rotate=8]{matching}([yshift=-2.5em]box.180); \draw[-,very thick,out=0,in=-135](st.0) to (add.-135); \draw[-,very thick,out=180,in=-45](dt.180) to (add.-45); \draw[-latex,very thick] (add.90) -- (st2.-90); \draw[-latex,very thick,out=100,in=-100] (ct.90) to (output.-90); \draw[-latex,very thick,out=180,in=-100] (st2.180) to (output.-90); \draw[-latex,very thick,out=80,in=-100] (y.90) to (output.-90); \draw[-latex,very thick] (output.90) -- ([yshift=1em]output.90); \draw[-latex,very thick] ([yshift=-1em]yt.-90) -- (yt.-90); \end{tikzpicture}