One rule changes the game: here, the player who takes the last counter loses. The challenge is to find a first move that is not merely plausible, but actually leaves the opponent without a defence.
The Last Counter Loses
Riddle statement
There are three piles with 3, 4 and 5 counters.
Two players take turns. On each turn, a player chooses one pile and removes any positive number of counters from it.
But there is an awkward rule: whoever takes the last counter on the table loses.
If you play first, can you guarantee a win? If so, what should your first move be?
Show solution
Solution
Answer: yes. The correct first move is to remove 2 counters from the pile of 3, leaving:
This game is a variant of Nim: on each turn, you remove counters from one pile only. The difference is that here whoever takes the last counter loses.
As long as at least one pile has more than one counter, the strategy matches ordinary Nim: you want to leave your opponent a position with nim-sum zero.
In the initial position:
The nim-sum is not zero, so there is a winning move.
Now reduce one pile so that the nim-sum becomes zero. With \(s=2\):
while:
The only valid reduction is to change the pile of 3 into a pile of 1:
From there, your opponent is left in a losing position, provided you keep playing the correct strategy until the end.
The exception in this variant appears when all remaining piles have size 1. At that point, you no longer want to leave an even number of piles to your opponent; you want to leave an odd number. But the first move has not reached that final phase yet.