A game of
nim is played with one pile of 30 tokens. The two player takes turns taking tokens off the pile. Whoever takes the last token wins.
To make the game a little more interesting, the rules have been changes slightly:
A player may take 1, 3, 4, or 5 tokens but not 2.
What is the best starting move and what is the general strategy?
(In reply to
Solution - with explanation/thought process by nikki)
You certainly can't be embarrassed by that answer. But then if you were wrong, why would you be embarrassed? Learning from mistakes is more important.
For some reason, I didn't even try to do this problem. Instead I just went through the comments and what do you know. I came across something I did not recognize: xmod8=0 or 2. Never heard of modular math before.
Hours of reading later, I think I got it. And I think I know why 0 or 2. Because 0 is the winning state and 2 is the losing state. These are the only two numbers in the ring of 8 ( 0,1,...,6,7) that you cannot play and are not a sum of two other possible plays. For example xmod8=6 doesn't work because 6 is a combination of 1 and 5 two possible plays and xmod8=7 doesn't work because 4 and 3 are possible plays.
I may be wrong. but if I am you guys will straighten me out.
Edited on September 3, 2004, 1:00 am