Chapter

Games and Strategies I

The module introduces winning and losing positions, residue strategies, symmetry, pairing, fixed game length, and first nim ideas.
Log in to track solved progress and bookmarks.

Theory

Key Idea

In complete-information games, we usually look not for one lucky move, but for classes of positions: winning positions, from which there is a move to a losing position, and losing positions, from which every legal move goes to a winning position.

At the first level, four tools are enough: residues in stone games, symmetry strategy, pairing strategy, and backward analysis from the end of the game.

Basic Facts

  • If a position has a move to a losing position, then it is winning.
  • If every legal move goes to a winning position, then it is losing.
  • In the game “take from \(1\) to \(k\) stones, last move wins”, the losing positions are multiples of \(k+1\).
  • In the game “add from \(1\) to \(k\), whoever reaches the target wins”, one often keeps totals separated by \(k+1\).
  • Symmetry works when after the opponent’s move, the reflected move is always legal.

When to Use This Method

  • You need to determine who wins with perfect play.
  • The game repeats similar moves with piles, numbers, or board cells.
  • There are natural pairs of objects: numbers with a fixed sum, symmetric cells, or equal piles.
  • The end of the game is clear, but the beginning looks complicated. Then analyze backward from losing terminal positions.

How to Recognise the Method

If the game has one pile, check residues. If two players choose objects from a symmetric set, look for a pairing strategy. If a board has a center or an axis of symmetry, try a mirror response. If the rules are unusual, list the last few positions and label them winning or losing.

Typical Mistakes

  • Showing a good first move without explaining how to respond later.
  • Calling a position losing without checking all legal moves from it.
  • Using symmetry without proving that the reflected move is unoccupied and legal.
  • Confusing the normal game with the variant where taking the last stone loses.
  • In target-number games, forgetting to check the first move and the final target.

Mini-Checklist

  • What are the terminal positions?
  • Who wins or loses in a terminal position?
  • Can positions be classified by residues?
  • Is there a symmetry or pairing that can be maintained?
  • After any opponent move, is there a predetermined response?
  • Is the strategy proven until the end, not only for the first move?

Examples

Example 1. One Pile and Residues

The most important first template: leave a multiple to the opponent.

Problem. There are \(20\) stones in a pile. In one move, a player may take \(1\), \(2\), or \(3\) stones. Whoever takes the last stone wins. Who wins?

Solution.

The losing positions are \(0,4,8,12,16,20\), the multiples of \(4\). From a multiple of \(4\), every move leaves a non-multiple of \(4\), while from any non-multiple one can take \(1\), \(2\), or \(3\) stones and leave a multiple of \(4\). Since \(20\) is a multiple of \(4\), the first player is in a losing position; the second wins by always making the two moves together remove \(4\) stones.

Comment. It is important to prove the whole strategy, not only the first answer.

Example 2. Taking the Last Stone Loses

A small rule change changes the losing residues.

Problem. There are \(28\) stones. In one move, a player may take from \(1\) to \(3\) stones. The player who takes the last stone loses. Who wins?

Solution.

With this rule, positions \(1,5,9,13,17,21,25\) are losing: if one stone remains, the player must take the last stone and lose; then the step size is \(4\). From \(28\), the first player takes \(3\) stones and leaves \(25\), a losing position. Then the first player always complements the opponent’s move to \(4\). At the end, the opponent is left with \(1\) stone.

Comment. Always check who wins on the last move.

Example 3. Reaching a Number

Here the goal is not to leave zero, but to control the running total.

Problem. Players alternately add a number from \(1\) to \(6\) to the current total. The initial total is \(0\). Whoever first obtains \(50\) wins. Who wins?

Solution.

Since \(50\equiv1\pmod7\), the first player first adds \(1\). After each opponent move of \(a\), where \(1\le a\le6\), the first player adds \(7-a\). Then after the first player’s turns, the totals are \(1,8,15,\ldots,50\). Thus the first player reaches \(50\) and wins.

Comment. This is the same complement idea, applied to sums.

Example 4. Two Equal Piles

A pairing strategy often means: copy the opponent’s move in the symmetric part.

