← All news & guides

AMO Invariants: Use Parity and Colouring to Rule Out Impossible Moves

When preparing for the American Mathematics Olympiad (AMO), students in Grades 5–12 often encounter problems that ask whether a final configuration is achievable after a sequence of allowed moves. Rather than simulating every possibility, the most efficient strategy is often to find an invariant—a property that remains unchanged no matter how the rules are applied. If the target state violates this invariant, the task is proven impossible in a single step. This article shows how two classic invariant techniques—parity and colouring—equip AMO students to eliminate dead ends before they spend precious minutes on fruitless exploration.

What Is an Invariant in AMO Problems?

An invariant is any mathematical quantity or structural property that stays constant throughout every legal move in a problem. In AMO-style puzzles, this might be the odd-or-even status of a count, the balance between two colours on a grid, or a remainder modulo some number. The power of an invariant lies in turning an open-ended search into a decisive test: compute the invariant for the start state and for the target state; if they differ, no sequence of moves can bridge the gap.

For students moving from routine calculation into the non-routine open-ended portions of the AMO paper, invariant thinking is especially valuable. The AMO structure includes multiple-choice questions followed by problems requiring written reasoning, where clear logical reasoning about impossibility strengthens a student’s response. Invariant reasoning replaces guess-and-check with structured deduction and provides a clear path to marks even when full construction is difficult. The techniques below are established competition mathematics, presented here as labelled teaching illustrations for AMO preparation.

Parity: The Odd–Even Filter

Parity—whether an integer is odd or even—is the simplest invariant to test. Many operations preserve parity: adding or subtracting an even number, doubling, or swapping two items. If a problem’s allowed moves never change the parity of a key quantity, that quantity becomes a filter.

Teaching Illustration 1: The Three-Switch Puzzle. Three light switches are all off. Each move toggles exactly two switches. Can all three ever be on?

Let the number of “on” switches be n. Initially n = 0 (even). Each move changes n by +2, −2, or 0—always an even change. Therefore the parity of n is invariant: it remains even forever. The target state n = 3 is odd, so it is unreachable. No simulation is needed.

Verification: 0 → toggle switches 1 and 2 → n = 2 (even). 2 → toggle switches 1 and 3 → n = 2 (even, since switch 1 goes off, switch 3 goes on: net change 0). 2 → toggle switches 2 and 3 → n = 0 (even). The invariant holds: only even values of n are reachable.

Parity Invariant Logic

Colouring Arguments: Balance on a Grid

When objects move on a grid or graph, a checkerboard colouring often creates an invariant. The classic model is domino tiling: each domino covers one black and one white square of a chessboard. If the numbers of black and white squares are unequal, complete tiling is impossible.

Teaching Illustration 2: The Corner-Removed Chessboard. An 8×8 chessboard has 32 black and 32 white squares. Remove two opposite corners (both the same colour, say black). The remaining board has 30 black and 32 white squares. The difference white − black = 2. Each domino covers exactly one black and one white square, so 31 dominoes would require 31 of each, giving difference 0. Since the difference 2 ≠ 0 is invariant under any tiling attempt (placing a domino never changes the difference), tiling is impossible.

Critical distinction: The invariant here is the exact difference in colour counts, not merely the difference modulo 2. A difference of 2 passes the mod-2 test (2 ≡ 0 mod 2), which would incorrectly suggest no obstruction. The exact invariant is what matters.

Worked Teaching Illustration: Token Jumps on a Number Line

This is a constructed teaching example, not an official AMO past paper.

Problem: Tokens sit at positions 1, 2, 3, 4, 5 on a number line. A move consists of choosing a token at position x and a token at position y (with y strictly between x and an empty landing point), then jumping the x-token over the y-token to land at z = 2y − x. Can the tokens ever occupy positions 1, 3, 5, 7, 8?

Step 1: Identify the parity invariant. For any jump, the moving token changes position from x to z = 2y − x. Since 2y is always even, we have z ≡ −x ≡ x (mod 2). Thus each token’s individual parity is preserved by every legal move.

Step 2: Check the initial state. Positions 1, 2, 3, 4, 5 contain parities: Odd, Even, Odd, Even, Odd. We have three odd-positioned tokens and two even-positioned tokens.

Step 3: Check the target state. Positions 1, 3, 5, 7, 8 contain parities: Odd, Odd, Odd, Odd, Even. This gives four odd-positioned tokens and one even-positioned token.

Step 4: Apply the invariant. Since individual token parity is preserved, the count of odd-positioned tokens can never change. The initial state has 3 odd positions occupied; the target requires 4. The target is impossible.

Verification of the invariant: Suppose a token at x = 1 (odd) jumps over y = 2 to land at z = 2(2) − 1 = 3 (odd). Parity preserved. A token at x = 2 (even) jumping over y = 4 lands at z = 2(4) − 2 = 6 (even). Parity preserved. The formula z = 2y − x guarantees this because 2y contributes no change to parity.

