LOGIC & PUZZLES / STRATEGY
Invariants:
what cannot change?
When the moves look complicated, search for a property that every legal move preserves.
THE MAIN IDEA
A conserved feature can rule out every possible route.
An invariant is a quantity or property that remains unchanged under a defined set of allowed moves. In a puzzle, the final arrangement may look hard to construct, but showing that it cannot be reached can be much easier if you track something no move can alter. Parity is a common example. If a move changes a number by two, its odd-or-even status remains fixed. On a checkerboard, a piece that always moves from a dark square to a light square changes color each move; a sequence's length may then be constrained by the starting and ending colors. More subtle puzzles can preserve a total sum, a difference between two counts, or a set of residues modulo a number. The important part is proving preservation for every legal move, not noticing that a few examples happen to share the property. First describe a puzzle state in a way that can be measured. Next analyze one arbitrary legal move and calculate how the chosen quantity changes. If it never changes, it is an invariant. Compare the starting state's invariant with the requested goal. If the goal has a different value, no sequence of allowed moves can get there. This is an impossibility proof; it does not provide a recipe for solving reachable cases. A good invariant is often hidden by a complicated surface. Color alternating squares, label objects with numbers, or group positions into pairs to reveal a simpler account of the state. However, one invariant may be too weak: two different arrangements can share the same parity while only one is reachable. Satisfying a necessary condition does not prove a solution exists. You may need several invariants, a constructive sequence of moves, or a separate search to establish reachability. Computer simulation can test conjectures on small boards but does not replace a proof for all board sizes. State the rules precisely before making either claim. “A tile moves like a knight” defines several possible moves; “only tiles on marked squares may move” changes what is preserved. Invariants make puzzle reasoning efficient because they shift attention from every individual move to one durable feature of all moves together.
TRY THIS
Color a board before moving anything.
On a drawn grid, color squares alternately. Choose a proposed piece movement and count how many times it switches colors. Then ask which starting and ending colors are possible after a given number of moves. A pattern of alternating colors may expose an impossible endpoint before any search.