Sie sind auf Seite 1von 14

A Brief Look at Mathematical Games and Puzzles of the 18th and 19th Century

Or

Its all fun and games until someone loses a

By John Dale Hudson

Mathematical puzzles, questions, and games have a rich history spanning from the Rhind Papyrus (about 1600 BC) to the Millennium Prize Problems of today. They run the gambit from simple mental arithmetic and logic puzzles to massive problems that are far beyond our current knowledge. They cross cultural and geographical boundaries, being found in ancient Egypt and Babylon, China, Japan, and all the way to that Mecca of probability, Las Vegas. Here, we shall look at puzzles and games that were created, or of interest in the 18th and 19th centuries. We shall examine a selection that continues to show interest and applications today, and, for the most part, we will focus upon arithmetic and algebraic topics, and not upon those relying mostly upon geometry. In particular, we shall examine a basic algebra teaser, the probabilities involved in winning craps, The Towers of Hanoi, Magic Squares, and finally, the fifteen puzzle. At its most basic, arithmetical and algebraic puzzles involve simple processes that quite often appear far more difficult then they actually are. An example of one such is the process that one can use to astound friends and family alike with your powers of deduction and MAGIC! (Let us not forget that math and magic have ties spanning thousands of years). Simply have a friend roll a pair of dice and keep the results secret. Have them take one of the numbers from the dice, and multiply it by five. Then add 7 to the result. Then double that, and finally add the other die to the total. This total can then tell you what values the two dice had. Lets call die one a and die two b. The results of the steps given are 10a + 14 +b. By simply subtracting 14 (which was added solely to hide what the mathematician is doing) from the total, the result given has die a as the tens column, and die b as the ones, thus enabling the conjurer to divine the rolls! There are

many derivations of these little games, involving 3, 4 or even five numbers, and many still play a role in stage magicians acts. As legend has it, deep in the mountains lies a temple. Inside this temple are three diamond rods, each a cubit high, and as big around as a bee. God placed 64 golden rings, of decreasing size upon one of the rods, with the largest being on the bottom. The monks who live in the temple must move all the rings from the rod upon which they started, to another, moving only one ring at a time, and placing a ring atop only a larger one. According to legend, when the monks have finally placed all 64 rings upon one of the other rods, the temple will collapse, and the world will be destroyed in a great thunderclap (Kraitchik 93). The Tower of Hanoi was created by Mr. Claus, Mandarin of the College of LiSou-Stian in 1883 (one notes, however, that this is an anagram of Mr. Lucas, a famous creator of mathematical games and puzzles, then a professor at the Lycee Saint-Louis) (Kraitchik 92). The game consists of three pegs standing upright. Upon one of the pegs are a series of rings, decreasing in radius from bottom to top. There are usually anywhere from three to eight rings, with the original game possessing eight. The goal is to simply move all the rings from the initial peg to another in the fewest moves possible based on a two simple rules. First, only one ring may be moved at a time. Second, a smaller ring may not be placed upon a larger ring.

One can see that if you have but one ring, then it only requires one move to place it upon another peg. If you have two rings, then you simply place the smallest ring upon the second peg, then place the larger ring upon the third peg, and finally place the smaller ring on top of the larger. Thus yielding three moves. A similar examination for three rings yields seven moves. If you were to calculate the smallest number of moves for a given number of rings, and three rods, the following would be shown: Number of rings Number of Moves 1 1 2 3 3 7 4 15 5 31 6 63 7 127

It can be seen that the number of moves taken for a given number of rings, and using only three rods, appears to follow the patter 2n 1, where n is the number of rings. Curiously, the number of steps needed also forms a recursive relationship. If we let M(n) be the number of moves needed to solve the towers for n rings, then M(n+1) = 2M(n) +1. Using this recursive relationship, we can then prove the formulae M(n) = 2n 1 by using induction. M(1) = 1 = 21-1