Contrasting Case: Same Parity Does Not Mean Reachable

A successful invariant check gives a necessary condition, not a sufficient one. Two states may share all simple invariants yet remain disconnected. Students must avoid the trap of assuming that matching invariants guarantee a solution exists.

Teaching Illustration 3: Verified Non-Example. Start with a single token at position 0 on a number line. Allowed move: add exactly 2 to the current position. Target: position −2.

Parity check: 0 is even; −2 is even. Parity is preserved by adding 2. So parity does not rule out the target.

However, every move increases the position by 2, so the position is always non-decreasing and always non-negative. The set of reachable positions is {0, 2, 4, 6, …}. Position −2 is never reached, despite matching parity. The additional invariant here is that positions are bounded below by 0 and monotonically increasing.

Lesson: Always ask what other constraints beyond parity might operate. In AMO problems, combining multiple invariants—parity plus monotonicity, or parity plus boundedness—often provides the complete obstruction.

Permutation Parity: Every Swap Flips

A common puzzle involves rearranging items through swaps. The key invariant is permutation parity. Every transposition—swapping any two items, whether adjacent or not—flips the parity of the permutation from even to odd or vice versa. This includes adjacent swaps, which are simply transpositions of neighbouring elements.

Teaching Illustration 4: Adjacent Swap Verified. Start with tiles in order 1, 2, 3. Swap positions 1 and 2 (adjacent): result 2, 1, 3. The permutation (1 2) is a single transposition, which is odd. Swap back: another transposition, returning to even parity. Each adjacent swap flips parity, exactly as any transposition does.

Students sometimes mistakenly believe adjacent swaps are “smaller” and preserve some structure. They do not: the parity flip is unconditional. This becomes crucial in sliding-block puzzles where only adjacent swaps are allowed.

Diagnostic Application: Test Your Understanding

Try this self-check: On a 2×3 grid, a marker starts in the top-left corner. Each move goes to an adjacent cell (sharing an edge). Can the marker visit every cell exactly once and finish in the bottom-right corner?

Answer: Colour the grid like a checkerboard. The 2×3 grid has 3 black and 3 white cells. A path visiting all 6 cells has length 5 moves, alternating colours. Starting black, the sequence is Black→White→Black→White→Black→White, ending on white. The bottom-right corner is white on standard colouring. So the target is not ruled out by this invariant. (A valid path exists: (1,1)→(2,1)→(2,2)→(1,2)→(1,3)→(2,3).) The invariant correctly fails to eliminate the target, confirming it is worth searching.

What if the target were the top-right corner? Top-right is black. The path must end on white after 5 moves. Black is impossible. The invariant provides immediate elimination.

What Your Diagnostic Result Means

If you correctly identified the checkerboard colouring and parity alternation, you are ready for AMO open-ended problems involving grid movement. If you tried to enumerate paths instead, practice identifying the colour pattern first—enumeration on larger grids is error-prone under time pressure. If you concluded impossibility incorrectly, revisit whether your invariant truly matches the move set.

Modular arithmetic is a powerful tool, but remember: a residue is invariant only if the allowed moves preserve it. Before applying any invariant, verify that your claimed invariant is actually preserved by every legal operation in the problem.

Connecting to Broader AMO Preparation

Invariant techniques complement algebraic and geometric methods across the AMO syllabus. For pattern-finding and sequence rules, see our guide on AMO Algebra, Patterns and Sequences: How to Find the Rule and Work Backwards (2026). For counting problems where invariants help avoid double-counting, refer to AMO Counting and Probability: Combinatorics, Logic and Arrangement Problems (2026). For spatial invariants in geometry, explore AMO Geometry Without Trigonometry: Angle Chasing, Area Ratios and Spatial Counting (Grades 3-10, 2026).

Colouring Argument Flow

Frequently Asked Questions

Do invariants work for all AMO problems?

No. Invariants are most effective for transformation problems where a sequence of moves is defined. They are less directly useful for pure calculation, optimisation, or data-interpretation problems. Within AMO, they appear most often in the open-ended sections for middle-primary grades and above, where logical reasoning and proof of impossibility are tested.

Is parity the same as modular arithmetic?

Parity is modular arithmetic with modulus 2 (odd or even). The same invariant logic extends to higher moduli—for example, tracking remainders modulo 3 or 4. However, a residue is invariant only if the allowed moves preserve it. AMO problems occasionally use mod-3 invariants for problems involving sums of digits or cyclic patterns, but you must verify the preservation property for each problem.

Can invariants ever prove that a solution exists?

Generally no—an invariant can only prove impossibility, not existence. However, if an invariant check fails to rule out a target, that tells you a solution may be worth searching for. The contrasting case in this article shows that even matching invariants do not guarantee reachability; additional structure may still block all paths. In competition settings, this negative information is itself valuable for time management.