Fifteen & the Parity Dial

The classic sliding puzzle with its algebra running alongside: every slide is a transposition, the dials track the two parities that always flip together, and a small lab builds loops, inverses, and commutators.

What the dial is measuring

Positions as permutations. Label the squares 1 to 16, with 16 the gap's home in the lower right. A position is the permutation σ of the 16 symbols that says which tile sits on each square. A slide swaps the gap with a neighbor, so it multiplies σ by one transposition.

The invariant. Color the squares like a checkerboard. Every slide flips the sign of σ and moves the gap to the other color. So sign(σ) × (−1)d, where d is the gap's taxicab distance from home, never changes. It is +1 at the start, so it is +1 at every position you can reach.

Loyd's challenge. Sam Loyd's famous prize asked for the solved board with 14 and 15 swapped. That position has an odd σ with the gap at home, so the dial reads −1 and no sequence of slides reaches it. Pry two tiles is the only way across: a swap that is not a slide flips just one needle.

The converse. Every position with invariant +1 can be solved. With the gap at home, the reachable arrangements of tiles are exactly the even permutations of 15 things, the alternating group A₁₅, which has 15!/2 ≈ 6.5 × 10¹¹ elements.

Loops and 3-cycles. Sending the gap once around a 2×2 block is the preloaded loop A. It moves exactly three tiles, a 3-cycle. 3-cycles generate A₁₅, which is why the puzzle can always be finished. The same idea powers Rubik's cube solving.

Commutators. [A,B] = A B A⁻¹ B⁻¹ undoes everything A and B do separately and keeps only their interaction. When two loops share little, their commutator moves few tiles. That is the discrete version of the Lie bracket.

Controls. Click a tile in the gap's row or column to slide it (and any tiles between). Arrow keys slide the tile next to the gap in that direction. U undoes a slide.