When is the 8 puzzle solvable?

114 Views Asked by At

I'm struggling to find the solution to this eight puzzle:

1 0 2
3 4 5
6 7 8

When I expressed it as a permutation with the cycle notation, I got (23456780) The signature of this permutation is (-1)^(8-1)=-1 so it is odd. Therefore I concluded this was unsolvable. However, the solution of my exercise doesn't say so, and when I checked it on simulators the puzzle was solvable as well. Nonetheless, I still don't know why. Does any one know why this puzzle is solvable?

1

There are 1 best solutions below

0
On

Solution for this particular puzzle: (pardon the poor image quality, but had to get it to fit within filesize restrictions)

enter image description here

In terms of a written sequence of moves, using notation of what square to press for each move... the sequence I used to solve this would be: $3,6,5,4,1,2,5,6,3,2,1,4,5,6,9,8,7,4,5,8,9,6,5,4,7,8,9$

Your error is the same as in the linked duplicate. The taxicab distance of the empty square to the bottom right must also be taken into account, which in this case is $3$, pushing your parity from $(-1)^{8-1}$ to $(-1)^{8-1+3}$ which does mean that your puzzle is even parity and solveable.