As an example take the position x 1 x 2 x 3 13 12 8 Is this a P position If not

# As an example take the position x 1 x 2 x 3 13 12 8

• 212
• 100% (1) 1 out of 1 people found this document helpful

This preview shows page 18 - 20 out of 212 pages.

As an example, take the position ( x 1 , x 2 , x 3 ) = (13 , 12 , 8). Is this a P-position? If not, what is a winning move? We compute the nim-sum of 13, 12 and 8: 13 = 1101 2 12 = 1100 2 8 = 1000 2 nim-sum = 1001 2 = 9 Since the nim-sum is not zero, this is an N-position according to Theorem 1. Can you find a winning move? You must find a move to a P-position, that is, to a position with an even number of 1’s in each column. One such move is to take away 9 chips from the pile of 13, leaving 4 there. The resulting position has nim-sum zero: 4 = 100 2 12 = 1100 2 8 = 1000 2 nim-sum = 0000 2 = 0 Another winning move is to subtract 7 chips from the pile of 12, leaving 5. Check it out. There is also a third winning move. Can you find it? 2.3 Nim with a Larger Number of Piles. We saw that 1-pile nim is trivial, and that 2-pile nim is easy. Since 3-pile nim is much more complex, we might expect 4-pile nim to be much harder still. But that is not the case. Theorem 1 also holds for a larger number of piles! A nim position with four piles, ( x 1 , x 2 , x 3 , x 4 ), is a P-position if and only if x 1 x 2 x 3 x 4 = 0. The proof below works for an arbitrary finite number of piles. 2.4 Proof of Bouton’s Theorem. Let P denote the set of Nim positions with nim- sum zero, and let N denote the complement set, the set of positions of positive nim-sum. We check the three conditions of the definition in Section 1.3. I – 10 Ifi 844 ໔门 o
(1) All terminal positions are in P . That’s easy. The only terminal position is the position with no chips in any pile, and 0 0 · · · = 0. (2) From each position in N , there is a move to a position in P . Here’s how we construct such a move. Form the nim-sum as a column addition, and look at the leftmost (most significant) column with an odd number of 1’s. Change any of the numbers that have a 1 in that column to a number such that there are an even number of 1’s in each column. This makes that number smaller because the 1 in the most significant position changes to a 0. Thus this is a legal move to a position in P . (3) Every move from a position in P is to a position in N . If ( x 1 , x 2 , . . . ) is in P and x 1 is changed to x 1 < x 1 , then we cannot have x 1 x 2 · · · = 0 = x 1 x 2 · · · , because the cancellation law would imply that x 1 = x 1 . So x 1 x 2 · · · ̸ = 0, implying that ( x 1 , x 2 , . . . ) is in N . These three properties show that P is the set of P-positions. It is interesting to note from (2) that in the game of nim the number of winning moves from an N-position is equal to the number of 1’s in the leftmost column with an odd number of 1’s. In particular, there is always an odd number of winning moves. 2.5 Mis` ere Nim. What happens when we play nim under the mis` ere play rule? Can we still find who wins from an arbitrary position, and give a simple winning strategy? This is one of those questions that at first looks hard, but after a little thought turns out to be easy.