Impartial game 2026-10-20
An impartial game is a game in which both players have the same legal moves from any given position. Under the normal-play convention, a player with no legal move loses. For finite games without draws, Grundy numbers encode positions for the Sprague-Grundy theorem.
Minimum excludant Created 2026-10-20 Updated 2026-11-05
The minimum excludant of a finite set of nonnegative integers is the smallest nonnegative integer absent from :
For example, , while and . It always exists and is at most : the candidates cannot all belong to a set of cardinality .
In Sprague-Grundy theory, the Grundy number of a position in a finite acyclic impartial game is the mex of the values of its legal successor positions. The minimum excludant therefore converts the available moves into a reusable numerical description of a game position.
Nim heap Created 2026-10-20 Updated 2026-11-05
A Nim heap of size contains counters and permits removing any positive number, leaving a heap of any size . Under the normal-play convention, its Grundy number is : the reachable values are exactly , whose mex is .
For several heaps, a turn changes exactly one heap. Their combined value is the Nim-sum of the heap sizes, so heaps of sizes three and three form a losing position even though either heap alone is winning. The ability to remove arbitrarily many counters is part of the rule; a bounded-removal subtraction game has different values.
Sprague-Grundy theorem 2026-10-20
Every finite acyclic impartial game under the normal-play convention has a Grundy number. The Grundy number of a sum of independent games is the bitwise exclusive or of their individual Grundy numbers, so the sum is losing exactly when that value is zero.
Sprague-Grundy theory 2026-10-20
Sprague-Grundy theory studies finite acyclic impartial games under the normal-play convention by assigning each position a Grundy number. The assignment recursively takes the minimum excludant of the values of all legal followers. The Sprague-Grundy theorem then reduces a disjunctive sum of games to the bitwise exclusive or of its component values. This framework explains both why a zero value is losing and how independently understood games can be combined without exploring the entire product of their state spaces.
XOR convolution 2026-10-20
For arrays indexed by -bit nonnegative integers, their XOR convolution is , where is bitwise exclusive or. If entries count choices of Grundy numbers, its repeated application counts sums of impartial games with a specified combined Grundy number. The Hadamard transform turns this operation into pointwise multiplication.