

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.
- Devise a strategy so that the player who goes first will always win.
- 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.
Question 1: ************************ Chris Sigmund, Micheal Norman, James Hampson, Matt Mchugh, and Matt Gilstrap Paul Wezeman's 5th grade class Enterprise Elementary, Federal Way,WA ************************ Alex Smith Fifth grade Collegiate School, New York, NY ************************ Doe and Taz (code names) Ms Ouellet's 4th grade class Edison School. Alameda, CA 94501 ************************ Laura Mattison, Maria Pia Gekas, Julia Tomasko, Tarik Pierce, Daniel Ain, Johannah Cornblatt, Max Zinser Paul Nass's 4th grade class Georgetown Day School. Washington, DC ************************ Mitchell Malasky, Andrew Migdail, Rebecca Zeldin, Simone, and Harrison Paul Nass's fifth grade math class Georgetown Day School. Washington, D.C. ************************ Edward Linden A. Lynagh's & P. Schuman's 5th grade class Collegiate School. New York, NY ************************ Ian Farnsworth, Michael Singer, Brendan Feinberg, Ben Schuon Mrs. Geschel's 2nd grade class Western Salisbury School. Allentown, PA ************************ Curt, Katelyn R. and Nicole Mrs. Caruso's 6th grade class Bagnall School, Groveland, MA ********************** Branpiano@aol.com [no names or schools given] ************************ Questions 1 & 2: ************************ Stephanie Kuester Grade 6-Carroll Intermediate School Southlake, TX ************************ Udit Garg, Joshua Branfman, Vinay Aggarwal Paul Nass's 4th grade class Georgetown Day School, Washington D.C. ************************ Michael Bilik Paul Nass's 5th grade class Georgetown Day School, Washington D.C. ************************ Brian Whitehouse & Erica Wade Amy Whitney's 6th grade class Blue Star Elementary. Holland, MI ************************ Ben, Nate, Elena, Alexandra, Andrew, Emily, Brian, Sarah, and Ariel. Bob Coulter's 3rd grade class Forsyth School. St Louis, MO ************************ Derek Caldwell, Heather Comerci, Andrew Dang, Sam Henderson Mrs. Geschel's 5th grade class Western Salisbury School. Allentown, PA ************************ Partially Correct: the following people deduced the fact that you need to manage to present the opponent with five pennies to win. ********************** Tyler, HazelAnn, and Chelsey Paul Wezeman's 5th grade class Enterprise Elementary, Federal Way,WA ********************* Emily Wickes and Brittany Wakefield Mr. Granger's 5th grade class Pinewood School. Marysville, WA ********************** Danny Pall and Chris Nenno Mrs. Hadden's 5th grade class Drexel Hill School of the Holy Child. Drexel Hill, PA ********************** Tim, Steve, Daina, Lauren, Claire, and Katie Mrs. Brennan's 4th grade class Drexel Hill School of the Holy Child. Drexel Hill, PA ********************** Kristin Began, Katie Johnson, Amelis Mason, Tyler Flaherty, and Peggy O'Donnell Mrs. Blastos 4th grade class Decius Beebe School. Melrose, MA ********************** Siena Frank, Christine Mortimer, and Melissa Vitolo Mrs. O'Connor's 4th grade class Titus Elementary School ********************** Jennifer Hess John Prendergast's 4th grade class Stony Lane School. North Kingstown, RI ********************** Trevor and Art Mrs. Caruso's 6th grade class Bagnall School, Groveland, MA ********************** Jason, Tom, Connie, Alex, Phil, and Russell Miss Seager's 3rd grade class Bagnall School, Groveland, MA ********************** Jeff, Keith, Sarah, Alison, Caitlyn and Stephanie Miss Seager's 4th grade class Bagnall School, Groveland, MA ********************** Rachel Rhoades, Jordayne Hartman, Ariel Vaillancourt, Sean Mayo, and Brian Holman Mrs. Hamilton's 5th grade math class Garrison School **********************
************************** 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

The Math Forum is a research and educational enterprise of the Goodwin College of Professional Studies.