The $8$-Puzzle and $2$-Cycles

109 Views Asked by At

I have been studying the $8$-puzzle and have thus far managed to wrap my head around the following information:

The following illustrates the solved position of the $8$-puzzle, where $9$ is the empty tile:

$$ \begin{matrix} 1 & 2 & 3\\ 4 & 5 & 6\\ 7 & 8 & 9 \end{matrix} $$

Suppose that I have the following valid position of the $8$-puzzle:

$$ \begin{matrix} a & b & c\\ d & e & f\\ g & h & i \end{matrix} $$

If I enumerate its tiles, beginning at $1$, from left to right and from top to bottom, then applying the following permutation to it solves it:

$$ \begin{pmatrix} 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9\\ a & b & c & d & e & f & g & h & i \end{pmatrix} $$

Is decomposing this permutation into a sequence of valid $2$-cycles what I now have left to do? I deem a $2$-cycle $(p\;q)$ as valid if either $p$ or $q$ is the empty tile, and if the other tile is either vertically or horizontally adjacent to this empty tile.

Have I understood and laid this problem correctly? Thanks in advance.