Page 45 - NUMINO Challenge_B1
P. 45
5 Nim Game
Basic Concepts Nim Game
Nim is a math game of logic and strategy that is played by two players. It
originated in European pubs during the Middle Ages, and is still played
today. Different game genres were developed based on different theories.
The rules are shown below.
Rules
1. Lay 13 matchsticks on the table.
2. Two players take turns taking the matchsticks. A player can
take one to three matchsticks on each turn.
3. The player who takes the last matchstick wins.
Example Ten marbles are laid on the table. If two people are playing the
game according to the rules below, how many marbles must a
player take on his/her first turn in order to always win?
1 2 3 4 5 6 7 8 9 10
Rules
1. Two players take turns picking the numbered marbles in order,
starting with marble 1 .
2. A player can take one to three marbles on each turn.
3. The player who takes the marble 10 wins.
Class Notes
Suppose it is your turn and marbles 7 , 8 , 9 , and 10 remain on the table.
If you take marble 7 , the opponent will take the other three marbles, 8 , 9 , and 10 ,
and you will lose.
If you take two marbles, 7 and 8 , the opponent will take marbles, and
, and you will lose.
If you take three marbles, 7 , 8 , and 9 , the opponent will take marble, , and
you will lose.
Therefore, when there are four marbles left, you will always (lose, win) on your turn.
If you leave four marbles on your turn, the other player will always (lose, win). Therefore,
you have to take marble ( 5 , 6 , 7 ) on your turn in order to win.
Thinking backwards, you have to take marble ( 1 , 2 , 3 ) in order to take marble .
Therefore, you have to take marbles, and , in order to always win.
42 NUMINO Challenge B1
Basic Concepts Nim Game
Nim is a math game of logic and strategy that is played by two players. It
originated in European pubs during the Middle Ages, and is still played
today. Different game genres were developed based on different theories.
The rules are shown below.
Rules
1. Lay 13 matchsticks on the table.
2. Two players take turns taking the matchsticks. A player can
take one to three matchsticks on each turn.
3. The player who takes the last matchstick wins.
Example Ten marbles are laid on the table. If two people are playing the
game according to the rules below, how many marbles must a
player take on his/her first turn in order to always win?
1 2 3 4 5 6 7 8 9 10
Rules
1. Two players take turns picking the numbered marbles in order,
starting with marble 1 .
2. A player can take one to three marbles on each turn.
3. The player who takes the marble 10 wins.
Class Notes
Suppose it is your turn and marbles 7 , 8 , 9 , and 10 remain on the table.
If you take marble 7 , the opponent will take the other three marbles, 8 , 9 , and 10 ,
and you will lose.
If you take two marbles, 7 and 8 , the opponent will take marbles, and
, and you will lose.
If you take three marbles, 7 , 8 , and 9 , the opponent will take marble, , and
you will lose.
Therefore, when there are four marbles left, you will always (lose, win) on your turn.
If you leave four marbles on your turn, the other player will always (lose, win). Therefore,
you have to take marble ( 5 , 6 , 7 ) on your turn in order to win.
Thinking backwards, you have to take marble ( 1 , 2 , 3 ) in order to take marble .
Therefore, you have to take marbles, and , in order to always win.
42 NUMINO Challenge B1