Skip to main contentSkip to solution

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

✅ Correct Option: 4

Key idea: a pile that is a multiple of 4 is a losing position for the player about to move.

Whatever that player removes (k=1,2k=1,2 or 33), the opponent removes 4−k4-k, bringing the pile back to a multiple of 4. Eventually the pile reaches 0 on the opponent's move.

21=4×5+121=4\times5+1

So Anil removes 1 stick, leaving 20 for Bela.

Pile before BelaBela takesAnil takesPile after
20kk4−k4-k16
16kk4−k4-k12
⋯\cdots⋯\cdots⋯\cdots⋯\cdots
4kk4−k4-k0

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.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question