Chapter 15/15.8Accelerateabout 7 min
Parity, invariants and games
Nine coins lie on a table, all heads up. A move is to turn over exactly two coins. Can you reach all tails? Try with real coins before reading on.
Recall from Chapter 1 that an invariant is a quantity that does not change, and from Chapter 3 that parity means odd or even. Together they prove that some things are impossible.
Show that the nine coins can never all be tails.
Three frogs sit on the dots (0, 0), (1, 0) and (0, 1) of a grid. A frog may jump over another frog and land the same distance beyond it, so a frog at P jumping over a frog at Q lands at the point twice as far from P as Q is. Can a frog ever reach (1, 1)?
Games and working backwards. In Chapter 3, Sipho and Nomsa took 1 or 2 stones, and the multiples of 3 were losing positions. Now go one step further. A losing position is one where every move leads to a winning position for the opponent. A winning position is one with at least one move to a losing position. Starting from 0 stones, which is losing for the player to move, label positions one at a time.
Players take turns to remove 1, 3 or 4 stones from a pile. Whoever takes the last stone wins. Find the losing positions. With 20 stones, who wins, and how?
Check your understanding 15.8
- In the coin game with 9 coins, a move now turns over exactly three coins. Can all nine end tails? Explain.
Show answerHide answer
Yes. Each move changes the number of heads by an odd number (−3, −1, +1 or +3), so parity no longer stays fixed. For example, turn coins 1, 2, 3, then 4, 5, 6, then 7, 8, 9: all tails after three moves. - The numbers 1, 2, ..., 9 are written on a board. A move replaces two numbers by their sum. Is the last number odd or even?
Show answerHide answer
Odd. The sum of all the numbers never changes, so the last number is 1 + 2 + ... + 9 = 45. - In the 1, 3 or 4 game, is 30 a winning or losing position? If winning, what should you take?
Show answerHide answer
30 leaves remainder 2 on division by 7, so it is a losing position.
