All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Games
Another game of nim (Posted on 2004-09-02) Difficulty: 2 of 5
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?

  Submitted by Brian Smith    
Rating: 3.0000 (2 votes)
Solution: (Hide)
The strategy for this game of nim is based off mod 8.

If the number of tokens remaining is 0 or 2 mod 8, then the player is in a losing position.

If the number of tokens remaining is 1 mod 8, then the only winning move is to take 1 token.

If the number of tokens remaining is 3 mod 8, then the possible winning moves are to take 1 or 3 tokens.

If the number of tokens remaining is 4 or 6 mod 8, then the only winning move is to take 4 token.

If the number of tokens remaining is 5 mod 8, then the possible winning moves are to take 3 or 5 tokens.

If the number of tokens remaining is 7 mod 8, then the only winning move is to take 5 tokens.

In the case of 30 tokens in the problem: Since 30 mod 8 = 6, The first player can win by taking 4 tokens.

Nikki expands the problem by finding a strategy for all variations of nim which remove any one option from a set of consecutive values starting at 1 (for this problem, 2 was removed from the set 1-5) here and here

Comments: ( You must be logged in to post comments.)
  Subject Author Date
Puzzle Thoughts K Sengupta2023-05-13 01:13:39
re(4): Solution - Generalized!Bruce Brantley2004-09-08 10:55:38
re(4): Solution - Generalized!Brian Smith2004-09-03 22:50:33
Solutionre(3): Solution - Generalized!nikki2004-09-03 10:42:58
Some Thoughtsre(2): Solution - generalized?nikki2004-09-03 08:32:43
re: Solution - Embarrassed?Bruce Brantley2004-09-03 00:18:53
SolutionAnalysisFederico Kereki2004-09-02 19:34:22
SolutionSolution - with explanation/thought processnikki2004-09-02 16:29:30
re: SolutionRajal2004-09-02 16:16:16
Solutionthe strategyCharlie2004-09-02 16:11:40
SolutionSolutionRajal2004-09-02 16:07:48
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (6)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information