Grade by GradeEssential student suppliesSign in
CC. Curricular Competencies · Curricular Competencies: Reasoning, Modelling and Communicating

Winning Strategies: Symmetry, Invariants and Logic

BC FOM 11: puzzles and games BC FOM 11: thinking strategiesAbout 60 minutes
Learning goals
  • I can use symmetry to find a winning strategy for a game.
  • I can find the winning and losing positions in a simple game and explain why.
  • I can solve a logic puzzle by testing each case and looking for a contradiction.

Words to know

winning strategy
A plan that guarantees a win no matter what the other player does.
symmetry strategy
Copying the other player's move in a mirrored position so you always have a reply.
losing position
A position where every possible move hands the other player a winning position.
contradiction
A result that cannot be true, which shows that the starting assumption was false.
case
One of the possibilities you check, one at a time.

Why games belong in math class

The B.C. curriculum asks you to develop thinking strategies to solve puzzles and play games. An elaboration on the official page gives an example: using reason to determine winning strategies. Games are a safe place to practise reasoning: you make a conjecture ("I think going first wins"), test it, and try to explain why.

This lesson adds three strategies to your toolkit:

  • Symmetry: mirror the other player so you always have a move.
  • Invariants: find something that stays the same (such as "the two piles are equal") and keep it that way.
  • Case testing with contradiction: in logic puzzles, assume one possibility, follow it, and throw it out if it leads to something impossible.
1BARound table1. Player A puts the firstcoin in the exact centre.2. Wherever B places a coin,A copies it on the oppositeside of the centre.3. A always has a move, soB runs out of space first.
The coin game: players take turns placing identical coins flat on a table without overlapping. The first player who cannot place a coin loses.
Worked example

Example 1: The coin game

Two players take turns putting identical coins on a round table. Coins can't overlap or hang off the edge. Whoever can't place a coin loses. Should you go first or second?

  1. Try small: on a table only big enough for one coin, the first player wins.
  2. Look for symmetry. The table has a centre. If the first player covers the centre, every other spot has a matching spot on the opposite side of the centre.
  3. Whenever the second player places a coin, the first player places one at the mirror spot. That spot must be free, because the board stays symmetric after each of the first player's moves.
  4. So the first player always has a reply, and the second player is the one who runs out.

Go first, cover the centre, then mirror every move. The same idea works on any rectangular table.

Piles (a, b)Player to moveWhy
(0, 0)Has lostNo coins left: the other player took the last one.
(1, 1)LosesAny move leaves one coin, which the opponent takes.
(2, 1)WinsTake 1 from the larger pile to leave (1, 1).
(3, 3)LosesAny move makes the piles unequal; the opponent re-balances them.
(5, 3)WinsTake 2 from the pile of 5 to leave (3, 3).
Two-pile Nim: take any number of coins from one pile. Whoever takes the last coin wins.
Worked example

Example 2: Two-pile Nim and an invariant

In two-pile Nim, you may take any number of coins (at least one) from one pile per turn. The player who takes the last coin wins. The piles are 7 and 4, and it is your turn. What should you do?

  1. Conjecture from the table: equal piles are losing positions for the player to move.
  2. Why: if the piles are equal, any move makes them unequal. The other player can then take the same amount from the other pile to make them equal again. The equal piles are an invariant that the winner keeps.
  3. Eventually the piles reach (0, 0) right after the winner's move, so the winner takes the last coin.
  4. From (7, 4), take 3 from the pile of 7 to leave (4, 4).

Take 3 coins from the pile of 7. Then copy your opponent's move on the other pile every turn.

Worked example

Example 3: Knights and knaves

On an island, knights always tell the truth and knaves always lie. Ava says: "Ben and I are both knaves." What are Ava and Ben?

  1. Case 1: Ava is a knight. Then her statement is true, so she is a knave. Contradiction, so Case 1 is impossible.
  2. Case 2: Ava is a knave. Then her statement is false, so they are not both knaves.
  3. Ava is a knave, so Ben must be the knight.
  4. Check: a knave saying "we are both knaves" is lying, which fits.

Ava is a knave and Ben is a knight.

Explain the why

Finding a move that works once is not a strategy. A strategy says what to do every turn and explains why the other player can't escape it. Try to write it in one or two sentences.

Hands-on activity

Play, then prove

Play two-pile Nim with a partner using coins or paper clips, starting from piles such as (6, 2), (5, 5) and (9, 4). Keep a record of who moved first and who won.

  1. After five games, write a conjecture about which starting positions the first player should win.
  2. Test your conjecture by trying hard to beat it.
  3. Then change one rule (for example, the player who takes the last coin loses) and see whether your strategy still works.
Just for fun

Odd fact: Nim is one of the first games ever played by an electronic machine. A Nim-playing machine called Nimrod was shown in public in 1951, years before computers were common.

Your turn

1

Two-pile Nim: the piles are (6, 6) and it is your turn. Are you in a winning or losing position?

2

Two-pile Nim: the piles are (9, 2). What is the winning move?

3

Knights and knaves: Cole says "I am a knave." Can Cole be a knight or a knave?

4

Knights and knaves: Dev says "Eli is a knave." Eli says "Dev and I are the same type." What are they?

5

In the coin game, why must the first player use the centre?

6

Two different digits add to 17. What are they?

More practice

1

Three different digits from 1 to 9 add to 7. Find them and explain why there is only one answer.

2

Two-pile Nim: (10, 3). What move wins?

3

Misère rule: in one-pile Nim where you take 1 or 2 coins and the player who takes the last coin loses, is a pile of 1 good or bad for the player to move?

4

Why is "I won five games by going first" not a proof that going first always wins?

Check your understanding

Quiz

1.

In two-pile Nim, which position is losing for the player to move?

2.

The piles are (8, 5). Which move wins?

3.

A knave always lies. Fen says "Gus is a knight." If Fen is a knave, what is Gus?

4.

What does a contradiction tell you in case testing?

For parents and teachers

Your teen is analyzing games and logic puzzles to find strategies that always work, a competency the B.C. course names directly (develop thinking strategies to solve puzzles and play games).

How to help: play two-pile Nim with coins and lose on purpose a few times; ask Why did you win? Would that always work? Logic puzzle books are also great practice.

Common mistakes: thinking a few wins prove a strategy; forgetting the special centre spot in the coin game; checking only one case in a logic puzzle.