[Math] Rigorous proof to show that the $15$-Puzzle problem is unsolvable

discrete mathematicsinvarianceproof-writingpuzzlerecreational-mathematics

So this is supposedly a very popular puzzle by Sam Loyd. (I don't want answerers to provide solutions directly from some website etc. I mean, an ingenious solution is more welcome please.)

enter image description here

Now, as you see all numbers are arranged in ascending order except the last two. The rule of the game is to move a numbered block which is adjacent to the blank space and create another blank place in its original position (I mean, you just shift the position of blank space around by sliding the numbers around) .

Now the question goes as, can you arrange all the numbers in the correct ascending order? (The final outcome would be just interchange the positions of $15$ and $14$).

I know of a solution using a very clever trick of invariance (the invariant seemed quite non-trivial to me ;-P). Can others here come up with some interesting solutions?

Best Answer

This can be shown using some elementary abstract algebra.

In short, a puzzle configuration is not solvable if and only if it's an odd number of swaps away from the solved state, like the one in your image is (14 and 15 swapped = 1 swap). I used this fact a few years ago to quickly generate random configurations for a 15-puzzle app I used to have in the App Store.

Reference: https://kconrad.math.uconn.edu/blurbs/grouptheory/15puzzle.pdf

Related Question