Card Game 24
learn math the fun way
To play the game, either click the Deal button, or enter any four numbers, preferably positive integers between 1 and 13. Then think of a caculation using addition, subtraction, multiplication and/or division to get the number 24. Click the Show Answer button to show "all" possible calculations.
History Many years ago, three out of four Chinese were farmers and most of them were undereducated. Yet they all have remarkable talent in mental arithmetic; they can tell you the answers for 72/2+83 or 3.8*2.5 almost instantly, sometimes even faster than an abacus (ancient Chinese "calculator"). When I was a kid, I got trained by a Chinese poker card game called twenty-four. Not sure if this game contributed to the Chinese farmers' math talent, but the popularity of it among all young people attests to the truth that most Chinese are good at arithmetic.
The game goes like this. Four people each show one card. You think of a calculation with addition, subtraction, multiplication and division on the numbers shown on the cards to get 24. Card Ace is 1, Jack 11, Queen 12, King 13, excluding big and small Jokers. Whoever comes up with the answer first wins that round. For instance, if the cards are 3, 4, 1, and 9, you can say 3*(4+1)+9 (* here means multiply). Obviously, if you are or your kid is a third- or fourth-grader in school, this game has some educational value.
Programming A friend of mine told me that recently (Feb 2004) he wrote exactly the same program, except in VBA for Excel. His program also did an exhaustive computation and concludes that with four positive integers 1 through 13, 88% of the time you should get an answer (i.e. 12% of the time you can't get 24 with any calculation.) But neither of our programs is perfect. For instance, my program shows 1*2*3*4 together with (1*2*3)*4 and others while they are mathematically the same calculation; ideally only one of them should be shown. Jesse Hull emailed me and said his program, written in Java, "accounts for the algebraic differences". For simplicity, my program also does not consider different orders of input numbers unless it doesn't find an answer without changing their order (you can override this behavior by checking Force reorder).
Update 2013-09 The owner of 4 Numbers emailed me about his web site. He did a good job in popularizing this game and organizing people interested in playing it.
To my Miscellaneous Page