Nim and the nim-sum
Advanced
Mathematics
English
Also available:
Deutsch
Created by Best
· 17.07.2026 at 11:55 UTC
Nim has several rows of counters. Each turn a player removes any number of counters from a single row, and whoever takes the last counter wins. The winning strategy uses the binary XOR of the row sizes, called the nim-sum. A position is losing for the mover exactly when the nim-sum is zero.
To win from a nonzero nim-sum, change one row so the new nim-sum becomes zero, handing the opponent a losing position. With just two rows this reduces to mirroring: make the rows equal, then copy the opponent's move in the other row until you take the last counter.
University approvals: 0
Tasks
Card Info
- Topic: Mathematics
- Difficulty: Advanced
- Completed: 0 users
Creator
Best
BestBuddy