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
←
From the end
Start from the end of the game, where the winner is clear, and go back: a position loses when every move from it leads to one that wins for the other player.
●
Hand over a losing position
A winning move leaves the other player a losing position. If there is no such move, the position loses, however clever the player.
=
Copy and mirror
In many games the winner keeps things even, answering each move so that the two moves add up to the same, or making the same move on the mirrored side.
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 left
The best move
Why
1, 2 or 3
take them all
the last match wins
4
none wins
after any move, the other player takes the rest
5, 6 or 7
take 1, 2 or 3 to leave 4
the other player gets a losing 4
8
none wins
every 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.
1Start from the positions at the end
2Mark each one winning or losing, from the smallest up
3Find 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?
1From 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.
2In 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.
3So Kim takes 3 and leaves 20. Whatever Leo takes, Kim takes the rest of 5, leaving 15, 10, 5 and at last nothing.
Answer3 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?
1Count 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.
2A 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.
3The 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.
● · ● · ●
· · · · ·
● · ● · ●
· · · · ·
● · ● · ●
AnswerThe 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?
1Whatever the first player tears off, one petal or two, the ring opens into a row of 11 or 10 petals.
2The 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.
3From 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.
○ ● ●
● ●
● ●
● ●
● ● ○
AnswerThe 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.
Trap
Missed one of the conditions
A rule of the game is lost: a move takes 5 sweets where at most 4 are allowed, or the king steps left, which the rules forbid. A plan built on a move that is not allowed wins nothing.
What to say
“Which moves do the rules allow?”
Trap
Assumed the first move always wins
Going first is taken to win by itself: “Kim starts, so Kim wins.” In many games, like the king's walk, the first player loses whatever they do.
What to say
“And if the other player makes no mistakes?”
Trap
Counted on luck instead of the worst case
The plan works only if the other player slips: Kim takes 4 and hopes that Leo then takes too few. A winning strategy has to answer the other player's best move.
What to say
“What is the other player's best answer to that?”
How to help at home
01
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.
02
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.
03
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.