The Math Forum

Ask Dr. Math - Questions and Answers from our Archives
Associated Topics || Dr. Math Home || Search Dr. Math

Resources for NIM

Date: 07/03/97 at 11:25:04
From: Bill Sanford
Subject: A math game called NIM

I have been told that NIM is a Chinese game involving capturing 
theory, but I can't find anything about it.  Do you know what NIM is?


Date: 07/03/97 at 12:51:10
From: Doctor Rob
Subject: Re: A math game called NIM


The original form of NIM is as follows. 12 matches are arranged in 
three rows of 3, 4, and 5:

   | | |
  | | | |
 | | | | |

Two players alternate turns.  In one turn, each player can take any 
number of matches out of any one row.  The player who takes the last 
match wins.

It turns out that the first player has a winning strategy. (Can you 
find the winning first move?)  The strategy has a mathematical 
description, but it is very much not obvious what it is.

There are many variations. One is where the player who takes the last
match *loses*. Others involve starting with different numbers of 
matches in the rows, and different numbers of rows. Still another 
allows the splitting of a row into two as you take some of the matches 
(e.g., take the middle match from the last row, leaving 2 rows of 2 
matches each).

Martin Gardner has written about this game in one of his books, which
have titles similar to these:

Gardner, Martin, _The Scientific American Book of Mathematical Puzzles
and Diversions_

Gardner, Martin, _The Second Scientific American Book of Mathematical
Puzzles and Diversions_ (New York: Simon and Schuster, 1961)

Gardner, Martin, _New Mathematical Diversions from Scientific 
American_ (New York: Simon and Schuster, 1966)

These are reprints of his "Mathematical Games" column from the 
magazine _Scientific American_ which appeared in the 1960s and 1970s.

Another source would be:

Berlekamp, Elwyn R.; Conway, John Horton; and Guy, Richard K., 
_Winning Ways, for Your Mathematical Plays_ (New York:  Academic 
Press, 1985), 2 volumes.

Probably volume 2 would include NIM.

-Doctor Rob,  The Math Forum
 Check out our web site!   
Associated Topics:
High School Discrete Mathematics

Search the Dr. Math Library:

Find items containing (put spaces between keywords):
Click only once for faster results:

[ Choose "whole words" when searching for a word like age.]

all keywords, in any order at least one, that exact phrase
parts of words whole words

Submit your own question to Dr. Math

[Privacy Policy] [Terms of Use]

Math Forum Home || Math Library || Quick Reference || Math Forum Search

Ask Dr. MathTM
© 1994- The Math Forum at NCTM. All rights reserved.