\newcommand{\hanoiInstance}{
	\begin{tikzpicture}[->,>=stealth',semithick]
		% peg a 0.0 - 3.0
		\draw (0.5,0)   rectangle node {1} (2.5,0.5);
		\draw (0.7,0.5) rectangle node {2} (2.3,1);
		\draw (0.9,1)   rectangle node {3} (2.1,1.5);
		\draw (1.1,1.5) rectangle node {4} (1.9,2);
		\draw (1.4,2)   rectangle          (1.6,2.1);
		\draw [-] (1.5,2.1) node [above] {a};
		% peg b 3.0 - 6.0
		\draw (4.4,0.0)   rectangle          (4.6,2.1);
		\draw [-] (4.5,2.1) node [above] {b};
		% peg c 6.0 - 9.0
		\draw [dashed] (6.5,0)   rectangle node {1} (8.5,0.5);
		\draw [dashed] (6.7,0.5) rectangle node {2} (8.3,1);
		\draw [dashed] (6.9,1)   rectangle node {3} (8.1,1.5);
		\draw [dashed] (7.1,1.5) rectangle node {4} (7.9,2);
		\draw (7.4,2.0) rectangle          (7.6,2.1);
		\draw [-] (7.5,2.1) node [above] {c};
	\end{tikzpicture}
}%
\newcommand{\hanoiEncoding}{
	\begin{tikzpicture}[->,>=stealth',semithick]
		% peg a 0.0 - 3.0
		\draw<6> [color=alerted] (0.1,0)   rectangle node (Top)  {1} (2.9,0.5);
		\draw<4,7>               (0.1,0)   rectangle node (Top)  {1} (2.9,0.5);
		\draw                    (1.4,0.5) rectangle node (PegA) {}  (1.6,2.1);
		\draw [-] (1.5,2.1) node [above] {a};
		% peg b 3.0 - 6.0
		\draw<4,7> [color=alerted] (3.3,0)   rectangle node (Block) {2} (5.7,0.5);
		\draw<6>                   (3.3,0)   rectangle node (Block) {2} (5.7,0.5);
		\draw                      (4.3,0.5) rectangle node         {7} (4.7,1);
		\draw                      (4.4,1)   rectangle node (PegB)  {}  (4.6,2.1);
		\draw [-] (4.5,2.1) node [above] {b};
		% peg c 6.0 - 9.0
		\draw<4> [color=alerted] (6.5,0)   rectangle node {3} (8.5,0.5);
		\draw<6,7>               (6.5,0)   rectangle node {3} (8.5,0.5);
		\draw<4> [color=alerted] (6.7,0.5) rectangle node {4} (8.3,1);
		\draw<6,7>               (6.7,0.5) rectangle node {4} (8.3,1);
		\draw<4> [color=alerted] (6.9,1)   rectangle node {5} (8.1,1.5);
		\draw<6,7>               (6.9,1)   rectangle node {5} (8.1,1.5);
		\draw                    (7.1,1.5) rectangle node {6} (7.9,2);
		\draw                    (7.4,2)   rectangle          (7.6,2.1);
		\draw [-] (7.5,2.1) node [above] {c};
		\path<6> [bend left,color=alerted]  (Top)   edge node [-,draw,cross out] {} (PegB);
		\path<7> [bend right,color=alerted] (Block) edge node [-,draw,cross out] {} (PegA);
	\end{tikzpicture}
}%