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
Question 1

Play Nim: click a token to remove it and every token to its right in that row. Take the last token to win.

Question 2

A Nim position is losing for the player to move exactly when:

Question 3

In two-row Nim the winning idea is:

Card Info
  • Topic: Mathematics
  • Difficulty: Advanced
  • Completed: 0 users
Creator
Best
Best
BestBuddy