Assuming M(n) = 2n 1, show for M(n+1) M(n+1) = M(n+1) = 2M(n) +1 = 2*(2n 1) +1 = 2*2n 2 +1 = 2*2n 1 = 2n+1-1 setup recursive relationship assumption distributive arithmetic arithmetic

This puzzle is still seen quite often today. It can be bought in stores as a childrens toy, but much more important, it serves as a problem in many computer programming courses due to the recursive relationship found in the puzzle. Going back to legend, its easy enough to see that we dont need to worry about the world ending anytime soon. With 64 rings, it would take 264 1 moves. Thats 18,446,744,073,709,551,615 moves. Even moving one ring per second every second, with no mistakes, it would take them approximately 584,942,417,355 years! A serious look at probability was begun by Fermat and Pascal in the 17th century. Gambling had, of course, existed for a very long time before this, but had some how managed to escape serious contemplation from mathematicians (Kraitchik117). However, with the continued rise of Casinos and gambling dens, the ability to analyze the probabilities involved in many of the games and pastimes has become more and more important, if for no other reason than to convince yourself not to gamble! Here, we shall examine a single bet in the game of craps. Craps involves the rolling of two dice. If the sum of the dice is a 7 or an 11, then the person rolling wins. If they roll a 2, 3 or 12, they lose. If they roll any other number (i.e. 4,5,6,8,9,10) then they

must roll again. They win if they roll the exact same number as the previous toss. They lose if they roll a seven. They must continue rolling until they roll the seven or the initial roll again. Knowing this, let us now examine the probabilities involved. For a given pair of dice, there are 36 different possible combinations (6 possibilities for the 1st die, and 6 for the second). However, since we are interested in only the sum of the dice, many of these are not unique. The result will take the form of a number between 2 and 12 inclusive. There is only one way to get a 2 (a one and a one), and one way to get a 12 (again a one and a one). Examining all possible outcomes yields the following table. Dice sum Frequency 2 1 3 2 4 3 5 4 6 5 7 6 8 5 9 4 10 3 11 2 12 1

Thus, the probability of rolling a given sum is simply the frequency of that sum, divided by 36. Now, on the initial roll, our player wins if they roll a 7 or an 11. Therefore, to determine their chance of winning on the initial roll, we add the probability of rolling a 7 to that of rolling an 11, yielding a probability of 2/9. They lose on a 2,3, or a 12. A similar line of reasoning finds the probability of losing on the initial roll to be 1/9. Now, where this becomes more interesting is the case where they roll any other number. Since this is the only possible case, we see that this will happen 2/3 of the time. The outcome of the first roll can be seen in the following table. Roll 2 3 4 5 6 7 8 Probability 1/36 1/18 1/12 1/9 5/36 1/6 5/36 Outcome Loss Loss Roll again Roll again Roll again Win Roll again

9 10 11 12

1/9 1/12 1/18 1/36

Roll again Roll again Win Loss

Now, for each of the roll agains we must examine what would happen on consecutive rolls. The probability of rolling the same number again before rolling a 7 is the ratio of the frequency of the roll to the sum of the frequencies of the roll and 7. Thus, to see the probability of winning with a given roll again number, we simply multiply the probability of rolling that number by the probability of rolling it before a 7 (Kraitchik 124).

Roll 4 5 6 8 9 10

Frequency 3 4 5 5 4 3

Prob. Of rolling this before a 7 1/3 2/5 5/11 5/11 2/5 1/3

Prob of rolling this and rolling it again before a 7 1/36 2/45 25/396 25/396 2/45 1/36

Therefore, the total probability of winning is just the sum of all of these added to the 2/9 that we already have. This yields 244/495, or approximately .4929. The odds of losing are simply 1 this, which yields 251/495, or .5071. For Vegas, these are very good odds! A magic square is a number of integers, arranged in the shape of a square, where all the rows, columns, and two main diagonals add up to the same number. A normal magic square is one that uses the first n2 distinct integers (Kraitchik 143). Magic squares, for the most part, have been used in foretelling the future, mystic ceremonies, and were often associated with the planets. It wasnt until the 17th century that the mathematical theory of magic squares was taken up in France (Ball 138). Even Benjamin Franklin

