This is certainly not a question with one "correct answer", but I think it's interesting and mathematical in nature. Essentially, my question is: do people know any not-well-known puzzles that are solved by means of an "interesting" invariant?
A famous puzzle by Hofstadter is the "$MU$ puzzle". The goal is to change $MI$ into $MU$ using only the following rules:
- $xI \to xIU$
- $Mx \to Mxx$
- $xIIIy \to xUy$
- $xUUy \to xy$.
It turns out that the puzzle cannot be solved: consider $f(x) =$ number of $I$s in $x$, mod $3$. Then if $f(x)$ is non-zero for a word $x$, $f(x')$ is non-zero for any $x'$ obtained by following these rules. "Whether or not $3$ divides the number of $I$s" is an invariant of the puzzle.
Another famous puzzle that can be solved using an invariant is a version of the $15$-puzzle. Suppose the first $15$ squares in a $4\times 4$ grid are filled with ascending numbers, except $14$ and $15$ are swapped: \begin{matrix} 1 & 2 & 3 & 4\\ 5 & 6 & 7 & 8\\ 9 & 10 & 11 & 12\\ 13 & 15 & 14 & \\ \end{matrix} If numbers can be slid to empty adjacent squares, can we achieve the analogous state but with $14$ and $15$ the right way around? This turns out to be impossible, by considering a parity invariant. For convenience, label the empty square with a $0$. Define $f(\text{state}) = \text{parity}(\text{labels}) + \text{parity}(\text{sum of coordinates of }0)$. Then $f$ is an invariant, since any move changes both the parity of labels, and the parity of the coordinates of $0$. Therefore achieving a state in which just $14$ and $15$ are swapped is impossible.
As mentioned, these are both well known. Google searches "puzzles solved with invariants" always seems to give the same examples. (Others include a couple of chessboard puzzles - tiling boards with dominoes, knight's move puzzles, and other numerical puzzles (similar to the $MU$ puzzle) and so on.) Do people have any less well-known examples of puzzles that are solved by invariants?
