Reasoning · Grade 4-2 Nim Games

Problem

Move first or second in a blocking game

On a strip of 9 squares a black stone sits at the left end and a white stone at the right end, with 7 empty squares between them. Players take turns; black may move only right, white only left, one square at a time, and a square holds at most one stone. Whoever cannot move loses. Decide whether moving first is better.
Your answer
How to solve
Strategy Work Backwards — Rather than playing the game forward and hoping, I start from the position that decides everything - the moment when no empty squares are left - and walk backwards to see which gap sizes are good to hand to the opponent. Small boards with 0, 1, 2 and 3 empty squares can be settled completely by hand, and the answers alternate in an obvious way, so the pattern tells me what happens at 7 without playing 7 moves. The whole argument rests on one small observation about what a single move does to the gap.
1STEP 1

Notice what one move always does

Each move shrinks the gap by 1.

gap after a move = gap before the move - 1
2STEP 2

Work backwards from the very end

Gap 0 loses and gap 1 wins.

gap 0 = lose, gap 1 = win, gap 2 = lose
3STEP 3

Continue the backwards list and read the pattern

Continuing back, odd gaps win and even gaps lose.

0 L, 1 W, 2 L, 3 W, 4 L, 5 W, 6 L, 7 W
4STEP 4

Count the moves to confirm it

Counting the moves also gives an odd number.

7 ÷ 2 = 3 remainder 1
5STEP 5

Answer the question

With a gap of 7, the first player wins.

7 is odd → the player who moves first wins
Answer
the first player
7 ÷ 2 = 3 R 1
The answer names one of the two players, which is what was asked. Test the rule on a board small enough to see: with 1 empty square between the stones the first player pushes once and the second player is stuck, so first wins - and 1 is odd, as the rule says. With 2 empty squares the first player must move, leaving 1 empty square for the second player, who then pushes and leaves the first player stuck, so second wins - and 2 is even, again as the rule says. Both agree. Counting also agrees: the game always lasts exactly 7 moves, and 7 is odd, so the player who took move 1 also takes the last move, move 7.
Takeaway

Every move eats exactly one empty square, so just count the gap: 7 is odd, and odd gaps always belong to the player who moves first.

  • Notice what one move always does
  • Work backwards from the very end
  • Continue the backwards list and read the pattern
  • Count the moves to confirm it
  • Answer the question