Elementary POW, Jan 27-31, 1997


Elem POW Problems || Dec '96 - Feb '97 Problems || Elem POW Main Page

The Game of Nim

Try playing this strategy game with a friend. Place 11 pennies (or other objects) in a row. The first player picks up 1,2, or 3 pennies. The second player picks up 1,2, or 3 pennies. This continues for each person's turn. The player who picks up the last penny loses.

  1. Devise a strategy so that the player who goes first will always win.

  2. If you change the number of pennies to 30 instead of 11, can the first player still win every time? What is the strategy used?

This week's mentor is Steve Earth, a former high school math teacher from Seattle, Washington.

Correct Solutions submitted by:


Highlighted Solutions

**************************
Stephanie Kuester says:

When there are 30 objects, the first thing you do is take away
one, leaving 29 objects.  I found this out by using what I call "target
numbers".  To figure out the 30 objects problem, I worked backwards and started
with five and then nine, because those were my decided "target numbers" for the
11 objects problem.  Then I noticed that if you start with one, the target
numbers were increasing by four.  I kept adding four until I got twenty-nine,
which would be the first target number that you would encounter when doing the
30 object problem.  From there, you must take the number that will make the
number of objects taken away between you and your opponent during that turn
four.  Do this for every turn, and you will eventually end up with 5 objects.
Then no matter what number your opponent chooses, you can take 1,2, or 3
away to make him/her take the last object.

**************************

Udit Garg says:
 
Step 1.  Out of the 11 pennies, the first player always picks up two pennies
in his first turn.  This would leave nine pennies, which is a multiple of 4
plus 1 (4*2 + 1).

Step 2. On his turn, the second player could pick up 1, 2, or 3 pennies. The
first player then picks up the number of pennies which would add up with the
second player's pick to equal 4, leaving 4 plus 1 pennies.

Step 3. As in step 2, the second player can again pick up 1,2, or 3 pennies.
The first player then again pick up the number of pennies which would add up
with the second player's pick to equal 4.  This will leave only 1 penny for
the second player to pick up.  Thus the first player will win the game.
The strategy is the same for 30 pennies as for 11 pennies.  In order
to win, the first player has to leave 4*x+1 pennies for the second player.
So, on his first chance, the first player picks 1 penny, which leaves 29
(4*7+1) for the second player.  Step 2 of the above is played seven
times until at the end only one penny is left for the second player to pick.

**************************

[Mentor's Note:  This next solution is a very interesting approach:  the
solver showed that the first person must take two to win by exhibiting a
winning path for the 2nd player if they chose otherwise!]
 
Branpiano@aol.com says:

The first person must always pick two.  If the first person picks one
and the second person picks one then if the first person picks one,
two or three he loses no matter what the second person picks.  If
the first person takes three and the other person takes three than
the second person has the the first person in a five formation.
A five formation is when there are five pennies left and if  A takes 1
the B takes 3, if A takes 2 the B takes two,  and if A takes 3 B takes
1. If you do the five formation right you will leave the other person
with 1 penny.  So the correct answer is the first person has to take
2 to win.

[Privacy Policy] [Terms of Use]

_____________________________________
Home || The Math Library || Quick Reference || Search || Help 
_____________________________________

© 1994-2012 Drexel University. All rights reserved.
http://mathforum.org/
The Math Forum is a research and educational enterprise of the Goodwin College of Professional Studies.The Math Forum is a research and educational enterprise of the Goodwin College of Professional Studies.