Amusements in Mathematics

Chapter 19

Chapter 194,030 wordsPublic domain

Mr. Stubbs then left 8, 11, 3; Mr. Wilson, 8, 5, 3; Mr. Stubbs, 6, 5, 3; Mr. Wilson,4, 5, 3; Mr. Stubbs, 4, 5, 1; Mr. Wilson, 4, 3, 1; Mr. Stubbs, 2, 3, 1; Mr. Wilson, 2, 1, 1; which Mr. Stubbs reduced to 1, 1, 1.

"It is now quite clear that I must win," said Mr. Stubbs, because you must take 1, and then I take 1, leaving you the last match. You never had a chance. There are just thirteen different ways in which the matches may be grouped at the start for a certain win. In fact, the groups selected, 14, 11, 5, are a certain win, because for whatever your opponent may play there is another winning group you can secure, and so on and on down to the last match."

397.--THE MONTENEGRIN DICE GAME.

It is said that the inhabitants of Montenegro have a little dice game that is both ingenious and well worth investigation. The two players first select two different pairs of odd numbers (always higher than 3) and then alternately toss three dice. Whichever first throws the dice so that they add up to one of his selected numbers wins. If they are both successful in two successive throws it is a draw and they try again. For example, one player may select 7 and 15 and the other 5 and 13. Then if the first player throws so that the three dice add up 7 or 15 he wins, unless the second man gets either 5 or 13 on his throw.

The puzzle is to discover which two pairs of numbers should be selected in order to give both players an exactly even chance.

398.--THE CIGAR PUZZLE.

I once propounded the following puzzle in a London club, and for a considerable period it absorbed the attention of the members. They could make nothing of it, and considered it quite impossible of solution. And yet, as I shall show, the answer is remarkably simple.

Two men are seated at a square-topped table. One places an ordinary cigar (flat at one end, pointed at the other) on the table, then the other does the same, and so on alternately, a condition being that no cigar shall touch another. Which player should succeed in placing the last cigar, assuming that they each will play in the best possible manner? The size of the table top and the size of the cigar are not given, but in order to exclude the ridiculous answer that the table might be so diminutive as only to take one cigar, we will say that the table must not be less than 2 feet square and the cigar not more than 4½ inches long. With those restrictions you may take any dimensions you like. Of course we assume that all the cigars are exactly alike in every respect. Should the first player, or the second player, win?

MAGIC SQUARE PROBLEMS.

"By magic numbers." CONGREVE, _The Mourning Bride._

This is a very ancient branch of mathematical puzzledom, and it has an immense, though scattered, literature of its own. In their simple form of consecutive whole numbers arranged in a square so that every column, every row, and each of the two long diagonals shall add up alike, these magic squares offer three main lines of investigation: Construction, Enumeration, and Classification. Of recent years many ingenious methods have been devised for the construction of magics, and the law of their formation is so well understood that all the ancient mystery has evaporated and there is no longer any difficulty in making squares of any dimensions. Almost the last word has been said on this subject. The question of the enumeration of all the possible squares of a given order stands just where it did over two hundred years ago. Everybody knows that there is only one solution for the third order, three cells by three; and Frénicle published in 1693 diagrams of all the arrangements of the fourth order--880 in number--and his results have been verified over and over again. I may here refer to the general solution for this order, for numbers not necessarily consecutive, by E. Bergholt in _Nature_, May 26, 1910, as it is of the greatest importance to students of this subject. The enumeration of the examples of any higher order is a completely unsolved problem.

As to classification, it is largely a matter of individual taste--perhaps an æsthetic question, for there is beauty in the law and order of numbers. A man once said that he divided the human race into two great classes: those who take snuff and those who do not. I am not sure that some of our classifications of magic squares are not almost as valueless. However, lovers of these things seem somewhat agreed that Nasik magic squares (so named by Mr. Frost, a student of them, after the town in India where he lived, and also called Diabolique and Pandiagonal) and Associated magic squares are of special interest, so I will just explain what these are for the benefit of the novice.

I published in _The Queen_ for January 15, 1910, an article that would enable the reader to write out, if he so desired, all the 880 magics of the fourth order, and the following is the complete classification that I gave. The first example is that of a Simple square that fulfils the simple conditions and no more. The second example is a Semi-Nasik, which has the additional property that the opposite short diagonals of two cells each together sum to 34. Thus, 14 + 4 + 11 + 5 = 34 and 12 + 6 + 13 + 3 = 34. The third example is not only Semi-Nasik but also Associated, because in it every number, if added to the number that is equidistant, in a straight line, from the centre gives 17. Thus, 1 + 16, 2 + 15, 3 + 14, etc. The fourth example, considered the most "perfect" of all, is a Nasik. Here all the broken diagonals sum to 34. Thus, for example, 15 + 14 + 2 + 3, and 10 + 4 + 7 + 13, and 15 + 5 + 2 + 12. As a consequence, its properties are such that if you repeat the square in all directions you may mark off a square, 4 × 4, wherever you please, and it will be magic.

