solutions_hw2

# solutions_hw2 - Solutions to homework 2 4.5#2 One-pile game...

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

Solutions to homework 2 4.5#2 One-pile game with the following rules: You may remove (1) any number of chips divisible by three provided it is not the whole pile, or (2) the whole pile, but only if it has 2 (mod 3) chips. The terminal positions are zero, one, and three. They have Sprague-Grundy value 0. From 2 we can only move to 0, by move (2), hence g (2) = 1. From 4 we can only move to 1, by move (1), hence g (4) = 1. From 5 we can move to 2 and 0, by moves (1) and (2), respectively, hence g (5) = 2, and so on. The ﬁrst 15 SG values are the following: x 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 g ( x ) 0 0 1 0 1 2 1 2 3 2 3 4 3 4 5 We can observe that there is a pattern. Disregarding the ﬁrst three positions (0, 1, 2) three consecutive numbers are increasing by 1 and the next three are also increasing in the same fashion, but the ﬁrst element is 1 more than that of the previous triple. Formally, g (0) = 0 and n > 0 we have that g ( n ) = b n 3 c - 1 + ( n mod 3) . Here, b x c denotes the largest integer less than or equal to
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 08/24/2009 for the course MATH 262447221 taught by Professor Weisbart during the Spring '09 term at UCLA.

Ask a homework question - tutors are online