stat155hw2soln - 3. Note that (1 , 2 , 3) denotes 3 piles...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Stat 155 Fall 2009: Solutions to Homework 2 (was due September 17, 2009) 1. The Sprague-Grundy function of the 2 × 3 rectangular piece of chocolate for the game of Chomp is enumerated below. It was obtained using the graph on page 11 of the text, starting with assigning a value of 0 to the terminal position, and then using the definition of g . g ( c ) = g ( cr r ) = g ( cr r r r ) = 0 g ( c r ) = g ( cr ) = 1 g ( cr r ) = g ( cr r r ) = 2 g ( cr r r ) = 3 g ( cr r r ) = 4 r r 2. The P -positions of G 1 are given by the positions x where x 0 mod 7 or x 2 mod 7. Thus, g 1 (100) = 0. Writing out the Sprague-Grundy values for G 2 , we see that they are peri- odic, with period 8. g 2 ( x ) = 0, for x 0 , 1 mod 8, g 2 ( x ) = 1, for x 2 , 3 mod 8, g 2 ( x ) = 2, for x 4 , 5 mod 8, and g 2 ( x ) = 3, for x 6 , 7 mod 8. Since 100 4 mod 8, we have g 2 (100) = 2. Finally, g 3 (100) = 100 mod 21 = 16. Then, using the sum theorem, g (100 , 100 , 100) = g 1 (100) g 2 (100) g 3 (100) = 0 2 16 = 18 . Since the Sprague-Grundy value of the position is non-zero, it must be an N -position.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 3. Note that (1 , 2 , 3) denotes 3 piles of Lasker heaps, not nim-heaps. By the sum theorem, g (1 , 2 , 3) = g 1 (1) g 2 (2) g 3 (3), where g 1 ,g 2 ,g 3 denote the Sprague-Grundy functions of the single pile Laskers Nim games. Using the denition of the Sprague-Grundy function, the values of the g i can be worked out. The only one dierent from regular nim is 3. Since, in addition to the usual nim moves, 3 can be split into the two smaller piles of sizes 2 and 1, we nd that the Sprague-Grundy value of (3) is in fact 4. Thus we have g (1 , 2 , 3) = 1 2 4 = 7 and (1 , 2 , 3) is an N-position for Laskers Nim. 4. The winning move is to split the pile with 3 chips into two smaller piles with 2 chips and 1 chip. This gives us the position (1 , 2 , 1 , 2) which has Sprague-Grundy value 0....
View Full Document

This note was uploaded on 10/02/2009 for the course STAT 87531 taught by Professor Muralistoyanov during the Spring '09 term at University of California, Berkeley.

Ask a homework question - tutors are online