studied these fascinating bits of mathematical trivia, constructing his own. While being of little practical value, the study of magic squares has existed for a very long time. The exact origin of the magic square is unknown, but most scholars believe it originated in Chine. Tradition has it that the emperor Yu was standing at the edge of a river (approximately 2200 BC), when a tortoise appeared with these symbols upon its back (PBS).

drawing by Linda Braatz-Brown (http://mathforum.org/alejandre/magic.square/loshu.html) If we convert the rendition into a square, we have 4 3 8 9 5 1 2 7 6

One can see, that while this square is normal magic square as it uses the first n2 integers (in this case one through 9), and that each row, column, and main diagonal add up to the same number, 15. 4+9+2=15 4+3+8=15 3+5+7=15 9+5+1=15 8+1+6=15 2+7+6=15 4+5+7=15 2+5+8=15

It is clear that an order 1 (order referring to the dimensions of the square, i.e. n x n) is trivial, as any number put by itself always adds up to itself. It is trivial. However, one can also see that there are no normal magic squares of order two, as no combination of the numbers one through four will yield a magic square. There is, in affect, only one magic square of order three, even though there are 8 different permutations of the numbers used, they are all only transformations of the single basic square. There are 880 fourth order magic squares (Ball 146). There are 275305224 distinct magic squares of order 5, it is estimated that there are approximately 1.7745x 1019 magic squares of order 6, and it is unknown how many there are beyond order 6 (Weisstein). There are several methods for the construction of magic squares, ranging from the simple, to the overly complex, but here we shall examine a simple method for constructing a normal magic square of odd order (n = 2m+1, where m is a positive integer), due to the mathematician De La Loubere. To start, simply place a one in the top middle cell of the square. Then, move one cell up, and one to the right, and place a two. Again, move up one, and one to the right, and place the next number. When you cross the edge of the square, continue on as if you were looping to the other side, right to left, and top to bottom. When you finally reach a cell where there is already a number, place your next entry directly below your current entry and continue on your way until every

cell in the square has been filled (Ball 139). Here is an example of an order seven normal magic square constructed using this method. 30 38 46 5 13 21 22 39 47 6 14 15 23 31 48 7 8 16 24 32 40 1 9 17 25 33 41 49 10 18 26 34 42 43 2 19 27 35 36 44 3 11 28 29 37 45 4 12 20

Here, each row, column, and main diagonal sum to 175. In fact, the sum of the rows, columns, and main diagonal of a normal magic square is of the form (1/2)*n*(n2+1) (Kraitchik 143). Checking this against the 3rd order magic square, we have (1/2)*3*(9+1) = (1/2)*3*(10) = 5*3 = 15. Against the order seven, (1/2)*7*(49+1) = (1/2)*7*(50) = 7*25 = 175. In addition to normal magic squares, there are many other types of magic squares that people study. Included in these are pandiagonal squares, which in addition to being normally magic, the broken diagonals also add up to that ever so important sum. Doubly magic squares are those magic squares that when each cells entry is squared, it forms another magic square. Trebly magic squares are doubly magic squares that are also magic squares when every original entry is cubed (Ball 158). These are also known as bimagic and trimagic respectively (Kraitchik 144). Currently, study of these subjects has branched out into three-dimensional shapes such as magic cubes. According to Harvey Heinz at http://www.geocities.com/~harveyh/, on February 3rd 2003, an order 256 trimagic cube was produced, where all orthogonal planes are trimagic squares, using the numbers from 0 to 16,777,215!

A very popular childrens puzzle, even today, is based on a simple sliding squares puzzle made famous by the mathematician puzzle creator Sam Loyd. The puzzle is simply a square box, holding 15 numbered square tiles. The box is just big enough to hold 4 rows of 4 tiles each. To set up the game, you simply place the fifteen tiles randomly into the box, and then, by only sliding the tiles back and forth, or up and down, to rearrange them into numerical order. Table a shows an example starting position, and table b shows the goal, or finish state of the game. a 12 11 2 10 9 4 13 5 6 3 14 1 7 8 15 1 5 9 13 b 2 6 10 14 3 4 7 8 11 12 15

For example, from a, one could move the 8 tile down, and then move the 7 across, and so on and so forth, until, hopefully, you arrive at b. A cursory examination shows that, if we leave the bottom right cell empty, are 15! different possible initial states for the game. (this from there being a choice of 15 tiles for the 1st spot, 14 for the second, etc.) This puzzle can be examined from the perspective of permutations. Let us take a set of numbers, and assign them a normal order, say 1234. Now, we shall put them in an arbitrary order, 3214. Any pair of numbers that are not in their normal order are called inversions. Here, 32, 31, and 21 are all inversions. The total number of inversions of a set can be found by examining each number, and counting how many numbers that normally go before it, now come after it. In our example, 1 and 2 both come after 3, yielding 2 inversions. 1 comes after 2, yielding another inversion, and both 1 and 4 add

no more inversions, for a total of three inversions (Kraitchik 305). The crux of the 15 puzzle, is the simple fact that due to the design of the game, only even permutations are solvable. Thus, fully half of the available initial states are unsolvable. This can be seen from the simple fact that to return the blank spot to the bottom right corner will require a canceling move for every move that it makes. Thus it will have made an even number of moves. An odd number would result in it not quite making it back to the corner. Going back to a , we can determine if this initial state is solvable. We can count the number of inversions for the puzzle. 12 9,6,3,11,4,1,2,7,8,10,5 3 1,2 10 75 50 9 6,3,4,1,2,7,8,5 11 4,1,2,7,8,10,5 20 85 15 0 6 3,4,1,2,5 14 1,2,13,7,8,10,5 13 7,8,10,5 10 5

Thus, there are a total of 47 inversions. Therefore, this initial setup is unsolvable. What truly made this game so famous was the reward offered if anyone could solve the 14-15 puzzle variant. Loyd offered a reward of $1,000 if anyone could solve the puzzle given the simple setup of 1 5 9 13 2 6 10 15 3 4 7 8 11 12 14

The reward generated a fervor that was not to be matched until the advent of the Rubiks cube. Hundreds of Thousands of the toys were bought, spanning across the U.S. and Europe. However, no one able to solve it. Since this starting point only has one inversion, there is no solution! Did Loyd know this when he offered the reward? Given his knowledge and talent, it is almost certain that the sly old fox did.

Mathematics has rapidly evolved in the last hundred years, based in a significant part on the principles contained in many of the games and puzzles of the 18th and 19th century. The principles in the permutation games such as the Towers of Hanoi and the 15 puzzle are still used in computer science, and more importantly can be seen in many aspects of basic cryptography. The Schoolgirl problem posed by Kirkman helped give rise to combinatorics, and the puzzle of the 7 bridges of Konigsburg helped bring about graph theory and the beginnings of topology (Ball 193). Probability and Statistics are some of the most used fields of mathematic today. One simply cannot dismiss the games, puzzles, riddles, and questions that are present today. For who knows what they will give rise to in another hundred years.

Sources: Ball, W W Rouse Mathematical Recreations and Essays, MacMillon and Co., Limited ST Martins Street, London 1931 Kraitchik, Maurice Mathematical Recreations, Dover Publications Inc. 1780 Broadway, New York 19, N.Y. 1953 PBS http://www.pbs.org/teachersource Weisstein http://mathworld.wolfram.com/MagicSquare.html

Note: Both Kraitchik and Rouse were active during the time period that I am writing about, and could serve as the primary source. However, Rouse was slightly earlier, and thus I am considering him as my primary source.