The following table not only gives a complete enumeration under the four forms described, but also a classification under the twelve graphic types indicated in the diagrams. The dots at the end of each line represent the relative positions of those complementary pairs, 1 + 16, 2 + 15, etc., which sum to 17. For example, it will be seen that the first and second magic squares given are of Type VI., that the third square is of Type III., and that the fourth is of Type I. Edouard Lucas indicated these types, but he dropped exactly half of them and did not attempt the classification.

NASIK (Type I.) . . . . . 48 SEMI-NASIK (Type II., Transpositions of Nasik) . 48 " (Type III., Associated) 48 " (Type IV.) . . . 96 " (Type V.) . . . 96 192 ___ " (Type VI.) . . . 96 384 ___ SIMPLE. (Type VI.) . . . 208 " (Type VII.) . . . 56 " (Type VIII.). . . 56 " (Type IX.) . . . 56 " (Type X.) . . . 56 224 ___ " (Type XI.) . . . 8 " (Type XII.) . . . 8 16 448 ___ ___ ___ 880 ___

It is hardly necessary to say that every one of these squares will produce seven others by mere reversals and reflections, which we do not count as different. So that there are 7,040 squares of this order, 880 of which are fundamentally different.

An infinite variety of puzzles may be made introducing new conditions into the magic square. In _The Canterbury Puzzles_ I have given examples of such squares with coins, with postage stamps, with cutting-out conditions, and other tricks. I will now give a few variants involving further novel conditions.

399.--THE TROUBLESOME EIGHT.

Nearly everybody knows that a "magic square" is an arrangement of numbers in the form of a square so that every row, every column, and each of the two long diagonals adds up alike. For example, you would find little difficulty in merely placing a different number in each of the nine cells in the illustration so that the rows, columns, and diagonals shall all add up 15. And at your first attempt you will probably find that you have an 8 in one of the corners. The puzzle is to construct the magic square, under the same conditions, with the 8 in the position shown.

400.--THE MAGIC STRIPS.

I happened to have lying on my table a number of strips of cardboard, with numbers printed on them from 1 upwards in numerical order. The idea suddenly came to me, as ideas have a way of unexpectedly coming, to make a little puzzle of this. I wonder whether many readers will arrive at the same solution that I did.

Take seven strips of cardboard and lay them together as above. Then write on each of them the numbers 1, 2, 3, 4, 5, 6, 7, as shown, so that the numbers shall form seven rows and seven columns.

Now, the puzzle is to cut these strips into the fewest possible pieces so that they may be placed together and form a magic square, the seven rows, seven columns, and two diagonals adding up the same number. No figures may be turned upside down or placed on their sides--that is, all the strips must lie in their original direction.

Of course you could cut each strip into seven separate pieces, each piece containing a number, and the puzzle would then be very easy, but I need hardly say that forty-nine pieces is a long way from being the fewest possible.

401.--EIGHT JOLLY GAOL BIRDS.

The illustration shows the plan of a prison of nine cells all communicating with one another by doorways. The eight prisoners have their numbers on their backs, and any one of them is allowed to exercise himself in whichever cell may happen to be vacant, subject to the rule that at no time shall two prisoners be in the same cell. The merry monarch in whose dominions the prison was situated offered them special comforts one Christmas Eve if, without breaking that rule, they could so place themselves that their numbers should form a magic square.

Now, prisoner No. 7 happened to know a good deal about magic squares, so he worked out a scheme and naturally selected the method that was most expeditious--that is, one involving the fewest possible moves from cell to cell. But one man was a surly, obstinate fellow (quite unfit for the society of his jovial companions), and he refused to move out of his cell or take any part in the proceedings. But No. 7 was quite equal to the emergency, and found that he could still do what was required in the fewest possible moves without troubling the brute to leave his cell. The puzzle is to show how he did it and, incidentally, to discover which prisoner was so stupidly obstinate. Can you find the fellow?

402.--NINE JOLLY GAOL BIRDS.

Shortly after the episode recorded in the last puzzle occurred, a ninth prisoner was placed in the vacant cell, and the merry monarch then offered them all complete liberty on the following strange conditions. They were required so to rearrange themselves in the cells that their numbers formed a magic square without their movements causing any two of them ever to be in the same cell together, except that at the start one man was allowed to be placed on the shoulders of another man, and thus add their numbers together, and move as one man. For example, No. 8 might be placed on the shoulders of No. 2, and then they would move about together as 10. The reader should seek first to solve the puzzle in the fewest possible moves, and then see that the man who is burdened has the least possible amount of work to do.

