Puzzles

A game where you can calculate who wins before either player makes a move

Two players take turns removing any number of objects, at least one, from a single pile they choose among several laid out at the start. Whoever takes the last object wins. With the right piles, one player can guarantee victory no matter what the other does, purely by choosing where to move. Can you figure out the rule that decides who wins before a single move is made?

Reveal the answer

Convert each pile's size to binary and XOR them together (the "nim-sum"). If the nim-sum is zero, the player about to move is losing with perfect play from the opponent; if it's nonzero, they can always move to make it zero and force a win. Mathematician Charles L. Bouton fully solved the game in a 1901 paper, the first complete mathematical theory of a combinatorial game.

Charles L. Bouton, Nim, A Game with a Complete Mathematical Theory — Annals of Mathematics, 1901

One credited idea per card. No filler. Swipe the rest in Savvy.

Keep swiping — it's free Works right in your browser. No app store needed.