On this page
In 1880 the 15 puzzle was a craze across the United States, according to Wikipedia's article on the 15 puzzle: fifteen numbered tiles and one gap in a 4 by 4 tray, slid until they read 1 to 15 in order. One position became famous because nobody could solve it: everything in place except 14 and 15, swapped. The reason is a short idea about permutations called parity.
What makes a permutation odd or even?
A permutation is a rearrangement of objects. A transposition swaps exactly two of them. By the standard definition on Wikipedia's page on the parity of a permutation, a permutation is even if it can be built from an even number of transpositions and odd if it needs an odd number.
A second definition is easier on paper. Write the arrangement as a list and count inversions: pairs where a bigger number comes before a smaller one. The parity is the parity of that count, and the same page shows the two definitions agree.
The list 1, 2, 3, 4 has 0 inversions, so it is even.
The list 2, 1, 3, 4 has 1 inversion (2 before 1), so it is odd.
Why can't a permutation be both odd and even?
Many different chains of swaps reach the same arrangement. Why can't one chain be 4 swaps long and another 7?
Inversions settle it. Swap two neighbours in the list and exactly one pair changes order, so the inversion count goes up or down by 1. Swapping entries that sit k places apart takes 2k minus 1 neighbour swaps (walk one entry across, then the other back), and 2k minus 1 is always odd. So every transposition flips the parity of the inversion count. Starting from 0 inversions, the number of swaps always has the same parity as the final count, so no arrangement can be both. This is why the sign of a permutation is well defined.
Why is the 15 puzzle with 14 and 15 swapped impossible?
Colour the 16 squares like a chessboard. Now treat the blank as a sixteenth piece.
Every slide swaps the blank with one tile: one transposition of the 16 pieces.
Every slide moves the blank to the other colour.
To end in the bottom-right corner again, the blank needs an even number of slides.
An even number of transpositions gives an even permutation, so with the blank home, the 15 tiles are rearranged evenly.
Swapping only 14 and 15 is one transposition, which is odd. No sequence of slides produces it.
This was proved in print in 1879, in "Notes on the '15' Puzzle" in the American Journal of Mathematics. As MathWorld's entry on the 15 puzzle summarises, W. W. Johnson showed that odd arrangements cannot be reached and William E. Story showed that every even one can. So, as Wikipedia puts it, half of all positions are unsolvable.
Did Sam Loyd really offer a prize for it?
The puzzlemaker Sam Loyd offered a $1,000 prize for solving the swapped 14-15 position, according to Wikipedia's history of the puzzle. The money was safe, because the task is impossible. Loyd first claimed in 1891 that he had invented the puzzle, but MathWorld reports that research by Jerry Slocum and Dic Sonneveld (2006) showed he did not, and names Noyes Chapman, the postmaster of Canastota, New York, as the actual inventor. Others offered rewards early: JSTOR Daily reports that in January 1880 Charles Pevey, a Massachusetts dentist, offered Worcester Evening Gazette readers a set of teeth for solving the same position.
How do you check whether any 15 puzzle is solvable?
MathWorld gives a test you can do on paper: a position is solvable exactly when N + e is even.
Read the tiles row by row from the top, skipping the blank.
Count N, the number of inversions in that list.
Note e, the row the blank is in, counting 1 to 4 from the top.
If N + e is even, the puzzle can be solved. If it is odd, it cannot.
Worked examples:
14 and 15 swapped, blank bottom right: N = 1 and e = 4, so N + e = 5, which is odd. Impossible.
All tiles reversed (15 down to 1), blank bottom right: N = 15 × 14 ÷ 2 = 105 and e = 4, so N + e = 109, odd. Impossible.
Blank top left, tiles 1 to 15 in reading order: N = 0 and e = 1, odd. Impossible, though it looks almost solved.
Why does it work? A sideways slide leaves the reading order unchanged. A vertical slide moves one tile past three others, changing N by an odd number while e changes by 1, so N + e keeps its parity.
For more counting arguments, read Burnside's lemma for counting necklaces, counting with a bijection and the maths behind Sudoku. To revisit permutations from the ground up, the Fermi Concept Library gives every concept in mathematics its own lesson. For practice, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer.



