MathTrail

Strategies and gamesGrades 5–6

Games with a winning strategy

There are 20 matches on the table, and the players take turns to take 1, 2 or 3 of them. Whoever takes the last match wins. Can the first player always win? In these tasks a child looks for a plan that wins whatever the other player does, and finds it by working back from the end of the game: which positions lose for the player who has to move from them.

The main move
Work back from the end and find the losing positions
What it teaches
To find a plan that wins whatever the other player does
matches  0 1 2 3 4 5 6 7 8
loses    ●       ●       ●

The rules of games

Losing positions

In the game of taking 1, 2 or 3 matches, where the last match wins, the positions that lose for the player about to move come every 4.

Matches leftThe best moveWhy
1, 2 or 3take them allthe last match wins
4none winsafter any move, the other player takes the rest
5, 6 or 7take 1, 2 or 3 to leave 4the other player gets a losing 4
8none winsevery move leaves 5, 6 or 7

How to solve: from the end of the game

Write the positions from the smallest up. Mark a position losing when every move from it leads to a winning one, and winning when some move leads to a losing one. The winning move from the start is the one that leaves a losing position. The examples below go from the simplest to an olympiad's.

  1. Start from the positions at the end
  2. Mark each one winning or losing, from the smallest up
  3. Find the move that leaves the other player a losing one

Example 1 · Grades 5–6

Sweets in a bowl

There are 23 sweets in a bowl. Kim and Leo take turns, and Kim goes first. Each takes 1, 2, 3 or 4 sweets. Whoever takes the last sweet wins. How many sweets must Kim take first to be sure to win?

  1. From the end: with 1 to 4 sweets left, the player to move takes them all and wins. With 5 left, every move leaves 1 to 4 for the other player, so 5 loses.
  2. In the same way 10, 15 and 20 lose: whatever is taken from them, the other player can bring the bowl down to the next multiple of 5.
  3. So Kim takes 3 and leaves 20. Whatever Leo takes, Kim takes the rest of 5, leaving 15, 10, 5 and at last nothing.

Answer 3 sweets.

Example 2 · Grades 5–6

The king's walk

A king stands in the bottom left corner of a 5 by 5 board. Two players take turns to move it one square up, one square right, or one square diagonally up and to the right. Whoever moves the king into the top right corner wins. Who wins if both play as well as they can?

  1. Count how many rows and how many columns the king still has to go. From a square one move from the corner, the player to move wins at once.
  2. A square loses for the player to move when both counts are even: every move makes one of them odd, and the other player can make both even again.
  3. The king starts 4 rows and 4 columns away, both even, so the first player loses. The second keeps answering with a move to an even square, and reaches the corner.
● · ● · ●
· · · · ·
● · ● · ●
· · · · ·
● · ● · ●

Answer The second player.

Example 3 · Grades 5–6

The daisy

A daisy has 12 petals in a ring. Two players take turns to tear off either one petal or two petals that grow next to each other, with no gap between them. Whoever tears off the last petal wins. Who wins if both play as well as they can?

  1. Whatever the first player tears off, one petal or two, the ring opens into a row of 11 or 10 petals.
  2. The second player tears from the very middle of that row, one petal from a row of 11 or two from a row of 10. Two equal rows are left, on opposite sides.
  3. From then on the second player copies every move in the other row. Whenever the first player can move, so can the second, so the second tears off the last petal.
   ○ ● ●
 ●       ●
●         ●
 ●       ●
   ● ● ○

Answer The second player.

Where children go wrong

MathTrail explains every wrong answer by the trap it fell into. These are the commonest in this topic, with something you can say to your child.

How to help at home

  1. Play the matches game

    Play the game of taking 1, 2 or 3 matches from 15, and let the child go first. Win a few times, then ask why the multiples of 4 keep coming back.

  2. Copy the move

    In any game on a symmetric board, try copying the other player's move on the opposite side. Ask when the copy works and when it breaks.

  3. Swap sides

    When the child finds a winning plan, swap: now the child goes second. Explaining why the plan loses from there is the deeper half of the topic.

Learn first

Ask for a task on this topic

Give me a task about games with a winning strategy

Add to ClaudeAll topics