Sprague–Grundy theorem

From Wikipedia, the free encyclopedia

In combinatorial game theory, the Sprague–Grundy theorem states that every impartial game is equivalent to a nimber. The nim-value of an impartial game is then defined as the unique nimber that the game is equivalent to. In the case of a game whose positions (or summands of positions) are indexed by the natural numbers (for example the possible heap sizes in nim-like games), the sequence of nimbers for successive heap sizes is called the nim-sequence of the game.

The theorem was discovered independently by R. P. Sprague (1935) and P. M. Grundy (1939).

Contents

[edit] Definitions

For the purposes of the Sprague–Grundy theorem, a game is a two-player game of perfect information satisfying the ending condition (all games come to an end: there are no infinite lines of play) and the normal play condition (a player who cannot move loses).

An impartial game is one such as nim, in which each player has the same available moves in every position. Impartial games fall into two outcome classes: either the next player wins (an N-position) or the previous player wins (a P-position).

An impartial game can be identified with the set of positions that can be reached in one move (these are called the options of the game). Thus the game with options A, B, or C is the set {A, B, C}.

A nimber is a special game denoted *n for some ordinal n. We define *0 = {} (the empty set), then *1 = {*0}, *2 = {*0, *1}, and *(n+1) = *n ∪ {*n}. When n is an integer, the nimber *n = {*0, *1, ..., *(n−1)}. This corresponds to a heap of n counters in the game of nim, hence the name.

Two games G and H can be added to make a new game G+H in which a player can chose either to move in G or in H.

Two games G and G' are equivalent if for every game H, the game G+H is in the same outcome class as G'+H. For impartial games, this is the same as the condition that G+G' is a P-position.

[edit] Proof

We prove the theorem by structural induction on the set representing the game.

Consider a game G = \{G_1, G_2, \ldots, G_k\}. By the induction hypothesis, all of the options are equivalent to nimbers, say Gi = * ni. We will show that G = * m, where m is the mex of the numbers n_1, n_2, \ldots, n_k, that is the smallest non-negative integer not equal to some ni.

So now we need to show that G + * m is a P-position. We do so by giving an explicit strategy for the second player.

Suppose that the first player moves in the component * m to the option * m' where m' < m. But since m was the minimal excluded number, the second player can move in G to an option Gi equivalent to * m'.

Suppose instead that the first player moves in the component G to the option Gi, which is equivalent to * ni. If ni < m then the second player moves from * m to * ni. If ni > m then the second player moves * ni to * m. It's not possible that ni = m because m was defined to be different from all the ni.

[edit] Development

The Sprague–Grundy theorem has been developed into the field of combinatorial game theory, notably by E. R. Berlekamp, John Horton Conway and others. The field is presented in the books Winning Ways for your Mathematical Plays and On Numbers and Games.

[edit] Reference

  • Sprague, R.P. Uber mathematische Kampfspiele, Tohoku Math J., 1935-36, vol 41, pp 438-444.
  • Grundy, P.M. Mathematics and Games, Eureka, Cambridge 1939 (1964), vol 2 (vol 27), pp 6-8 (pp 9-11).
  • Dierk Schleicher and Michael Stoll, An Introduction to Conway's Games and Numbers, math.CO/0410026

[edit] External links