Nim where the last stone loses
Three piles hold 3, 4 and 5 stones. On a turn a player removes any positive number of stones from one pile. In ordinary Nim the player who takes the last stone wins. In this misère version, the player who takes the last stone loses.
Who wins from 3, 4, 5 with best play, and what is the winning first move? How does the misère strategy differ from the ordinary one?
Show a hint
The ordinary Nim strategy is to move to a position whose pile sizes have binary exclusive-or equal to zero. That strategy still works in misère Nim until all the remaining piles have size 1, at which point you want to leave an odd number of them.
Your answer
Solving needs a free account
Answers, streaks and solutions unlock when you are signed in. Reading the question and the hint stays free.
Discussion
💡 Discussion rules
- No full solutions here. Hints and approaches only.
- Complexity, edge cases and intuition are the point.
- Interview experiences are welcome. Respect your NDAs.
Loading discussion…
Learn the concepts
The theory behind this question.