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

Home > Games
A game of Nim (Posted on 2002-04-23) Difficulty: 3 of 5
This game is a variation of the old Eastern game "Nim".

Starting with a deck of cards, two players take turns removing cards from the deck. During his turn a player may take one, two or three cards. The winner is the person who takes the last card (or cards) from the deck.

There is a strategy that the first player can follow in order to assure his victory, but this strategy will not work for all the deck configurations.

What is this strategy, which of the following decks will it work for, and why?

  • 32 cards (7s through Aces)
  • 36 cards (6s through Aces)
  • 52 cards (2s through Aces)
  • 54 cards (2s through Aces + 2 Jokers)

  Submitted by levik    
Rating: 3.8000 (10 votes)
Solution: (Hide)
To win this game, a player must strive to leave the deck containing four cards for the other player. Then no matter how many cards the second player takes, the first player will win by taking the rest.

(This doesn't work for 3 cards because the second player will just take them all, nor for 5 cards, because the second player will take one leaving the first player with 4.)

So taking this a step further, a deck of 8 cards is also a winning deck for player one, since no matter what player two does, player one can make sure that the deck will contain four cards after his turn.

In fact, the strategy is to make sure that the deck contains the number of cards that's a multiple of four after your turn.

Player one can only use this strategy with the 54 card deck by taking two cards from it. All the other cards already contain a number of cards that's a multiple of four, and with these, the game can be won by the second player if he follows the strategy.

Comments: ( You must be logged in to post comments.)
  Subject Author Date
Some ThoughtsOne way to do it?Captain Paradox2004-01-15 08:23:53
SolutionThis gameAlpha Tiger2003-05-16 02:02:47
Good Gamecges2002-12-13 05:18:50
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (1)
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