View
218
Download
3
Category
Preview:
Citation preview
NIM and combinatorial games on graphs
Maria Knorps
maria.knorps@gmail.com
Faculty of Applied Physics and Mathematics, Gdansk University of Technology
NIM and combinatorial games on graphs – p. 1/47
Abstract
During this presentation we will define combinatorialgames in general, NIM and games on graphs. We willdescribe rules of NIM and show the winning strategybased on NIM-sums. The subsequent part ofpresentation will be examples of games on graphs,generalized Hex and other types of NIM.
NIM and combinatorial games on graphs – p. 2/47
Combinatorial games
Definition 1.1
Game is called a combinatorial game if:• there is a set of possible positions - usually finite
NIM and combinatorial games on graphs – p. 3/47
Combinatorial games
Definition 1.1
Game is called a combinatorial game if:• there is a set of possible positions - usually finite• there are two players who alternate moves,
NIM and combinatorial games on graphs – p. 3/47
Combinatorial games
Definition 1.1
Game is called a combinatorial game if:• there is a set of possible positions - usually finite• there are two players who alternate moves,• there are rules for each player that describe
available moves
NIM and combinatorial games on graphs – p. 3/47
Combinatorial games
Definition 1.1
Game is called a combinatorial game if:• there is a set of possible positions - usually finite• there are two players who alternate moves,• there are rules for each player that describe
available moves• both players have complete information
NIM and combinatorial games on graphs – p. 3/47
Combinatorial games
Definition 1.1
Game is called a combinatorial game if:• there is a set of possible positions - usually finite• there are two players who alternate moves,• there are rules for each player that describe
available moves• both players have complete information• it ends in a finite number of moves
NIM and combinatorial games on graphs – p. 3/47
Combinatorial games
Under normal play player who can not moveloses. Under miseré play player who does thelast possible move loses.
NIM and combinatorial games on graphs – p. 4/47
Combinatorial games
Under normal play player who can not moveloses. Under miseré play player who does thelast possible move loses.
Combinatorial game is called impartial whenrules are the same for both players, otherwise wecall it partial.
NIM and combinatorial games on graphs – p. 4/47
Combinatorial games
Under normal play player who can not moveloses. Under miseré play player who does thelast possible move loses.
Combinatorial game is called impartial whenrules are the same for both players, otherwise wecall it partial.
In combinatorial games we denote rationality of both players e.g. bothplayers will move in the best possible way and their goal will be to win.
NIM and combinatorial games on graphs – p. 4/47
Combinatorial games
Definition 1.2
We say that position in a game is a terminal position ifno moves from it are possible.
NIM and combinatorial games on graphs – p. 5/47
Combinatorial games
Example 1.3(Empty and divide)There are two boxes, first containing m chips andsecond containing n chips. Such position is denotedby (m,n), m > 0, n > 0. The two players alternatemoving. A move consists of emptying one of the boxesand dividing the contents of the other between the twoboxes with at least one chip in each box. There is aunique terminal position (1,1). Last player to movewins.
NIM and combinatorial games on graphs – p. 6/47
Combinatorial games
We will try to find positions that are winning for player1 and those that are winning for player 2. We willanalyze the game and show the best strategies foreach player.
NIM and combinatorial games on graphs – p. 7/47
Combinatorial games
We will try to find positions that are winning for player1 and those that are winning for player 2. We willanalyze the game and show the best strategies foreach player.Definition 1.4P-position is a position that is winning for thePrevious player (the one who just moved). N-position is a position that is winning for the Nextplayer.
NIM and combinatorial games on graphs – p. 7/47
Combinatorial games
Fact 1.5
Combinatorial game can not end in a draw. It results ina statement that P - positions and N - positions are theonly that can appear in such game.
NIM and combinatorial games on graphs – p. 8/47
Combinatorial games
Property 1.6P - positions and N - positions are defined recursively by the
following statements:
• All terminal positions are P-positions
NIM and combinatorial games on graphs – p. 9/47
Combinatorial games
Property 1.6P - positions and N - positions are defined recursively by the
following statements:
• All terminal positions are P-positions
• From every N-position there is at least one move to a
P-position
NIM and combinatorial games on graphs – p. 9/47
Combinatorial games
Property 1.6P - positions and N - positions are defined recursively by the
following statements:
• All terminal positions are P-positions
• From every N-position there is at least one move to a
P-position
• From every P-position every move is to an N-position
NIM and combinatorial games on graphs – p. 9/47
Combinatorial games
Property 1.6P - positions and N - positions are defined recursively by the
following statements:
• All terminal positions are P-positions
• From every N-position there is at least one move to a
P-position
• From every P-position every move is to an N-position
in impartial combinatorial games under normal play.
NIM and combinatorial games on graphs – p. 9/47
Combinatorial games
Property 1.6P - positions and N - positions are defined recursively by the
following statements:
• All terminal positions are P-positions
• From every N-position there is at least one move to a
P-position
• From every P-position every move is to an N-position
in impartial combinatorial games under normal play.Under miseré play condition (1) is replaced by :
All terminal positions are N-positions.
NIM and combinatorial games on graphs – p. 9/47
Combinatorial games
Example 1.3 - solution
All P - positions in the game from example 1.3 arethose where m and n are odd .Let us see a quick simulation of this game when m = 5and n = 7.(5,7) is a P - position so the second player has thewinning strategy.
NIM and combinatorial games on graphs – p. 10/47
Combinatorial games
• the first player empties the first box and divides 7 chips
between two boxes - (4, 3)
NIM and combinatorial games on graphs – p. 11/47
Combinatorial games
• the first player empties the first box and divides 7 chips
between two boxes - (4, 3)
• strategy for the second player is to empty the box that has
an odd number of chips, then divide other chips in the way
that there is an odd number of chips in each box. - (1, 3)
NIM and combinatorial games on graphs – p. 11/47
Combinatorial games
• the first player empties the first box and divides 7 chips
between two boxes - (4, 3)
• strategy for the second player is to empty the box that has
an odd number of chips, then divide other chips in the way
that there is an odd number of chips in each box. - (1, 3)
• the first player can only remove 1 chip from the first box -
(2, 1)
NIM and combinatorial games on graphs – p. 11/47
Combinatorial games
• the first player empties the first box and divides 7 chips
between two boxes - (4, 3)
• strategy for the second player is to empty the box that has
an odd number of chips, then divide other chips in the way
that there is an odd number of chips in each box. - (1, 3)
• the first player can only remove 1 chip from the first box -
(2, 1)
• the second player removes a single chip, divides two other
into two boxes and wins
NIM and combinatorial games on graphs – p. 11/47
Combinatorial games
• the first player empties the first box and divides 7 chips
between two boxes - (4, 3)
• strategy for the second player is to empty the box that has
an odd number of chips, then divide other chips in the way
that there is an odd number of chips in each box. - (1, 3)
• the first player can only remove 1 chip from the first box -
(2, 1)
• the second player removes a single chip, divides two other
into two boxes and wins
All positions where m or n are even are N-positions,
because N-player can use the strategy shown above.
NIM and combinatorial games on graphs – p. 11/47
Game of NIM
2.1 Classical NIM
There are 3 heaps containing a1, a2, a3 chips. Eachplayer chooses a heap and removes as many chips ashe likes from the chosen heap. There are two playerswho alternate moves. The winner is the player whoremoves the last chip.
NIM and combinatorial games on graphs – p. 12/47
Game of NIM
AnalysisWe denote as follows: (x,y,z), where x stands for the number of chipsin the first pile, y - second pile and z - third pile. The terminal position is(0,0,0). It is a P-position.
NIM and combinatorial games on graphs – p. 13/47
Game of NIM
AnalysisWe denote as follows: (x,y,z), where x stands for the number of chipsin the first pile, y - second pile and z - third pile. The terminal position is(0,0,0). It is a P-position. Position with only one heap (non empty) is anN-position, because the next player can remove all chips from theheap.
NIM and combinatorial games on graphs – p. 13/47
Game of NIM
AnalysisWe denote as follows: (x,y,z), where x stands for the number of chipsin the first pile, y - second pile and z - third pile. The terminal position is(0,0,0). It is a P-position. Position with only one heap (non empty) is anN-position, because the next player can remove all chips from theheap. Situation is more complex when there are two non-emptyheaps. It can be seen that positions with equal number of chipse.g.(0,1,1), (2,0,2) are P-positions.
NIM and combinatorial games on graphs – p. 13/47
Game of NIM
AnalysisWe denote as follows: (x,y,z), where x stands for the number of chipsin the first pile, y - second pile and z - third pile. The terminal position is(0,0,0). It is a P-position. Position with only one heap (non empty) is anN-position, because the next player can remove all chips from theheap. Situation is more complex when there are two non-emptyheaps. It can be seen that positions with equal number of chipse.g.(0,1,1), (2,0,2) are P-positions. When there are three non emptyheaps N - positions are obviously those that can be moved to positionswith equal number of chips in two heaps and no chips on the third e.g.(2,3,3), (1,1,5) etc.
NIM and combinatorial games on graphs – p. 13/47
Game of NIM
AnalysisWe denote as follows: (x,y,z), where x stands for the number of chipsin the first pile, y - second pile and z - third pile. The terminal position is(0,0,0). It is a P-position. Position with only one heap (non empty) is anN-position, because the next player can remove all chips from theheap. Situation is more complex when there are two non-emptyheaps. It can be seen that positions with equal number of chipse.g.(0,1,1), (2,0,2) are P-positions. When there are three non emptyheaps N - positions are obviously those that can be moved to positionswith equal number of chips in two heaps and no chips on the third e.g.(2,3,3), (1,1,5) etc. We search for a general pattern showing whichpositions are N and which are P.
NIM and combinatorial games on graphs – p. 13/47
Game of NIM
NIM sums
Definition 2.2
The NIM sum of two non negative integers is theiraddition without carry in base 2.Therefore the nim-sum:(xm...x0)2 ⊕ (ym...y0)2 = (zm...z0)2 where∀0≤k≤mzk = xk + yk(mod2)
NIM and combinatorial games on graphs – p. 14/47
Game of NIM
Example 2.3
NIM sum of 12 and 21.12 = (1100)2, 21 = (10101)2
(01100)2
⊕ (10101)2
(11001)2
We can see that 25 = 12 ⊕ 21 6= 12 + 21 = 33
NIM and combinatorial games on graphs – p. 15/47
Game of NIM
Theorem 2.4[C.L. Bouton, 1902]A position (x1, x2, x3, ..., xn), n ∈ N in n-piles NIMis a P-position if and only if the nim-sum of itscomponents is 0 x ⊕ y ⊕ z = 0
NIM and combinatorial games on graphs – p. 16/47
Game of NIM
proofLet P denote the set of NIM positions with nim-sum zero, and let Ndenote the complement set (positions of positive nim-sum). We checkthe three conditions of the definition in property 6.
NIM and combinatorial games on graphs – p. 17/47
Game of NIM
proofLet P denote the set of NIM positions with nim-sum zero, and let Ndenote the complement set (positions of positive nim-sum). We checkthe three conditions of the definition in property 6.1. All terminal positions are in P.This condition is fulfilled because only a terminal position is theposition with no chips in any pile, and 0 ⊕ 0 ⊕ ... ⊕ 0 = 0
NIM and combinatorial games on graphs – p. 17/47
Game of NIM
proofLet P denote the set of NIM positions with nim-sum zero, and let Ndenote the complement set (positions of positive nim-sum). We checkthe three conditions of the definition in property 6.1. All terminal positions are in P.This condition is fulfilled because only a terminal position is theposition with no chips in any pile, and 0 ⊕ 0 ⊕ ... ⊕ 0 = 0
2. From every position in N there is at least one move to a position inP.We will construct such move:
NIM and combinatorial games on graphs – p. 17/47
Game of NIM
• Form nim-sum as a column addition and look at the leftmostcolumn with an odd number of 1‘s.
NIM and combinatorial games on graphs – p. 18/47
Game of NIM
• Form nim-sum as a column addition and look at the leftmostcolumn with an odd number of 1‘s.
• Choose one of the nim-sum ingredients (we will call it x0) that has1 in the chosen column and change this 1 into 0.
NIM and combinatorial games on graphs – p. 18/47
Game of NIM
• Form nim-sum as a column addition and look at the leftmostcolumn with an odd number of 1‘s.
• Choose one of the nim-sum ingredients (we will call it x0) that has1 in the chosen column and change this 1 into 0.
• Change other digits of x0 in columns where there is an oddnumber of 1‘s
NIM and combinatorial games on graphs – p. 18/47
Game of NIM
• Form nim-sum as a column addition and look at the leftmostcolumn with an odd number of 1‘s.
• Choose one of the nim-sum ingredients (we will call it x0) that has1 in the chosen column and change this 1 into 0.
• Change other digits of x0 in columns where there is an oddnumber of 1‘s
This makes x0 smaller because 1, that was in the most significantposition of x0 - on the left, was changed into 0. Changing digits thatway corresponds to subtracting chips from i‘th pile. That shows legalmove from N -position to P-position
NIM and combinatorial games on graphs – p. 18/47
Game of NIM
3. From every position in P every move is to an position in N .If (x1, x2, x3, ..., xn) is in P and x1 is changed to x1‘ < x1, thenequation x1 ⊕ x2 ⊕ ... ⊕ xn = 0 = x1‘ ⊕ x2 ⊕ ... ⊕ xn can not be truebecause it would imply that x1‘ = x1. That leads to conclusion that(x1‘, x2, x3, ..., xn) is in N .These three properties show that P = P.
NIM and combinatorial games on graphs – p. 19/47
Game of NIM
So what is the winning strategy and which player hasit?
NIM and combinatorial games on graphs – p. 20/47
Game of NIM
So what is the winning strategy and which player hasit?That depends on the nim-sum of the game. If nim-sumof the game is 0 then second player has a winningstrategy. After the first player moves (then nim sum islarger than 0) the second player must lead back tosituation with nim-sum 0. If nim-sum of the game islarger than 0 then the first player has the winningstrategy. He must always lead to state where nim-sumis 0.
NIM and combinatorial games on graphs – p. 20/47
Game of NIM
Example 2.5 Let us consider the game of NIM with three piles thathave 5,7 and 9 chips respectively. We check the nim-sum of the game:
(0101)2
(0111)2
⊕ (1001)2
(1011)2
(1011)2 > 0 so the first player has the winning strategy. His first moveshould be removing 7 chips from the third pile so the nim-sum will be 0.Whatever the second player does the first player’s answer is to lead thegame back to nim-sum 0.
NIM and combinatorial games on graphs – p. 21/47
Game of NIM
2.6 NIM with a larger number of piles
The rules are the same as in classical NIM exceptthere is a greater (but finite) amount of heaps.However Bouton’s theorem works for an arbitrary finitenumber of piles so P-positions are only those withnim-sum zero.
NIM and combinatorial games on graphs – p. 22/47
Game of NIM
2.7 Miseré NIM
The Miseré NIM is the version of NIM, where theplayer who removes the last chip loses.In general miseré games are harder to analyze thanones played under normal rule. But miseré NIM is notmore complicated than normal one.
NIM and combinatorial games on graphs – p. 23/47
Game of NIM
We analyze miseré NIM in three steps:
• All piles have one chip each. If there is an even amount of piles the first player hasthe winning strategy.
NIM and combinatorial games on graphs – p. 24/47
Game of NIM
We analyze miseré NIM in three steps:
• All piles have one chip each. If there is an even amount of piles the first player hasthe winning strategy.
• There is exactly one pile with more than one chip. In that case the first player has awinning strategy. His first move must be removing all chips from the pile with morethan one chip (if there is an even amount of piles) or removing all chips except onefrom the pile with more than one chips(if there is an odd amount of piles)
NIM and combinatorial games on graphs – p. 24/47
Game of NIM
We analyze miseré NIM in three steps:
• All piles have one chip each. If there is an even amount of piles the first player hasthe winning strategy.
• There is exactly one pile with more than one chip. In that case the first player has awinning strategy. His first move must be removing all chips from the pile with morethan one chip (if there is an even amount of piles) or removing all chips except onefrom the pile with more than one chips(if there is an odd amount of piles)
• There is more than one pile with multiple chips. In that case the player who has awinning strategy in normal NIM also has a winning strategy in miseré NIM.
NIM and combinatorial games on graphs – p. 24/47
Game of NIM
We analyze miseré NIM in three steps:
• All piles have one chip each. If there is an even amount of piles the first player hasthe winning strategy.
• There is exactly one pile with more than one chip. In that case the first player has awinning strategy. His first move must be removing all chips from the pile with morethan one chip (if there is an even amount of piles) or removing all chips except onefrom the pile with more than one chips(if there is an odd amount of piles)
• There is more than one pile with multiple chips. In that case the player who has awinning strategy in normal NIM also has a winning strategy in miseré NIM.• Nim - sum of the game is 0. Then the second player has a winning strategy.
He moves like in normal NIM. The first player eventually leads to a momentwith only one multiple pile left. The second player should reduce that pile to 0or 1 whichever leaves an odd number of one-chip-piles remaining.
NIM and combinatorial games on graphs – p. 24/47
Game of NIM
We analyze miseré NIM in three steps:
• All piles have one chip each. If there is an even amount of piles the first player hasthe winning strategy.
• There is exactly one pile with more than one chip. In that case the first player has awinning strategy. His first move must be removing all chips from the pile with morethan one chip (if there is an even amount of piles) or removing all chips except onefrom the pile with more than one chips(if there is an odd amount of piles)
• There is more than one pile with multiple chips. In that case the player who has awinning strategy in normal NIM also has a winning strategy in miseré NIM.• Nim - sum of the game is 0. Then the second player has a winning strategy.
He moves like in normal NIM. The first player eventually leads to a momentwith only one multiple pile left. The second player should reduce that pile to 0or 1 whichever leaves an odd number of one-chip-piles remaining.
• Nim - sum of the game is larger than 0. The first player’s winning strategy isthe same as in the point above.
NIM and combinatorial games on graphs – p. 24/47
Game of NIM
2.8 Partial NIMIn this example of partial NIM rules are as follows:
1. We begin with several number of piles, colored Red, Blue or Green
2. Two players (Left and Right) alternate moves under following conditions:
(a) In a blue pile, Left may only remove an odd number of stones while Right mayonly remove an even number.
(b) In a red pile, Right may only remove an odd number of stones while Left mayonly remove an even number.
(c) In a green pile, there are no restrictions, just like conventional Nim.
The player who can not move loses.Solution of this game is in [7].
NIM and combinatorial games on graphs – p. 25/47
Game of NIM
2.9 Greedy NIMs
The rules are the same as in classical NIM exceptplayers are required to remove chips from the largestheap.
NIM and combinatorial games on graphs – p. 26/47
Game of NIM
All P - positions in greedy NIM are those in which the number of equallargest heaps is even.
NIM and combinatorial games on graphs – p. 27/47
Game of NIM
All P - positions in greedy NIM are those in which the number of equallargest heaps is even.The first player removes chips from one of the largest heap, that makesthe number of largest heaps odd. Winning strategy for the secondplayer is to keep the number of largest heaps even.
• If the number of largest heaps is odd and greater than one thesecond player may remove whole largest heap.
• If there is only one largest heap, the second player must take intoconsideration the number of second largest heaps. If this numberis odd he must reduce the size of the largest heap to matchsecond largest heap. If this number is even, the second playermay remove whole largest heap.
NIM and combinatorial games on graphs – p. 27/47
Game of NIM
All P - positions in greedy NIM are those in which the number of equallargest heaps is even.The first player removes chips from one of the largest heap, that makesthe number of largest heaps odd. Winning strategy for the secondplayer is to keep the number of largest heaps even.
• If the number of largest heaps is odd and greater than one thesecond player may remove whole largest heap.
• If there is only one largest heap, the second player must take intoconsideration the number of second largest heaps. If this numberis odd he must reduce the size of the largest heap to matchsecond largest heap. If this number is even, the second playermay remove whole largest heap.
NIM and combinatorial games on graphs – p. 27/47
Games on graphs
Definition 3.1
The directed graph G is a pair (X,F) where X is a nonempty set of vertices (positions) and F is a functionthat gives for each x ∈ X a subset of X. If F(x) is emptyx is called terminal position.
NIM and combinatorial games on graphs – p. 28/47
Games on graphs
Definition 3.2
Game on graph (X,F)is played by two players whoalternate moves. First player starts in x0 ∈ X. Atposition x player chooses position from F(x) andmoves there. The player that can not move (stays in aterminal position) loses.
NIM and combinatorial games on graphs – p. 29/47
Games on graphs
Definition 3.3Sprague - Grundy function g for graph (X,F) isdefined as follows:g(x) = min{n ∈ N0;n 6= g(y), y ∈ F (x)}
NIM and combinatorial games on graphs – p. 30/47
Games on graphs
Property 3.4
Following statements are true:• For every directed graph without cycles satisfying
condition: "length of every path is at most N" thereexists exactly one SG - function
• If x is a P - position g(x) = 0, all other positions areN - positions
NIM and combinatorial games on graphs – p. 31/47
Games on graphs
Example 3.5Hex on graph.Two players (Black and White) alternate moves. Amove consists of selecting a vertex of graph G.Players are not allowed to select a vertex previouslyselected by another player. If some of the verticesselected by Black form a path between B and W, Blackwins. If every path between B and W contains a vertexselected by White, white wins. positions are N -positions
NIM and combinatorial games on graphs – p. 32/47
Games on graphs
Example 3.6 Take-away game.There is one pile consisting of n (n > 0) chips. Two players, whoalternate moves, can remove one two or three chips. The player whoremoves the last chip wins.
NIM and combinatorial games on graphs – p. 34/47
Games on graphs
Example 3.6 Take-away game.There is one pile consisting of n (n > 0) chips. Two players, whoalternate moves, can remove one two or three chips. The player whoremoves the last chip wins.We can analyze this game using backward induction:Starting with terminal position (0 chips - which is a P-position) we canachieve it if there is 1,2 or 3 chips on pile. So positions 1, 2 and 3 areN- positions. Position with four chips on the pile is a P - positionbecause the Next player must remove at least 1 chip, so there remains1, 2 or 3 chips on the pile. We extend this argumentation and concludethat every multiple of four is a P- position, other positions are N -positions.
NIM and combinatorial games on graphs – p. 34/47
Games on graphs
Sprague - Grundy function for a simple take-away game
NIM and combinatorial games on graphs – p. 35/47
Sums of combinatorial games
Definition 4.1Graph G is called progressively bounded if for everyvertex exists a number n such that every path from x isof length less or equal to n.
NIM and combinatorial games on graphs – p. 36/47
Sums of combinatorial games
Definition 4.2 Suppose we are given n progressively bounded graphsG1 = (X1, F1), ... ,Gn = (Xn, Fn). Graph G = (X, F ) is called the sum of graphsG1,..., Gn (we write: G = G1 + ... + Gn) if:
• The set X of vertices is a cartesian product : X = X1 × ... × Xn
• For a vertex x = (x1, ..., xn) ∈ X we define the set of followers:
F(x) = F (x1, ..., xn) = F1(x1)×x2 ×
... × xn
∪ x1 ×F2(x2)×
... × xn
∪ ...
∪ x1 ×x2 × ...×
Fn(xn)
The game played on the graph G i called the sum of games on graphs G1,..., Gn
NIM and combinatorial games on graphs – p. 37/47
Sums of combinatorial games
Property 4.3If each of the graphs G1,..., Gn is progressivelybounded than graph G is also progressively boundedand the maximum number of moves from vertex x isthe sum of of the maximum number of moves in eachcomponent graph.
NIM and combinatorial games on graphs – p. 38/47
Sums of combinatorial games
Theorem 4.4[Sprague-Grundy]If gi is a Sprague-Grundy function of Gi, i = 1, ..., nthen G = G1+...+Gn has a Sprague-Grundy func-tion g(x1, .., xn) = g1(x1) ⊕ ... ⊕ gn(xn), where ⊕ isthe nim sum.
NIM and combinatorial games on graphs – p. 39/47
Sums of combinatorial games
proof Let x = (x1, .., xn) be an arbitrary point of X,b = g1(x1) ⊕ ... ⊕ gn(xn). We will prove the theorem bychecking the definition of Sprague-Grundy function intwo steps:
1. For every 0 < a < b, a ∈ N, there is a follower of xthat has a g-value a.
NIM and combinatorial games on graphs – p. 40/47
Sums of combinatorial games
proof Let x = (x1, .., xn) be an arbitrary point of X,b = g1(x1) ⊕ ... ⊕ gn(xn). We will prove the theorem bychecking the definition of Sprague-Grundy function intwo steps:
1. For every 0 < a < b, a ∈ N, there is a follower of xthat has a g-value a.
2. No follower of x has g - value b.
NIM and combinatorial games on graphs – p. 40/47
Sums of combinatorial games
proof Let x = (x1, .., xn) be an arbitrary point of X,b = g1(x1) ⊕ ... ⊕ gn(xn). We will prove the theorem bychecking the definition of Sprague-Grundy function intwo steps:
1. For every 0 < a < b, a ∈ N, there is a follower of xthat has a g-value a.
2. No follower of x has g - value b.
NIM and combinatorial games on graphs – p. 40/47
Sums of combinatorial games
proof Let x = (x1, .., xn) be an arbitrary point of X,b = g1(x1) ⊕ ... ⊕ gn(xn). We will prove the theorem bychecking the definition of Sprague-Grundy function intwo steps:
1. For every 0 < a < b, a ∈ N, there is a follower of xthat has a g-value a.
2. No follower of x has g - value b.
Then the SG-value of x must be b.
NIM and combinatorial games on graphs – p. 40/47
Sums of combinatorial games
ad. 1 Let d = a ⊕ b, and k be the number of digits in the binary
expansion of d (so d has 1 in k th position). Since a < b then
b must have 1 in the k th position. We also know that
b = g1(x1) ⊕ ... ⊕ gn(xn) so there is at least one number xi
that the binary expansion of gi(xi) has 1 in the k th position.
For simplicity we can assume that i = 1. Then
d ⊕ g1(x1) < g1(x1). From the properties of SG - function for
a single game we have x1‘ such that d ⊕ g1(x1) = g1(x1‘).
Then the move from (x1, .., xn) to (x1‘, .., xn) is a legal move
and
g1(x1‘) ⊕ ... ⊕ gn(xn) = d ⊕ g1(x1) ⊕ ... ⊕ gn(xn) = d ⊕ b = a
NIM and combinatorial games on graphs – p. 41/47
Sums of combinatorial games
ad. 2 Suppose that (x1, .., xn) has a follower with SG - value b,
and suppose, without losing generality, that it involves
moving in the first game: (x1‘, .., xn).We suppose that
g1(x1‘) ⊕ ... ⊕ gn(xn) = g1(x1) ⊕ ... ⊕ gn(xn). That concludes
g1(x1‘) = g1(x1).From the properties of SG - function for a
single game we have contradiction.
NIM and combinatorial games on graphs – p. 42/47
Sums of combinatorial games
Example 4.5The classical three - piles NIM is an example of a sumof games.We consider each pile a single game.
NIM and combinatorial games on graphs – p. 43/47
Unsolved problems in combinatorialgames
• Analyze positions in the game of Go.
NIM and combinatorial games on graphs – p. 44/47
Unsolved problems in combinatorialgames
• Analyze positions in the game of Go.
• Analyze non-repeating NIM, in which neither player is allowed torepeat moves. Assume that c chips has been picked from heap Hand solve variants:
NIM and combinatorial games on graphs – p. 44/47
Unsolved problems in combinatorialgames
• Analyze positions in the game of Go.
• Analyze non-repeating NIM, in which neither player is allowed torepeat moves. Assume that c chips has been picked from heap Hand solve variants:
medium local c chips can not be taken from heap H until someother move is made in heap H
NIM and combinatorial games on graphs – p. 44/47
Unsolved problems in combinatorialgames
• Analyze positions in the game of Go.
• Analyze non-repeating NIM, in which neither player is allowed torepeat moves. Assume that c chips has been picked from heap Hand solve variants:
medium local c chips can not be taken from heap H until someother move is made in heap H
short local c chips can not be taken from heap H on the next move
NIM and combinatorial games on graphs – p. 44/47
Unsolved problems in combinatorialgames
• Analyze positions in the game of Go.
• Analyze non-repeating NIM, in which neither player is allowed torepeat moves. Assume that c chips has been picked from heap Hand solve variants:
medium local c chips can not be taken from heap H until someother move is made in heap H
short local c chips can not be taken from heap H on the next move
long local c chips can never again be taken from heap H
NIM and combinatorial games on graphs – p. 44/47
Unsolved problems in combinatorialgames
• Analyze positions in the game of Go.
• Analyze non-repeating NIM, in which neither player is allowed torepeat moves. Assume that c chips has been picked from heap Hand solve variants:
medium local c chips can not be taken from heap H until someother move is made in heap H
short local c chips can not be taken from heap H on the next move
long local c chips can never again be taken from heap H
short global c chips can not be taken from any heap in the gameon the next move
NIM and combinatorial games on graphs – p. 44/47
Unsolved problems in combinatorialgames
• Analyze positions in the game of Go.
• Analyze non-repeating NIM, in which neither player is allowed torepeat moves. Assume that c chips has been picked from heap Hand solve variants:
medium local c chips can not be taken from heap H until someother move is made in heap H
short local c chips can not be taken from heap H on the next move
long local c chips can never again be taken from heap H
short global c chips can not be taken from any heap in the gameon the next move
long global c chips can never again be taken from any heap
NIM and combinatorial games on graphs – p. 44/47
Unsolved problems in combinatorialgames
• Prove that Black does not have a force win in chess
NIM and combinatorial games on graphs – p. 45/47
Unsolved problems in combinatorialgames
• Prove that Black does not have a force win in chess
• David Gale’s version of Lion and Man. Lion and Man are confinedon the non-negative quadrant of the plane. They move alterativelya distance at most 1 unit. For which initial positions can L catchM? What would change if we replaced the quadrant with awedge-shaped region?
NIM and combinatorial games on graphs – p. 45/47
Unsolved problems in combinatorialgames
• Prove that Black does not have a force win in chess
• David Gale’s version of Lion and Man. Lion and Man are confinedon the non-negative quadrant of the plane. They move alterativelya distance at most 1 unit. For which initial positions can L catchM? What would change if we replaced the quadrant with awedge-shaped region?
NIM and combinatorial games on graphs – p. 45/47
bibliography
References[1] Thomas S. Ferguson, Game theory, Class notes for Math 167, Fall 2000.
[2] Brit C. A. Milvang-Jensen, Combinatorial games, theory and applications, February18, 2000.
[3] S. Even, R. E. Tarjan, A Combinatorial Problem Which Is Complete in PolynomialSpace, Stanford University, Stanford, California
[4] Richard J. Nowakowski, Games of no chance, 1996 Cambridge University Press
[5] Elliott Mendelson, Introducing game theory and its applications, 2004 CRC Press
[6] M.H. Albert, R.J. Nowakowski, NIM restrictions, Electronic journal of combinatorialnumber theory 4 (2004)
[7] Chu-Wee Lim, Partial NIM, Electronic journal of combinatorial number theory 5(2005)
NIM and combinatorial games on graphs – p. 46/47
Recommended