Maths WorkshopMaths problems with full solutions
Exercise 1972Combinatorics › Counting principlesOlympiadAdded 5 Nov 2026

Chomp and the strategy-stealing argument

#combinatorial games#strategy stealing#Chomp#invariant

Statement

A rectangular chocolate bar has mm rows and nn columns of squares. The bottom-left square is poisoned. Two players alternately choose a remaining square and eat it together with all squares above and to its right. The player who eats the poisoned square loses.

  1. Prove that if the bar has more than one square, the first player has a winning strategy.
  2. For a bar with 22 rows, describe the winning strategy explicitly.
Hint
  1. Consider the move that eats only the top-right square. 2. After the first move, try to keep the bottom row exactly one square longer than the top row.
Show solutionHide solution

Solution

Idea. The game is finite and has no draws, so exactly one of the players has a winning strategy.

1. Strategy stealing. The first player considers the move MM that eats only the top-right corner square.
- If MM leads to a position that is losing for the opponent, the first player wins by playing MM.
- Otherwise, the opponent has a winning reply XX. The square chosen by XX was present at the start, and eating it together with everything above and to its right also removes the top-right corner square, so playing XX at the very start leads to the same position as MM followed by XX. That position is losing for the player to move, so the first player wins by playing XX at once.

In both cases the first player has a winning strategy.

2. Two rows, explicit strategy. Let the top row have tt squares and the bottom row b≥tb\ge t. The first player starts by eating the top-right square, creating t=n−1t=n-1, b=nb=n. He keeps the invariant b=t+1b=t+1 after each of his moves, until he reaches t=0t=0, b=1b=1, after which the opponent has to eat the poisoned square. Suppose the opponent faces b=t+1b=t+1 and moves:
- he eats in the top row from column cc: now t′=c−1t'=c-1 and b=t+1≥c+1b=t+1\ge c+1. The first player eats the bottom row from column c+1c+1: the bottom row becomes cc, restoring b=t′+1b=t'+1;
- he eats in the bottom row from column cc (2≤c≤b2\le c\le b): the bottom row has c−1c-1 squares and the top row has c−1c-1 squares. The first player eats the end of the top row (column c−1c-1, if c≥2c\ge2), leaving t′=c−2t'=c-2 and b′=c−1b'=c-1, so b′=t′+1b'=t'+1 again.
The total number of squares decreases at each turn, so eventually the opponent is left with the poisoned square.

Remark. For rectangles with at least three rows and columns no explicit winning strategy is known in general.

Lesson. Strategy stealing proves existence; explicit strategies come from maintaining an invariant shape.