403.--THE SPANISH DUNGEON.

Not fifty miles from Cadiz stood in the middle ages a castle, all traces of which have for centuries disappeared. Among other interesting features, this castle contained a particularly unpleasant dungeon divided into sixteen cells, all communicating with one another, as shown in the illustration.

Now, the governor was a merry wight, and very fond of puzzles withal. One day he went to the dungeon and said to the prisoners, "By my halidame!" (or its equivalent in Spanish) "you shall all be set free if you can solve this puzzle. You must so arrange yourselves in the sixteen cells that the numbers on your backs shall form a magic square in which every column, every row, and each of the two diagonals shall add up the same. Only remember this: that in no case may two of you ever be together in the same cell."

One of the prisoners, after working at the problem for two or three days, with a piece of chalk, undertook to obtain the liberty of himself and his fellow-prisoners if they would follow his directions and move through the doorway from cell to cell in the order in which he should call out their numbers.

He succeeded in his attempt, and, what is more remarkable, it would seem from the account of his method recorded in the ancient manuscript lying before me, that he did so in the fewest possible moves. The reader is asked to show what these moves were.

404.--THE SIBERIAN DUNGEONS.

The above is a trustworthy plan of a certain Russian prison in Siberia. All the cells are numbered, and the prisoners are numbered the same as the cells they occupy. The prison diet is so fattening that these political prisoners are in perpetual fear lest, should their pardon arrive, they might not be able to squeeze themselves through the narrow doorways and get out. And of course it would be an unreasonable thing to ask any government to pull down the walls of a prison just to liberate the prisoners, however innocent they might be. Therefore these men take all the healthy exercise they can in order to retard their increasing obesity, and one of their recreations will serve to furnish us with the following puzzle.

Show, in the fewest possible moves, how the sixteen men may form themselves into a magic square, so that the numbers on their backs shall add up the same in each of the four columns, four rows, and two diagonals without two prisoners having been at any time in the same cell together. I had better say, for the information of those who have not yet been made acquainted with these places, that it is a peculiarity of prisons that you are not allowed to go outside their walls. Any prisoner may go any distance that is possible in a single move.

405.--CARD MAGIC SQUARES.

Take an ordinary pack of cards and throw out the twelve court cards. Now, with nine of the remainder (different suits are of no consequence) form the above magic square. It will be seen that the pips add up fifteen in every row in every column, and in each of the two long diagonals. The puzzle is with the remaining cards (without disturbing this arrangement) to form three more such magic squares, so that each of the four shall add up to a different sum. There will, of course, be four cards in the reduced pack that will not be used. These four may be any that you choose. It is not a difficult puzzle, but requires just a little thought.

406.--THE EIGHTEEN DOMINOES.

The illustration shows eighteen dominoes arranged in the form of a square so that the pips in every one of the six columns, six rows, and two long diagonals add up 13. This is the smallest summation possible with any selection of dominoes from an ordinary box of twenty-eight. The greatest possible summation is 23, and a solution for this number may be easily obtained by substituting for every number its complement to 6. Thus for every blank substitute a 6, for every 1 a 5, for every 2 a 4, for 3 a 3, for 4 a 2, for 5 a 1, and for 6 a blank. But the puzzle is to make a selection of eighteen dominoes and arrange them (in exactly the form shown) so that the summations shall be 18 in all the fourteen directions mentioned.

SUBTRACTING, MULTIPLYING, AND DIVIDING MAGICS.

Although the adding magic square is of such great antiquity, curiously enough the multiplying magic does not appear to have been mentioned until the end of the eighteenth century, when it was referred to slightly by one writer and then forgotten until I revived it in _Tit-Bits_ in 1897. The dividing magic was apparently first discussed by me in _The Weekly Dispatch_ in June 1898. The subtracting magic is here introduced for the first time. It will now be convenient to deal with all four kinds of magic squares together.

In these four diagrams we have examples in the third order of adding, subtracting, multiplying, and dividing squares. In the first the constant, 15, is obtained by the addition of the rows, columns, and two diagonals. In the second case you get the constant, 5, by subtracting the first number in a line from the second, and the result from the third. You can, of course, perform the operation in either direction; but, in order to avoid negative numbers, it is more convenient simply to deduct the middle number from the sum of the two extreme numbers. This is, in effect, the same thing. It will be seen that the constant of the adding square is n times that of the subtracting square derived from it, where n is the number of cells in the side of square. And the manner of derivation here is simply to reverse the two diagonals. Both squares are "associated"--a term I have explained in the introductory article to this department.

The third square is a multiplying magic. The constant, 216, is obtained by multiplying together the three numbers in any line. It is "associated" by multiplication, instead of by addition. It is here necessary to remark that in an adding square it is not essential that the nine numbers should be consecutive. Write down any nine numbers in this way--