Problem. There are two piles of \(13\) stones. In one move, a player may take any positive number of stones from one pile. Whoever takes the last stone wins. Prove that the second player wins.

Solution.

After every first-player move, the second player takes the same number of stones from the other pile. This restores equality. If the first player could move, then one pile had stones, so the second player’s symmetric response is legal. The last move will also be made by the second player.

Comment. Positions with two equal piles are losing for the player to move.

Example 5. Symmetry on a Board

A symmetric response can be a complete strategy.

Problem. Players alternately place tokens on empty cells of a \(5\times5\) board. A player who cannot move loses. Who wins?

Solution.

The first player places a token in the center cell. After that, whenever the second player chooses a cell, the first player chooses the centrally symmetric cell. That cell is unoccupied: if it had been occupied earlier, then its symmetric partner would also have been occupied. Therefore the first player always has a response and makes the last move.

Comment. One must check separately that the reflected cell is free.

Example 6. Pairing

Pairing strategy works even without geometry.

Problem. Players alternately choose one number from \(1,2,\ldots,20\). After all numbers are chosen, they compare sums; the larger sum wins. Prove that the second player can avoid losing.

Solution.

The second player pairs the numbers in advance by sum \(21\): \((1,20),(2,19),\ldots,(10,11)\). Whatever number the first player chooses, the second chooses its partner. From each pair the players get one number each, so their total sums are equal. The second guarantees a draw, so does not lose.

Comment. The pairs must cover all objects without overlap.

Example 7. Rooks on a Board

Sometimes the number of moves is fixed in advance.

Problem. Players alternately place rooks on a \(7\times7\) board so that no two rooks attack each other. A player who cannot move loses. Who wins?

Solution.

After \(k\) moves, \(k\) rows and \(k\) columns are occupied. As long as \(k<7\), there is a free row and a free column, so another rook can be placed. Therefore the game always lasts exactly \(7\) moves. The seventh move is made by the first player, so the first player wins.

Comment. This is not a choice strategy, but a proof of fixed game length.

Example 8. Three Piles and Nim-Sum

A stronger preview shows where the method will develop later.

Problem. There are piles of \(3\), \(4\), and \(5\) stones. In one move, a player may take any positive number of stones from one pile. Whoever takes the last stone wins. Find a winning move.

Solution.

Use bitwise addition without carrying: \(3\oplus4\oplus5=2\). We need to reduce one pile so that the nim-sum becomes \(0\). Reduce the pile \(3\) to \(1\), because \(1\oplus4\oplus5=0\). After that, every opponent move can be answered by restoring nim-sum \(0\). Thus the winning first move is \(3\to1\).

Comment. This is only an introductory version of the nim method, but it is useful for strong problems.

Problems

Problems

#8.1
#8.1

Fourteen Stones

Modulo Grade 7 Grade 8 ★☆☆☆☆

There are \(14\) stones in a pile. In one move, a player may take \(1\) or \(2\) stones. Whoever takes the last stone wins. Who wins with perfect play?

Details
Problem: COM-B1-M08-P001
Difficulty: Level 1 of 5
Tag: Modulo
Grade: Grade 7, Grade 8
#8.2
#8.2

Twenty Stones

Modulo Grade 7 Grade 8 ★☆☆☆☆

There are \(20\) stones. In one move, a player may take from \(1\) to \(3\) stones. The last move wins. Who wins?

Details
Problem: COM-B1-M08-P002
Difficulty: Level 1 of 5
Tag: Modulo
Grade: Grade 7, Grade 8
#8.3
#8.3

Reach \(21\)

Pairing strategy Grade 7 Grade 8 ★☆☆☆☆

Players alternately add a number from \(1\) to \(4\) to a total. The initial total is \(0\). Whoever first reaches \(21\) wins. Who wins?

Details
Problem: COM-B1-M08-P003
Difficulty: Level 1 of 5
Tag: Pairing strategy
Grade: Grade 7, Grade 8
#8.4
#8.4

Two Equal Piles

Pairing strategy Grade 7 Grade 8 ★☆☆☆☆

There are two piles of \(10\) stones each. In one move, a player may take any positive number of stones from one pile. The last move wins. Prove that the second player wins.

