There are three piles with 3, 4 and 5 chips.
On each turn you can remove any positive number of tokens, but from a single pile.
Misère rule: Whoever takes the last piece loses.
Does the first player have a winning move? If yes, what should be your first move?
Home > Riddles > Nim (3,4,5) in misère mode
Nim (3,4,5) in misère mode
Hints
Show hints
- Initial XOR calculation: $3\oplus4\oplus5=2\neq0$.
- The only play that leaves XOR 0 is reducing 3 to 1.
- With $s=2$: $3\oplus2=1<3$ (valid).
Solution
Show full solution
Back to problem
Answer: Yes, the first player wins. The first correct move is to go from $(3,4,5)$ to $(1,4,5)$ (remove 2 from the pile of 3).
Initial XOR calculation:
$$ 3\oplus4\oplus5=2\neq0. $$
Since we are not in the “all 1” phase, in misère it is played like normal Nim: you have to leave XOR 0.
With $s=2$:
- $3\oplus2=1<3$ (valid),
- $4\oplus2=6>4$,
- $5\oplus2=7>5$.
The only play that leaves XOR 0 is reducing 3 to 1.
Misère closure: when at the end there are only piles of size 1 left, it is adjusted to leave an odd number of piles to the rival.
Related riddles
Keep practicing
If you enjoyed this one, try more pure-logic riddles, explore this theme, browse the full archive, or read the riddle-solving guide.