Lesson 17: Olympiad Problem Solving
🎧 Audio narration for this lesson is coming soon.
Olympiad mathematics is problem-solving as an art form: no new theory, but elementary tools — counting, parity, inequalities, geometry — used with invention. China dominates the International Mathematical Olympiad, a tradition running from the Nine Chapters' clever problems through the 奥数 (olympiad maths) training culture. The Gaokao never asks olympiad questions directly, but olympiad training builds exactly the muscles the Gaokao's hardest 10% tests: invariants, case discipline, and the refusal to stop at the first idea. This lesson assembles the classical toolkit — invariants, colouring, the extremal principle, working backwards — with complete solutions to genuine competition-style problems.
The toolkit
Invariant: a quantity unchanged by the allowed moves. When a process repeats an operation, ask what it cannot change: a colouring count, a parity, a product, a sum modulo something. Colouring: assign colours so each move/piece has a fixed colour signature; if the board's signature differs, the task is impossible. Extremal principle: in a finite configuration, take the largest/smallest object and squeeze a contradiction or a construction from its extremality. Working backwards: from the target state, invert the moves. Small cases: compute n = 1, 2, 3 to guess the pattern, then prove it — Pólya's method, and the daily bread of Chinese olympiad training (一题多解: one problem, many solutions, is the refinement stage).
Worked examples
Worked example 1 — the mutilated chessboard (colouring invariant). An 8×8 board has two opposite corners removed. Can 31 dominoes (each covering two adjacent squares) cover the remaining 62 squares? Colour the board as a chessboard. Opposite corners have the same colour, so the mutilated board has 32 squares of one colour and 30 of the other. Every domino, wherever placed, covers exactly one black and one white square, so 31 dominoes cover 31 black and 31 white. 31 ≠ 32 and 31 ≠ 30: impossible. The area count (62 = 31 × 2) permits it; the colour invariant forbids it. Invariants see what counting cannot.
Worked example 2 — a product invariant. The numbers 1, 2, …, 10 stand on a board. Repeatedly erase two numbers a, b and write a + b + ab. After nine operations one number remains. Find it. Notice a + b + ab + 1 = (a + 1)(b + 1): so if we track P = (product of (each number + 1)), the operation replaces (a + 1)(b + 1) by (a + b + ab) + 1 = (a + 1)(b + 1) — P is invariant! Initially P = 2 × 3 × … × 11 = 11! = 39,916,800. At the end, the single number n satisfies n + 1 = 39,916,800, so n = 39,916,799. The entire process — order of operations included — is irrelevant; the invariant decides everything.
Worked example 3 — chickens and rabbits (Sunzi's classic). 35 heads, 94 legs; how many chickens and rabbits? Algebra: c + r = 35, 2c + 4r = 94 gives r = 12, c = 23. The classical elegant route: order all animals to lift two legs (the trainer's trick): 70 legs lift, 94 − 70 = 24 remain on the ground — all rabbits', two each: 24/2 = 12 rabbits, hence 23 chickens. Two solutions, one answer; the second explains why the algebra works.
Worked example 4 — the hundred chickens (Zhang Qiujian, 5th century). Roosters cost 5 coins, hens 3, chicks 1/3. Buy exactly 100 birds for exactly 100 coins, with at least one bird of each kind. Let x, y, z be the counts: x + y + z = 100 and 5x + 3y + z/3 = 100. Triple the second: 15x + 9y + z = 300; subtract the first: 14x + 8y = 200, i.e. 7x + 4y = 100. Then 4y = 100 − 7x requires 100 − 7x divisible by 4 and positive: x = 4 gives y = 18, z = 78; x = 8 gives y = 11, z = 81; x = 12 gives y = 4, z = 84. Three solutions with every kind present — exactly Zhang Qiujian's classical answer set. (Drop the "at least one of each" condition and a fourth, degenerate solution appears: (0, 25, 75), buying no roosters at all. Boundary conditions change answer sets — Lesson 5's reading discipline, again.)
Worked example 5 — Sophie Germain's identity. Show n⁴ + 4 is prime only for n = 1. Write n⁴ + 4 = (n² + 2)² − (2n)² (completing the square, then realising the cross term fits): factor as (n² − 2n + 2)(n² + 2n + 2). For n ≥ 2 the smaller factor is n² − 2n + 2 = (n − 1)² + 1 ≥ 2, and the larger exceeds it, so n⁴ + 4 is composite. At n = 1 the value is 5, prime (the smaller factor collapses to 1 — the factorisation still holds but no longer proves compositeness). Answer: n = 1 only. One identity, total victory — the olympiad aesthetic in miniature.
Challenge problem — competition standard
Problem (Ramsey). Among any 6 people, prove there exist 3 who pairwise know each other, or 3 who are pairwise strangers. (Assume "knowing" is mutual.)
Solution. Pick any person P. The other 5 divide into those who know P and those who don't; by pigeonhole (Lesson 14), one group has at least 3 members — say A, B, C all know P (the other case is symmetric). If any two of A, B, C know each other — say A and B — then {P, A, B} are pairwise acquainted. Otherwise A, B, C are pairwise strangers, and they themselves form the required triple. In the symmetric case (A, B, C all strangers to P): if any two of them are strangers to each other, they join P as a stranger triple; otherwise A, B, C are pairwise acquainted. Every branch closes: the triple exists. This is the Ramsey number R(3, 3) = 6 — the doorway to a whole branch of combinatorics, opened by one pigeonhole and two cases.
Common mistakes
- Claiming an invariant without verifying it. The invariant must be proved unchanged by every legal move, including edge cases — Worked example 2's factorisation is the proof, not a guess.
- Overgeneralising from small cases. A pattern holding for n = 1, 2, 3 is a conjecture, not a theorem. Small cases guide; induction or direct proof decides.
- Extremal principle on infinite sets. "Take the smallest counterexample" needs a well-ordered set (positive integers: yes; positive reals: no — there may be no smallest). Finiteness or discreteness must be present.
- Colouring that doesn't fit the piece. The colouring must give every placement the same signature. A colouring under which a domino covers varying counts proves nothing.
- Giving up after one stuck idea. Competition problems are budgeted in tens of minutes of stuck-ness. The toolkit is a checklist to cycle through: invariant? extremal? colouring? backwards? small cases?
Exam Experience
Olympiad-style questions in Gaokao dress: exact marking, complete reasoning required.
Multiple choice. The units digit of 3²⁰²⁶ is: A. 1 B. 3 C. 9 D. 7 Answer: C. Powers of 3 cycle 3, 9, 7, 1 (period 4); 2026 = 4 × 506 + 2, so the digit is the cycle's second: 9.
Fill in the blank. The numbers 1, 2, 3, 4, 5 are combined by repeatedly replacing a, b with a + b + ab (Worked example 2). The final number is ____. Answer: 719. The invariant: final + 1 = 2 × 3 × 4 × 5 × 6 = 720, so the final number is 719.
Solution question (10 marks). Prove that the product of any four consecutive positive integers, plus 1, is a perfect square. Marking scheme. Write the product pairing first with fourth and second with third: n(n + 3) = n² + 3n and (n + 1)(n + 2) = n² + 3n + 2 — 3 marks for this pairing (the key idea; pairing n with n + 1 instead earns nothing). Set m = n² + 3n: the product is m(m + 2) — 2 marks. Then m(m + 2) + 1 = m² + 2m + 1 = (m + 1)² — 3 marks. Conclude: the number equals (n² + 3n + 1)², a perfect square — 2 marks. [10 marks] The pairing is the whole problem — the first and last factors share the same quadratic core, which is exactly the symmetry-hunting this lesson teaches.
Going deeper — a functional equation, and the legend of IMO 1988
Functional equations ask for all functions satisfying a relation — a genre where systematic value-plugging replaces formula-hunting. Solve: find all f : ℝ → ℝ with f(x + y) = f(x) + f(y) for all x, y, and f(1) = 3 (Cauchy's equation with a calibration). Set x = y = 0: f(0) = 2f(0), so f(0) = 0. Induction gives f(n) = 3n for positive integers n; f(0) = f(n) + f(−n) gives the negatives. For rationals: f(p/q) satisfies q × f(p/q) = f(p) = 3p (adding p/q to itself q times), so f(p/q) = 3p/q. Conclusion: f(x) = 3x for every rational x. (On all of ℝ, without a regularity hypothesis like continuity, pathological extra solutions exist — a famous warning that hypotheses are load-bearing; with continuity, f(x) = 3x everywhere.) The method — plug 0, plug equal variables, build integers, rationals, then extend — is the universal skeleton key for this genre.
The legend. IMO 1988 Problem 6: if (a² + b²)/(ab + 1) is a positive integer k, prove k is a perfect square. It defeated the problem committee's own experts on time; the solution uses Vieta jumping — assume a minimal counterexample pair (a, b) with a ≥ b, view the equation as a quadratic in one variable, and use Vieta's formulas (Lesson 6!) to jump to a smaller solution, contradicting minimality (Lesson 17's extremal principle in algebra's clothing). Sanity-check the claim: a = 8, b = 30 gives (64 + 900)/(240 + 1) = 964/241 = 4 = 2² ✓. The toolkit of this lesson — invariants, extremality, descent — is not a museum: assembled correctly, it solves the hardest problem ever set at the IMO.
Second look — a parity invariant game
The numbers 1, 2, …, 9 stand on a board. A move: erase two numbers a and b and write |a − b|. After eight moves one number remains. Prove it is odd. Track the parity of the total sum S. Replacing a and b by |a − b| changes the sum by (a + b) − |a − b|. If a ≥ b this is (a + b) − (a − b) = 2b — even; if b > a it is 2a — even. So S changes by an even number every move: its parity is invariant. Initially S = 1 + 2 + … + 9 = 45, odd. At the end the "sum" is the single remaining number, so that number is odd. In particular it cannot be 0 — a fact no amount of experimenting with move orders would let you be sure of, since you might simply not have found the right order. The invariant settles in four lines what brute force cannot settle at all. Compare Worked example 2: there the invariant was a disguised product; here it is a parity. The search strategy is identical — apply the move to the tracked quantity symbolically and see what survives.
📈 Interactive Graph: Function Explorer — Olympiad Problem Solving
Explore how functions behave — a core skill for Olympiad Problem Solving.
🎛️ Interactive Explorer: Quadratic Explorer — Olympiad Problem Solving
Drag the sliders to change the coefficients of y = ax² + bx + c and watch the parabola transform live.
Notice how a controls the width and direction, b shifts the axis of symmetry, and c moves the graph up and down.
Key Terms
- Olympiad problem
- A problem requiring inventive elementary reasoning, not advanced theory.
- Invariant
- A quantity unchanged by allowed operations; proves impossibility or determines outcomes.
- Extremal principle
- Consider the maximal/minimal example; derive contradictions or constructions.
- Pólya’s method
- Understand → plan → execute → look back; the problem-solving framework.
- One problem, many solutions
- 一题多解; Chinese training ideal: solve each problem multiple ways.
- Parity
- Odd/even-ness; the simplest and most-used invariant.
- Double false position
- 盈不足; ancient Chinese method: two guesses bracket the true answer.
- Diophantine equation
- Integer-solution equations (like the hundred-chickens problem).
- Strategy stealing
- Proving the first player wins by showing a second-player win leads to contradiction.
Discussion Questions
- Two opposite corners are removed from an 8×8 chessboard. Prove 31 dominoes cannot cover it. (State the invariant explicitly.)
- Start with numbers 3, 5 on a board. A move replaces (a,b) with (a+b, |a−b|). Can you reach (7, 9)? Find an invariant.
- Prove: among any 7 integers, two sum or differ to a multiple of 10. (Consider remainders mod 10 and pair them.)
- Solve the chickens-and-rabbits problem three ways: algebra, the "all chickens" trick, and working backward. Which is most elegant?
- First player places a stone on a 9×9 board; players alternate; no two adjacent (sharing a side). Last to move wins. Who wins, and what’s the strategy? (Hint: center + symmetry.)