Details
Problem: COM-B1-M08-P004
Difficulty: Level 1 of 5
Tag: Pairing strategy
Grade: Grade 7, Grade 8
#8.5
#8.5

The Center Cell

Strategy Grade 7 Grade 8 ★☆☆☆☆

Players alternately place tokens on empty cells of a \(5\times5\) board. A player who cannot move loses. Who wins?

Details
Problem: COM-B1-M08-P005
Difficulty: Level 1 of 5
Tag: Strategy
Grade: Grade 7, Grade 8
#8.6
#8.6

Thirty-Seven Stones

Modulo Grade 7 Grade 8 ★★☆☆☆

There are \(37\) stones. In one move, a player may take from \(1\) to \(4\) stones. The last move wins. Find a winning strategy.

Details
Problem: COM-B1-M08-P006
Difficulty: Level 2 of 5
Tag: Modulo
Grade: Grade 7, Grade 8
#8.7
#8.7

The Last Stone Loses

Modulo Grade 7 Grade 8 ★★☆☆☆

There are \(28\) stones. In one move, a player may take from \(1\) to \(3\) stones. The player who takes the last stone loses. Who wins?

Details
Problem: COM-B1-M08-P007
Difficulty: Level 2 of 5
Tag: Modulo
Grade: Grade 7, Grade 8
#8.8
#8.8

Reach \(50\)

Pairing strategy Grade 7 Grade 8 ★★☆☆☆

Players add a number from \(1\) to \(6\) to a total. The initial total is \(0\). Whoever first obtains \(50\) wins. Who wins?

Details
Problem: COM-B1-M08-P008
Difficulty: Level 2 of 5
Tag: Pairing strategy
Grade: Grade 7, Grade 8
#8.9
#8.9

Numbers from \(1\) to \(20\)

Pairing strategy Grade 8 Grade 9 ★★☆☆☆

Players alternately choose one previously unchosen number from \(1,2,\ldots,20\). After all numbers are chosen, they compare their sums. Prove that the second player can guarantee a draw.

Details
Problem: COM-B1-M08-P009
Difficulty: Level 2 of 5
Tag: Pairing strategy
Grade: Grade 8, Grade 9
#8.10
#8.10

Dominoes on a \(6\times6\) Board

Domino Grade 8 Grade 9 ★★☆☆☆

Players alternately place a domino on two adjacent empty cells of a \(6\times6\) board. A player who cannot move loses. Prove that the second player wins.

Details
Problem: COM-B1-M08-P010
Difficulty: Level 2 of 5
Tag: Domino
Grade: Grade 8, Grade 9
#8.11
#8.11

Rooks on \(7\times7\)

Game Grade 8 Grade 9 ★★☆☆☆

Players alternately place rooks on a \(7\times7\) board so that no two rooks share a row or column. A player who cannot move loses. Who wins?

Details
Problem: COM-B1-M08-P011
Difficulty: Level 2 of 5
Tag: Game
Grade: Grade 8, Grade 9
#8.12
#8.12

A \(4\times6\) Chocolate Bar

Invariant Grade 8 Grade 9 ★★☆☆☆

Players alternately break one existing rectangular piece of a \(4\times6\) chocolate bar along a grid line into two rectangles. A player who cannot move loses. Who wins?

Details
Problem: COM-B1-M08-P012
Difficulty: Level 2 of 5
Tag: Invariant
Grade: Grade 8, Grade 9
#8.13
#8.13

Piles \(12\) and \(17\)

Pairing strategy Grade 8 Grade 9 ★★★☆☆

There are two piles of \(12\) and \(17\) stones. In one move, a player may take any positive number of stones from one pile. The last move wins. Find a winning first move.

Details
Problem: COM-B1-M08-P013
Difficulty: Level 3 of 5
Tag: Pairing strategy
Grade: Grade 8, Grade 9
#8.14
#8.14

Moves \(1,2,4\)

Modulo Grade 8 Grade 9 ★★★☆☆

There are \(30\) stones. In one move, a player may take \(1\), \(2\), or \(4\) stones. The last move wins. Who wins?

Details
Problem: COM-B1-M08-P014
Difficulty: Level 3 of 5
Tag: Modulo
Grade: Grade 8, Grade 9
#8.15
#8.15

