Introduction to Logic
Tools
for
Thought
 

Nim


Nim is a game of strategy played with coins arranged in piles. For the purposes of this puzzle, you can assume there are just three piles - one with 7 coins, one with 5 coins, and one with 3 coins. There are two players. When it is a player's move, he or she can take any number of coins from any pile. The person must take at least one coin on each turn, but the person cannot take coins from more than one pile. The winner is the player who makes the last move, so that there are no coins left after that move. When the game starts, you get to choose whether to go first or second. What is your strategy for winning the game? Optional: Devise a strategy that guarantees a win for any finite number of coins and any finite number of piles.