How to Win Matchstick Maths Game, 'Nim'  Fun for Children
The MatchStick Game  also known as 'Nim'
Here is a simple game for 2 people that you can always win (unless your opponent also knows the secret).
It’s a tremendous confidence booster for children who can learn to defeat adults once they learn the 'trick'. Kid's love secrets; particularly ones adults don't know.
You start off with 15 matches laid out on the ground. In practice you can use any small objects. Stones or shells are ideal which means it is a great game to introduce on the beach when the kids are getting restless.
The rules are very simple. Each person takes turns to remove either 1, 2 or 3 matches. You win if your opponent is left with the last match.
An Example Game
Number of Matches
 Number of Matches Removed
 Number of matches Left


15
 You remove 2
 13

13
 Opponent removes 3
 10

10
 You remove 1
 9

9
 Opponent removes 2
 7

7
 You remove 2
 5

5
 Opponent removes 1
 4

4
 You remove 3
 1 Opponent looses!

Writing For HUBPAGES ADDS UP!
HubPages membership is totally FREE  Get writing, make friends (and if you want) Make Money!
How Does it Work?
When you start, you first remove 2 matches. You are then guaranteed to win.
From then on, each time your opponent plays you make the count removed by you and your opponent up to 4. If they take 1 you take 3 if they take 2 you take 2 etc. This means your opponent is always left with the last match.
The key to this game is TARGET NUMBERS. You arrange it so you leave your opponent with:
13, 9, 5 and finally 1 match.
Once you've removed the first 2 matches, you keep making up the total removed in that round to 4.
Can you win if your opponent starts? Yes you can unless they understand how to win and begin with 2.
If they start with 1: you take away another 1 bringing you to your target number of 13 left.
If they start with 3, you remove another 3 making the target number 9.
Games Theory
A simple game like this is an example of what mathematicians call an Impartial, twoperson game with Complete Information.
Impartial means that rules for moving apply equally to both players (unlike Chess, for example, which not impartial, because the white player can only move white pieces, and black can only move black pieces).
Complete information means that both players know the complete state of the game, in contrast to, for example, card games such as poker where one player does not know the cards held by the other player(s).
What if They Start and Remove 2?
Then you play randomly and try to reach a target number.
For Example:
START: 15 Matches
Opponent removes 2 matches (leaving 13)
You remove 2 (leaving 11)
Opponent removes 1 (leaving 10)
You can then remove 1 (leaving 9  target number). You can now win.
Unless your opponent understands the trick they are almost certainly going to make a mistake and allow you to reach a target number before the end of the game.
Now you've mastered the game, try it out on your friends and your children. But remember, don't use your new found skills to cheat strangers in bars or pubs to buy you drinks. This could be illegal where you live and besides, you might make some powerful enemies!
Rik's Links
 RETROTECH
Where you'll find Weird, old technology and a generous dash of Glamour. RETROTECH – Where old fashioned girls, planes, trains, stocking tops, phones and computers merge. RETROTECH where everything (including the girls) are bigger, better and sexier!  Why Not Try Out the Matchstick Game Against your Computer?
You'll need to think a little more as this program varies the number of matches, which makes it a little more tricky than with a fixed number of 15  If You Are Into Games Theory, Find Out More on Wikipedia
This is a clever stuff and not for the faint hearted!  Hub About Bedtime Games for Kids
More by this Author
 2
A personal review of the fabulous ihelicopter! Small remote controlled helicopters are great fun but a helicopter you control with an iphone, ipod or ipad is the ultimate cool, 'must have' gadget!
 6
Today’s parents can be forgiven for feeling overwhelmed by the huge range of toys available for their new baby. Tips on chosing costeffective educational toys for babies and early learning baby toys.
 14
Here are the latest 10 best accelerometer apps for iPhone and iPod (iTouch). Games, health, puzzles and even a seismometer just in case there's an earthquake!
Comments 11 comments
Hi Rik,
Thank you so much for this Hub.
There are many little kids where I live all hanging aroundthe little bars in hopes that someone will give them a few cents to buy some bread.
Now I will get some shells which are in abundance on our beach and teach them. This will provide some amusement to the bar flys and ensure a loaf of bread for theses kids.
I am now on my way to show them.
Thank you
I like your clear explanation of game theory.
I think this is a great game. I realize this would mess up the strategy, but is it always played with only 15 matchsticks?
I can't wait to try this out with my kids! I may even let them in on the secret. :)
A tactic that applies to the game, doesn't matter how many matches there are:
Makes sure, that after you remove 12 or 3 matches, the number of the remaining matches is equal to [ 1 + a number dividable by 4 without remainder].
That is: 1 + X mod 4 = 1
For example let's assume:
X = 12
with the previous equation
1+12 mod 4 = 1
thus in the game you'd have to make sure it's the opponent's turn if the count of remaining matches is 13.
If the game starts with 15 matches, you pick first:
You remove 2, because then what remains is 13:
1+12
12 mod 4 = 0
If the game starts with 20, you pick first:
You remove 3, because then what remains is 17:
1+16
16 mod 4 = 0
Keep to this, and then the count of matches doesn't matter anymore;)
Greets
Ive been shown a varation of this game where the sticks are in a pyramid. You can take any number of sticks from a row, but only one row. The game starts with 15 sticks as well.
11