YSP is a math summer camp that I go to with some of my friends from school. We learn about lots of different math, more specifically game theory and mathematical investigation around number theory.
Yesterday we looked into a game known as Nim. The setup of the game is putting sixteen objects down, with the last object being different from the others. Some gamblers may want to put money as a bet under the last object.
Here's an example with matchsticks. The top one is the last object. |
The game begins with two players, who take turns taking 1-3 normal objects from the pile. The person who picks up the last, special object wins.
The game is seemingly simple and normal, like Tic Tac Toe, but there is a catch: There is a way to win every single game you play.
The game is seemingly simple and normal, like Tic Tac Toe, but there is a catch: There is a way to win every single game you play.
Here is the back of the box of "Beat Dr. Nim". It has a picture of the computer game, (which you can learn more about -> here <-), and also a somewhat casually racist depiction of "Dr. Nim", although Nim most likely originated in China a long time ago. |
So, would you like to hear the strategy? It's really simple; As long as you go second, you must take the objects in groups of 4. So, if your opponent starts by taking 3 objects, you take 1, if your opponent takes 2 objects, you take 2, and if your opponent takes 1, you take 3. No matter what your opponent does, you will always be able to group the objects in fours. So, on the last turn, your opponent will have 4 objects left, but will only be able to grab 1-3 of them, guaranteeing you a win.
Yay you win Nim!!! Actually, cool fact: NIM upside down looks like WIN. The makers of "Beat Dr. Nim" noticed this, and you can see it in the box art for the game a bit easier. |
At YSP, they changed the game up a little bit. They called it "Race to 100", in which you had to take turns increasing a number from 0 to 100. You are allowed to add 1-10 to the number, and each player takes turns.
So, if you want to use the same strategy again... if the 1st player can add 1-10, then the number you will always be able to add up to is 11; if they add 1, you can add 10, if they add 2, you can add 11, etc., until you reach if they add 10, you can add 1. So, you can go in steps to reach 100.
So, if you want to use the same strategy again... if the 1st player can add 1-10, then the number you will always be able to add up to is 11; if they add 1, you can add 10, if they add 2, you can add 11, etc., until you reach if they add 10, you can add 1. So, you can go in steps to reach 100.
You will end up having the numbers 11, 22, 33, leading up to 99. Wait... if you end with 99, your opponent will just say 1, reach 100, and win the game! And you can't guarantee that you can make a number larger than 99. So, this strategy is flawed. Right...?
(TO BE CONTINUED)
(here's a dramatic sound effect to set the mood)
No comments:
Post a Comment