One possibility using TikZ:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes.multipart,positioning}
\begin{document}
\begin{tikzpicture}[my shape/.style={
rectangle split, rectangle split parts=#1,draw,
rectangle split empty part height= 1.5ex,align=center}]
% the rectangular nodes
\node[my shape=7] (rec1) {\phantom{10}};
\node[right = 15pt of rec1,my shape=2] (rec2) at (rec1.three split east) {16\nodepart{two}17};
\node[right = 15pt of rec1,my shape=2] (rec3) at (rec1.six split east) {12\nodepart{two}13};
\node[right = 4cm of rec1,my shape=7] (rec4) {\nodepart{two}17\nodepart{three}26\nodepart{four}16\nodepart{five}\nodepart{six}12\nodepart{seven}13};
\node[right = 15pt of rec3,my shape=1] (rec5) at (rec3.text east) {26};
% the numbers to the left of the rectangles
\foreach \part [count=\i from 0] in {text ,two ,three ,four ,five ,six ,seven }
{
\foreach \rect in {rec1,rec4}
\node[label=left:$\i$] at (\rect.\part west) {};
}
% the arrows
\draw[->] (rec1.three east) -- (rec2.text west);
\draw[->] (rec1.four east) -- (rec2.two west);
\draw[->] (rec1.six east) -- (rec3.text west);
\draw[->] (rec1.seven east) -- (rec3.two west);
\draw[->] (rec3.text east) -- (rec5.text west);
\end{tikzpicture}
\end{document}
