Nim math game solution
Description Author:. Tue, November 3, , last modified December 6, Counting and Cardinality , Operations and Algebraic Thinking. Download PDF. About This Game. How do you get the last one? Why We Love Nim. How to Play. Example Game. The Central Question: how can you win Nim?
What would a perfect strategy look like? Good questions for the teacher to ask students: What move should I the teacher make? Would you like to take back your move? What have you noticed about this game? Possible student conjectures, true and false, that may arise: Whoever goes first wins. Whoever goes second wins. Odd vs.
Even determines your strategy. Whoever can give their opponent four open spaces wins. For students who have figured out the game, some challenge questions: How would you win Nim if you start with a pile of 20? These challenges can also apply to Nim and Poison variations. This article was inspired by content on our sister site Wild Maths , which encourages students to explore maths beyond the classroom and designed to nurture mathematical creativity.
The site is aimed at 7 to 16 year-olds, but open to all. It provides games, investigations, stories and spaces to explore, where discoveries are to be made. Some have starting points, some a big question and others offer you a free space to investigate. Marianne, I enjoyed your article about Nim. Did you know that the game still works if the rule for winning is reversed?
Here is a variation that I use when introducing the game of Nim to a novice. I lay out the piles usually in the arrangement 2,3,5,7 and explain the rules of play. I then make the bold and slightly risky statement that I can always win, whether I move first or you move first and whether the winning player takes the last piece or the losing player takes the last piece. Once the player make those decisions and the game is underway, I get my Nim sum to zero as soon as I can and then play along until a minimum position is reached, such as 3,2,1 or 2,2.
Then, I offer to let you reverse the rule about who wins, if you wish. With a little thinking, it's clear that I can win under either rule but my last move must have a Nim sum of one if rule is that the person who takes the last one loses. It's a great way to introduce a little bit of maths!
If it seems that the person would be overwhelmed by a discussion of binary numbers, I have them visualize each of the piles of markers as being divided into powers of 2. Then you want to play such that after your move each such sub-pile must have a matching partner. This is easier for some people than binary numbers. With a configuration, it would seem you have to go first to win. You start the game unbalanced--three groups of 2, two 4's and four 1's.
When you go first, you are able to get the Nim sum to zero. After that, assuming the other person knows what she's doing, I don't see how you could win. Every move after your move, the opponent could restore the sum to zero. A separate Nim question: At the end you are down to At this point, to get the Nim sum to zero, one must eliminate the row of two it would seem. But that is of course a losing strategy if in order to win, you must not be the one to remove the last coin.
Yet, if you employ the winning strategy of leaving the opponent , the Nim sum is no longer zero, which is supposedly what is needed to ensure victory. Any explanation? This is not a logic problem I'm putting out there--I don't know the answer.
If your victory condition is to take the last piece of the board you will always want to follow the strategy of having your move leave the board with a Nim sum of 0.
If however your victory condition is for your opponent to have to make the last possible move, then you have to break the winning strategy in the very end. You will want to stay in control of the board by using the winning strategy up to a point, where you can set up a board in which your opponent's only possible moves leave the board with Nim sum 0 basically whichever move he could possibly take has to leave the board with a Nim sum of 0.
Yes, but you have to be in control at that point to pull it off. If you start with a non-zero Nim sum, and your opponent goes first, provided she doesn't err, you will never be in control. If a person going first always takes out the 3 leaving 2,5,7, your opponent will always lose unless you make a mistake. If to win, you need to be the one that doesn't take the last counter then the answer is to change to so your opponent takes 1, reducing it to , and then you take 1, reducing it to , and your opponent takes the last one, letting you win.
So the logic is flawed. Fyi, here is an error in the binary notation for in the first section under "Go Binary. What is the NIM sum of each row wherein the 1st row contains 3 items the 2nd contains 4 and 3rd contains 5?
When calculating the sum, are you calculating horizontal or vertical? Thank you. This process gets much more fascinating when the victory condition is not known at the start of the game.
The game of Whim is identical to Nim, except that one additional class of move is allowed. At any point, once per game, either player can sacrifice his move to set the win condition, which is then permanent. This has the fun side effect of both choosing the win condition and changing the turn order, forcing an additional move by the opposition.
I'd be curious to hear your thoughts on Whim. It looks to me like almost identical analysis can get you most of the way to winning Whim, however, the ability to switch turn order and set the win condition means you must pick a suitable time to do that. That's hard to do, because you opponent might beat you to the punch. This is a very interesting Nim variant. I have figured out a strategy for winning. But you have to memorize a few numbers. Well, 23 numbers, to be exact.
It doesn't matter which object you call unless you're very close to the end. The configuration should be one of the 23 numbers above. If no one calls an object by the time one player presents the other with a single pile of two stones, we have a problem. The active player can simply take the two stones and end the game -- without anyone calling an object!
This leaves the outcome in limbo. So I propose that when the game comes down to a single pile of two stones, the active player may simply play according to the normal rules, i. But if the player chooses to take both stones, their opponent still gets another go. If they call standard, they lose because the other player has already taken the last stones. I hope you all have fun with this game.
I am working on this for a computer program but I have no idea if it works yet. The game is much simpler than all this math. I did the addition on the overhead calculator. If we add two-tenths to seven-tenths, that will put nine-tenths on the display and then Mrs.
De will win. No matter what number you pick, will I win this game? We played again and this time the class won, a lucky victory. Play at least ten different rounds, keeping track of who won each time. As you play, think about strategies for winning this game. Is it just luck? Does it matter who goes first? If you think you have developed a foolproof method for winning, test it out as you play against your partner. Does it work every time?
Why or why not? Interesting conversations erupted around the room. Many students insisted on going first, convinced that this was the winning secret. Jose looked extremely frustrated while Jon, his opponent, was calmly sitting back in his chair with a slight grin on his face. Is there anyone else who is having this same problem? Is there anyone else who thinks he or she has developed a winning strategy? I want to be the one who gets the calculator to seven-tenths. Our demonstration will help your classmates understand what you mean.
0コメント