Moves \(1,3,4\)

Modulo Grade 8 Grade 9 ★★★☆☆

There are \(31\) stones. In one move, a player may take \(1\), \(3\), or \(4\) stones. The last move wins. Find a winning first move.

Details
Problem: COM-B1-M08-P015
Difficulty: Level 3 of 5
Tag: Modulo
Grade: Grade 8, Grade 9
#8.16
#8.16

Reach \(100\)

Pairing strategy Grade 8 Grade 9 ★★★☆☆

Players alternately add a number from \(1\) to \(9\) to a total. The initial total is \(0\). Whoever first obtains \(100\) wins. Who wins?

Details
Problem: COM-B1-M08-P016
Difficulty: Level 3 of 5
Tag: Pairing strategy
Grade: Grade 8, Grade 9
#8.17
#8.17

Rooks on a Rectangle

Game Grade 8 Grade 9 ★★★☆☆

Players alternately place rooks on an \(8\times10\) board so that no two rooks share a row or column. A player who cannot move loses. Who wins?

Details
Problem: COM-B1-M08-P017
Difficulty: Level 3 of 5
Tag: Game
Grade: Grade 8, Grade 9
#8.18
#8.18

Moves \(2,3,5\)

Modulo Grade 8 Grade 9 ★★★☆☆

There are \(52\) stones. In one move, a player may take \(2\), \(3\), or \(5\) stones. A player who cannot move loses. Find a winning first move.

Details
Problem: COM-B1-M08-P018
Difficulty: Level 3 of 5
Tag: Modulo
Grade: Grade 8, Grade 9
#8.19
#8.19

Do Not Say \(64\)

Game Grade 8 Grade 9 ★★★☆☆

Players alternately add a number from \(1\) to \(5\) to a total. The initial total is \(0\). A player whose move makes the total at least \(64\) loses. Who wins?

Details
Problem: COM-B1-M08-P019
Difficulty: Level 3 of 5
Tag: Game
Grade: Grade 8, Grade 9
#8.20
#8.20

Forty-Seven Stones

Strategy Grade 8 Grade 9 ★★★☆☆

There are \(47\) stones. In one move, a player may take from \(1\) to \(4\) stones. The player who takes the last stone loses. Find a winning first move.

Details
Problem: COM-B1-M08-P020
Difficulty: Level 3 of 5
Tag: Strategy
Grade: Grade 8, Grade 9
#8.21
#8.21

Three Piles \(3,4,5\)

Strategy Grade 8 Grade 9 ★★★★☆

There are three piles of \(3\), \(4\), and \(5\) stones. In one move, a player may take any positive number of stones from one pile. The last move wins. Find a winning first move and explain the continuing strategy.

Details
Problem: COM-B1-M08-P021
Difficulty: Level 4 of 5
Tag: Strategy
Grade: Grade 8, Grade 9
#8.22
#8.22

From \(1\) to \(7\)

Modulo Grade 8 Grade 9 ★★★★☆

There are \(2026\) stones. In one move, a player may take from \(1\) to \(7\) stones. The last move wins. Who wins, and what should the first move be?

Details
Problem: COM-B1-M08-P022
Difficulty: Level 4 of 5
Tag: Modulo
Grade: Grade 8, Grade 9
#8.23
#8.23

Dominoes on a Board with a Hole

Domino Grade 8 Grade 9 ★★★★☆

The central cell is removed from a \(7\times7\) board. Players alternately place dominoes on two adjacent empty cells. A player who cannot move loses. Prove that the second player wins.

Details
Problem: COM-B1-M08-P023
Difficulty: Level 4 of 5
Tag: Domino
Grade: Grade 8, Grade 9
#8.24
#8.24

Piles \(7,11,13\)

Challenge Grade 8 Grade 9 ★★★★★

There are three piles of \(7\), \(11\), and \(13\) stones. In one move, a player may take any positive number of stones from one pile. The last move wins. Find a winning first move and prove that it is winning.

Details
Problem: COM-B1-M08-P024
Difficulty: Level 5 of 5
Tag: Challenge
Grade: Grade 8, Grade 9

Ladders

No published ladders were found.
Previous Chapter
Next Chapter