A pile holds 21 matchsticks. Two players Anil and Bela, make moves alternately. A move consists of removing either 1, or 2 or 3 sticks. Whoever takes the last stick wins. Anil makes the first move.
Assume that both players adopt the best strategy. Who would win and what is the correct opening move?
A pile holds 21 matchsticks. Two players Anil and Bela, make moves alternately. A move consists of removing either 1, or 2 or 3 sticks. Whoever takes the last stick wins. Anil makes the first move.
Assume that both players adopt the best strategy. Who would win and what is the correct opening move?
Solution
Key idea: a pile that is a multiple of 4 is a losing position for the player about to move.
Whatever that player removes ( or ), the opponent removes , bringing the pile back to a multiple of 4. Eventually the pile reaches 0 on the opponent's move.
So Anil removes 1 stick, leaving 20 for Bela.
| Pile before Bela | Bela takes | Anil takes | Pile after |
|---|---|---|---|
| 20 | 16 | ||
| 16 | 12 | ||
| 4 | 0 |
Anil takes the last stick.
Removing 2 or 3 leaves 19 or 18, which are not multiples of 4, so Bela could then win.
Therefore, Anil wins, by removing 1 stick.
Related questions:
2026: Actual Paper
2026: Actual Paper