A chocolate bar is divided into squares, and the square in the bottom left corner is poisoned. Two players take turns biting off a square together with everything above it and to its right, and whoever has to take the poisoned square loses. Can the first player always win, whatever the size of the bar? This page shows that the answer is yes for every rectangle with more than one square, by an argument that proves a winning first move exists without saying which square it is.
Key terms
Chomp
Definition Chomp is a game for two players on a rectangular bar of rows and columns of squares, where and are positive whole numbers with , so the bar has more than one square. Number the columns from left to right and the rows from bottom to top, and call the square in column and row the square . The square in the bottom left corner is poisoned. The players take turns, and passing is not allowed. On each turn a player chooses a remaining square and removes every remaining square with
that is, the chosen square, the squares to its right in its row, the squares above it in its column, and every square that is both above it and to its right. The player who chooses the poisoned square loses, so a player who is left with only the poisoned square loses. Both players see the bar, and nothing is decided by chance.
After any number of moves, every remaining row starts at column and is no longer than the row below it. So a position can be written as its list of row lengths from the bottom up, such as for a bottom row of squares under a top row of , with for the poisoned square alone. The result proved on this page is that every rectangle with more than one square is a first-player win. The proof does not say which first move wins, and no simple rule is known that names a winning first move for every rectangle.
In plain words Each bite removes the chosen square and everything above it and to its right. Nobody wants the poisoned square, so each player tries to leave the other with nothing else.
Example On a bar with one row, the first player chooses the square next to the poison, which removes every square except the poisoned one, and the opponent must take the poison. A bar with one column works the same way with the square just above the poison. Now take rows and columns, the position . The first player bites only the top right square , leaving . The opponent has four safe choices, and each has an answer that leaves the bottom row exactly one square longer than the top row.
| Opponent bites | Leaves | You bite | Leaves |
|---|---|---|---|
When you leave , the opponent has to take the poison. When you leave , the opponent can bite , leaving , or , leaving , and you answer with or to leave . So biting the top right square wins on the bar with rows and columns.
Strategy-stealing argument
Definition A strategy-stealing argument proves that the first player has a winning strategy by showing that a winning answer for the second player could be used by the first player instead. For Chomp it goes as follows. Let be a bar of rows and columns with , and let be its top right square, which is not the poisoned square. Each move removes at least one square, so the game ends after at most moves. It cannot end in a draw and has no chance or hidden information, so by backward induction every position is either winning or losing for the player to move.
Suppose the first player opens by biting only . If this leaves a losing position for the opponent, it is a winning first move. Otherwise the position left is winning for the opponent, so the opponent has a winning reply, a square whose bite leaves a position that is losing for the first player. The square is not the poisoned square, since choosing it would lose at once. Every square of satisfies and , so a bite at any square of removes as well. Hence biting straight away from the full bar removes exactly the squares removed by biting and then . It leaves the same position , but now the opponent is the player to move, and is losing for the player to move. So biting is a winning first move. In both cases the first player has a winning first move. The argument needs a square that every bite removes, and among the shapes that can occur in Chomp only rectangles have one.
In plain words Biting only the far corner is a move that costs almost nothing. If it wins, the first player is done. If the opponent has a winning answer to it, the first player could have made that answer as the opening move, because that bite takes the far corner anyway.
Example On the bar with rows and columns, biting only the corner does not win. It leaves , and the opponent answers with , which leaves . This is an L shape with two squares to the right of the poison and two squares above it, and the mirror rule of question 2 in Check yourself shows that an L shape with two equal arms is losing for the player to move. The argument says that the first player should make this answer as the opening move instead. Biting from the full bar leaves the same , now with the opponent to move. Checking every possibility shows that biting is in fact the only winning first move on this bar.
Nonconstructive proof
Definition A nonconstructive proof shows that an object with some property exists without exhibiting the object or giving a method to find it. A constructive proof names the object or gives a procedure that produces it. Nonconstructive proofs often split into cases and show that each case yields an object, without deciding which case is true, or they show that assuming no such object exists leads to a contradiction.
In plain words A nonconstructive proof tells you that the answer exists, but not what it is.
Example A classic proof shows that there are irrational numbers and such that is rational. A number is rational when it is a fraction of integers with , and irrational otherwise, and is irrational. Let . If is rational, take . If is irrational, take and , since
Either way a suitable pair exists, but the proof does not say which pair it is. A much deeper theorem shows that is irrational, so the second case is the true one, but the short proof never needed to know that. The strategy-stealing argument for Chomp has the same shape. It shows that either the corner bite or a winning reply to it works as an opening, without deciding which, and without saying where that reply is.
First-player win
Definition A game started from a given position is a first-player win if the player who moves first has a winning strategy, a rule for choosing moves that wins against every possible sequence of replies. It is a second-player win if the second player has such a strategy. In a finite game for two players who alternate, with full information, no chance and no draws, backward induction shows that every starting position is exactly one of the two. In a game that can end in a draw, a starting position can be neither, as in tic-tac-toe, where correct play by both sides always ends in a draw.
In plain words A first-player win means that moving first is enough to win, provided you play correctly from then on. It is a statement about perfect play, so a first player who makes a mistake can still lose.
Example Every Chomp bar with more than one square is a first-player win, while the bar of a single square is a second-player win, because the first player has to take the poison at once. In the take-away game with moves of one, two or three counters, a pile of is a first-player win and a pile of is a second-player win. For a Chomp bar with rows an explicit strategy is known. Bite the top right square, and afterwards always leave the bottom row exactly one square longer than the top row. If the opponent bites the top row at column , so that the top row keeps squares, bite the bottom row at column . If the opponent bites the bottom row at column , so that both rows keep squares, bite the top row at column . Each time the bar shrinks, and the game ends with the opponent facing . Square bars also have a simple strategy, found in question 2 below. For general rectangles, no simple rule for finding a winning first move is known, although for any particular small bar a computer can find one by backward induction.
Check yourself
- Take a bar with rows and columns. Show that biting the top right square wins, by giving an answer to every reply.
Show the answer
The bite at leaves . The opponent has six safe choices, and each answer below leaves the bottom row exactly one square longer than the top row.
| Opponent bites | Leaves | You bite | Leaves |
|---|---|---|---|
From and from the same rule gives an answer to every reply, as in the example of the Chomp card, and each round removes at least two squares. So the game reaches with the opponent to move, and the opponent has to take the poison.
- Take a square bar with rows and columns. Show that the first player wins by biting , the square diagonally above and to the right of the poison.
Show the answer
The bite at removes every square with and . What is left is an L shape, the poison with an arm of three squares to its right in the bottom row and an arm of three squares above it in the left column, which is . A bite at with removes only squares of the bottom arm, from column on, because the squares of the left arm have coordinate . In the same way a bite at with removes only squares of the left arm, from row up.
So answer every bite by cutting the other arm to the same length. After each of your moves the two arms are equal. The opponent can never take the last safe square, because a move that empties one arm leaves the other arm still nonempty, and you then empty it. When both arms are empty, the opponent faces the poison alone. The same opening and the same mirror rule win on every square bar with at least rows.
- The L shape from question 2 is losing for the player to move. Why does the strategy-stealing argument not prove that it is a first-player win?
Show the answer
The argument needs a square that every bite removes, so that the first player’s trial move is swallowed by any reply. In the L shape there is no such square. Every square of the bottom arm survives a bite at , every square of the left arm survives a bite at , and the poison survives every safe bite.
Trying the argument anyway shows where it breaks. Suppose the first player bites , leaving arms of two and three squares. The opponent’s winning reply is , which makes both arms two squares long. Biting directly from the original L leaves arms of three and two squares instead, a different position, and a winning one for the opponent. The reply cannot be stolen, and the L shape really is a second-player win.