1 3 5 4 6 8 7 9 11

so that the horizontal differences are all alike and the vertical differences also alike (here 2 and 3), and these numbers will form an adding magic square. By making the differences 1 and 3 we, of course, get consecutive numbers--a particular case, and nothing more. Now, in the case of the multiplying square we must take these numbers in geometrical instead of arithmetical progression, thus--

1 3 9 2 6 18 4 12 36

Here each successive number in the rows is multiplied by 3, and in the columns by 2. Had we multiplied by 2 and 8 we should get the regular geometrical progression, 1, 2, 4, 8, 16, 32, 64, 128, and 256, but I wish to avoid high numbers. The numbers are arranged in the square in the same order as in the adding square.

The fourth diagram is a dividing magic square. The constant 6 is here obtained by dividing the second number in a line by the first (in either direction) and the third number by the quotient. But, again, the process is simplified by dividing the product of the two extreme numbers by the middle number. This square is also "associated" by multiplication. It is derived from the multiplying square by merely reversing the diagonals, and the constant of the multiplying square is the cube of that of the dividing square derived from it.

The next set of diagrams shows the solutions for the fifth order of square. They are all "associated" in the same way as before. The subtracting square is derived from the adding square by reversing the diagonals and exchanging opposite numbers in the centres of the borders, and the constant of one is again n times that of the other. The dividing square is derived from the multiplying square in the same way, and the constant of the latter is the 5th power (that is the nth) of that of the former.

These squares are thus quite easy for odd orders. But the reader will probably find some difficulty over the even orders, concerning which I will leave him to make his own researches, merely propounding two little problems.

407.--TWO NEW MAGIC SQUARES.

Construct a subtracting magic square with the first sixteen whole numbers that shall be "associated" by _subtraction_. The constant is, of course, obtained by subtracting the first number from the second in line, the result from the third, and the result again from the fourth. Also construct a dividing magic square of the same order that shall be "associated" by _division_. The constant is obtained by dividing the second number in a line by the first, the third by the quotient, and the fourth by the next quotient.

408.--MAGIC SQUARES OF TWO DEGREES.

While reading a French mathematical work I happened to come across, the following statement: "A very remarkable magic square of 8, in two degrees, has been constructed by M. Pfeffermann. In other words, he has managed to dispose the sixty-four first numbers on the squares of a chessboard in such a way that the sum of the numbers in every line, every column, and in each of the two diagonals, shall be the same; and more, that if one substitutes for all the numbers their squares, the square still remains magic." I at once set to work to solve this problem, and, although it proved a very hard nut, one was rewarded by the discovery of some curious and beautiful laws that govern it. The reader may like to try his hand at the puzzle.

MAGIC SQUARES OF PRIMES.

The problem of constructing magic squares with prime numbers only was first discussed by myself in _The Weekly Dispatch_ for 22nd July and 5th August 1900; but during the last three or four years it has received great attention from American mathematicians. First, they have sought to form these squares with the lowest possible constants. Thus, the first nine prime numbers, 1 to 23 inclusive, sum to 99, which (being divisible by 3) is theoretically a suitable series; yet it has been demonstrated that the lowest possible constant is 111, and the required series as follows: 1, 7, 13, 31, 37, 43, 61, 67, and 73. Similarly, in the case of the fourth order, the lowest series of primes that are "theoretically suitable" will not serve. But in every other order, up to the 12th inclusive, magic squares have been constructed with the lowest series of primes theoretically possible. And the 12th is the lowest order in which a straight series of prime numbers, unbroken, from 1 upwards has been made to work. In other words, the first 144 odd prime numbers have actually been arranged in magic form. The following summary is taken from _The Monist_ (Chicago) for October 1913:--

Order of Totals of Lowest Squares Square. Series. Constants. made by-- (Henry E. 3rd 333 111 { Dudeney ( (1900).

(Ernest Bergholt 4th 408 102 { and C. D. ( Shuldham.

5th 1065 213 H. A. Sayles.

(C. D. Shuldham 6th 2448 408 { and J. ( N. Muncey.

7th 4893 699 do. 8th 8912 1114 do. 9th 15129 1681 do. 10th 24160 2416 J. N. Muncey. 11th 36095 3355 do. 12th 54168 4514 do.

For further details the reader should consult the article itself, by W. S. Andrews and H. A. Sayles.

These same investigators have also performed notable feats in constructing associated and bordered prime magics, and Mr. Shuldham has sent me a remarkable paper in which he gives examples of Nasik squares constructed with primes for all orders from the 4th to the 10th, with the exception of the 3rd (which is clearly impossible) and the 9th, which, up to the time of writing, has baffled all attempts.

409.--THE BASKETS OF PLUMS.