Loyd–Johnson 15-puzzle parity invariant
Statement
In the sliding -puzzle, let be the number of tile inversions (pairs with such that tile appears before tile in row-major snake order) and let be the row of the blank square when reading in standard row-major order, or equivalently let be the Manhattan distance of the blank from the bottom-right corner. Then the parity is invariant under every legal slide. In particular, the configuration with tiles and swapped is insolvable.
Why is it true?
A horizontal slide leaves the row-major order of the numbered tiles completely unchanged, while a vertical slide jumps one tile past exactly other tiles in row-major order (changing the inversion count by or , always odd) and simultaneously changes the blank's row by .
Proof sketch
Step 1 (horizontal slides). When the blank slides left or right within the same row, no numbered tile changes its position in the row-major listing of the tiles, and the blank stays in row . Thus and , so is unchanged.
Step 2 (vertical slides). When the blank slides up or down, the tile moving into the blank's old square shifts by positions in the row-major sequence of the numbered tiles. Crossing each of those tiles flips whether is an inversion, changing by or per tile. The total change is , which is always odd. At the same time is also odd, so is even.
Step 3 (swapping 14 and 15). Swapping tiles and with the blank fixed at row changes by (from to ) while . Hence differs between the start state () and the solved state (), proving no sequence of legal slides can reach the solved state.
Topics that use this theorem
Step-by-step proofs
No step-by-step proof yet for this theorem.
References
- Arthur Engel (1998). Problem-Solving Strategies · DOI:10.1007/b97682
- Jessica Striker (2017). Dynamical Algebraic Combinatorics: Promotion, Rowmotion, and Resonance · DOI:10.1090/noti1539