PG26839.B00101
[PDF page 100] 84 MECHANICAL RECREATIONS. [CH. III through its centre of figure, and the friction of the surface of the ball on the air produces a sort of whirlpool. This rotation is in addition to its motion of translation. Suppose the ball to be spherical and rotat- ing about an axis through its centre perpendicular to the plane of the paper in the direction of the arrow-head, and at the same time moving through still air from left to right parallel toP Q. Any motion of the ball perpendicular to P Q will be produced by the pressure of the air on the surface of the ball, and this pressure will, by Hauksbee’s Law, be greatest where the velocity of the air relative to the ball is least, and vice versa. To find the velocity of the air relative to the ball we may reduce the centre of the ball to rest, and suppose a stream of air to impinge on the surface of the ball moving with a velocity equal and opposite to that of the centre of the ball. The air is not frictionless, and therefore the air in contact with the surface of the ball will be set in motion, by the rotation of the ball and will form a sort of whirlpool rotating in the direction of the arrow-head in the figure. To find the actual velocity of this air relative to the ball we must consider how the motion due to the whirlpool is affected by the motion of the stream of air parallel toQP. The air atA in the whirlpool is moving against the stream of air there, and therefore its velocity is retarded: the air at B in the whirlpool is moving in the same direction as the stream of air there, and therefore its velocity is increased. Hence the relative velocity of the air atA is less than that atB, and since the pressure of the air is greatest where the velocity is least, the pressure of the air on the surface of the ball atA is greater than on that at B, Hence the ball is forced by this pressure in the direction from the lineP Q, P Q A B which we may suppose to represent the section of the vertical wall in Akademie der Wissenschaften, Berlin, 1852, pp. 1–23; Lord Rayleigh, ‘On the irregular flight of a tennis ball,’Messenger of Mathematics, Cambridge, 1878, vol. vii, pp. 14–16.

PG26839.B00102
[PDF page 101] CH. III] FLIGHT OF BIRDS. 85 a racquet-court. In other words, the ball tends to move at right angles to the line in which its centre is moving and in the direction in which the surface of the front of the ball is being carried by the rotation. In the case of a lawn tennis-ball, the shape of the ball is altered by a strong cut, and this introduces additional complications. Spin on a Cricket-Ball. The curl of a cricket-ball in its flight through the air, caused by a spin given by the bowler in delivering the ball, is explained by the same reasoning. Thus suppose the ball is delivered in a direction lying in a vertical plane containing the two middle stumps of the wickets. A spin round a horizontal axis parallel to the crease in a direction which the bowler’s umpire would describe as positive, namely, counter clock-wise, will, in consequence of the friction of the air, cause it to drop, and therefore decrease the length of the pitch. A spin in the opposite direction will cause it to rise, and therefore lengthen the pitch. A spin round a vertical axis in the positive direction, as viewed from above, will make it curl sideways in the air to the left, that is, from leg to off. A spin in the opposite direction will make it curl to the right. A spin given to the ball round the direction of motion of the centre of the ball will not sensibly affect the motion through the air, though it would cause the ball, on hitting the ground, to break. Of course these various kinds of spin can be combined. The questions involving the application of Hauksbee’s Law are easy as compared with many of the problems in fluid motion. The analy- sis required to attack most of these problems is beyond the scope of this book, but one of them may be worth mentioning even though no explanation is given. The Theory of the Flight of Birds.A mechanical problem of great interest is the explanation of the means by which birds are enabled to fly for considerable distances with no (perceptible) motion of the wings. Albatrosses, to take an instance of special difficulty, have been known to follow for some days ships running at the rate of nine or ten knots, and sometimes for considerable periods there is no motion of the wings or body which can be detected, while even if the bird moved its wings it is not easy to understand how it has the muscular energy to propel itself so rapidly and for such a length of time. Of this phenomenon

PG26839.B00103
[PDF page 102] 86 MECHANICAL RECREATIONS. [CH. III various explanations* have been suggested. Notable among these are Mr Maxim’s of upward air-currents, Lord Rayleigh’s of variations of the wind velocity at different heights above the ground, Dr S.P. Langley’s of the incessant occurrence of gusts of wind separated by lulls, and Dr Bryan’s of vortices in the atmosphere. It now seems reasonably certain that the second and third of these sources of energy account for at least a portion of the observed phenom- ena. The effect of the third cause may be partially explained by noting that the centre of gravity of the bird with extended wings is slightly below the aeroplane or wing surface, so that the animal forms a sort of parachute. The effect of a sudden gust of wind upon such a body is that the aeroplane is set in motion more rapidly than the suspended mass, causing the structure to heel over so as to receive the wind on the under surface of the aeroplane, and this lifts the suspended mass giving it an upward velocity. When the wind falls the greater inertia of the mass carries it on upwards causing the aeroplane to again present its under side to the air; and if while the parachute is in this position the wind is still blowing from the side, the suspended mass is again lifted. Thus the more the bird is blown about, the more it rises in the air; actually birds in flight are carried up by a sudden side gust of wind as we should expect from this theory. The fact that the bird is in motion tends also to keep it up, for it has been recently shown that a horizontal plane under the action of gravity falls to the ground more slowly if it is travelling through the air with horizontal velocity than it would do if allowed to fall vertically, hence the bird’s forward motion causes it to fall through a smaller height between successive gusts of wind than it would do if it were at rest, Moreover it has been proved experimentally that the horsepower required to support a body in horizontal flight by means of an aeroplane is less for high than for low speeds: hence when a side-wind (that is, a wind at right angles to the bird’s course) strikes the bird, the lift is increased in consequence of the bird’s forward velocity. Curiosa Physica. When I was writing the first edition of these “Recreations,” I put together a chapter, following this one, on “Some Physical Questions,” dealing with problems such as, in the Theory of * See G.H. Bryan in the Transactions of the British Association for 1896, vol. lxvi, pp. 726-728.

PG26839.B00104
[PDF page 103] CH. III] CURIOSA PHYSICA. 87 Sound, the explanation of the fact that in some of Captain Parry’s ex- periments the report of a cannon, when fired, travelled so much more rapidly than the sound of the human voice that observers heard the report of the cannon when fired before that of the order to fire it*: in the Kinetic Theory of Gases, the complications in our universe that might be produced by “Maxwell’s demon”†: in the Theory of Optics, the explanation of the Japanese “magic mirrors,”‡which reflect the pat- tern on the back of the mirror (on which the light does not fall): to which I might add the theory of the “spectrum top,” by means of which a white surface, on which some black lines are drawn, can be moved so as to give the impression§ that the lines are coloured (red, green, blue, slate, or drab), and the curious fact that the colours change with the direction of rotation: it has also been recently shown that if two trains of waves, whose lengths are in the ratiom − 1 : m + 1, be superposed, then every mth wave in the system will be big—thus the current opin- ion that every ninth wave in the open sea is bigger than the other waves may receive scientific confirmation. There is no lack of interesting and curious phenomena in physics, and in some branches, notably in elec- tricity and magnetism, the difficulty is rather one of selection, but I felt that the connection with mathematics was in general either too remote or too technical to justify the insertion of such a collection in a work on elementary mathematical recreations, and therefore I struck out the chapter. I mention the fact now partly to express the hope that some physicist will one day give us a collection of the kind, partly to suggest these questions to those who are interested in such matters. * The fact is well authenticated. Mr Earnshaw (Philosophical Transactions, Lon- don, 1860, pp. 133–148) explained it by the acceleration of a wave caused by the formation of a kind of bore, a view accepted by Clerk Maxwell and most physicists, but Sir George Airy thought that the explanation was to be found in physiology; see Airy’sSound, second edition, London, 1871, pp. 141, 142. † See Theory of Heat, by J. Clerk Maxwell, second edition, London, 1872, p. 308. ‡ See a memoir by W.E. Ayrton and J. Perry,Proceedings of the Royal Society of London, part i, 1879, vol.xxviii, pp. 127–148. § See letters from Mr C.E. Benham and others inNature, 1894–5; and a memoir by Prof. Liveing, Cambridge Philosophical Society, November 26, 1894.

PG26839.B00105
[PDF page 104] CHAPTER IV. SOME MISCELLANEOUS QUESTIONS. I proposeto discuss in this chapter the mathematical theory of certain of the more common mathematical amusements and games. Some of these might have been treated in the first two chapters, but, since most of them involve mixed geometry and algebra, it is rather more convenient to deal with them apart from the problems and puzzles which have been described already. This division, however, is by no means well defined, and the arrangement is based on convenience rather than on any logical distinction. The majority of the questions here enumerated have no connection one with another, and I jot them down almost at random. I shall discuss in succession theFifteen Puzzle, theTower of Hanoï, Chinese Rings, the Eight Queens Problem, the Fifteen School-Girls Problem, and some miscellaneous Problems connected with a pack of cards. The Fifteen Puzzle†. Some years ago the so-called fifteen puzzle was on sale in all toy-shops. It consists of a shallow wooden box—one side being marked as the top—in the form of a square, and contains fifteen square blocks or counters numbered1, 2, 3 . . .up to15. The box will hold just sixteen such counters, and, as it contains only fifteen, they can be moved about in the box relatively to one another. Initially they are put in the box in any order, but leaving the sixteenth † There are two articles on the subject in theAmerican Journal of Mathematics 1879, vol. ii, by Professors Woolsey Johnson and Story; but the whole theory is deducible immediately from the proposition I give above in the text. 88

PG26839.B00106
[PDF page 105] CH. IV] THE FIFTEEN PUZZLE. 89 cell or small square empty; the puzzle is to move them so that finally they occupy the position shown in the first of the annexed figures. 12 3 4 5 6 7 8 91 0 11 12 13 14 15 AB CD Bottom of Box Top of Box 214 3 6 5 8 7 10 9 12 11 13 14 15 We may represent the various stages in the game by supposing that the blank space, occupying the sixteenth cell, is moved over the board, ending finally where it started. The route pursued by the blank space may consist partly of tracks followed and again retraced, which have no effect on the arrangement, and partly of closed paths travelled round, which necessarily are cycli- cal permutations of an odd number of counters. No other motion is possible. Now a cyclical permutation ofn letters is equivalent ton−1 simple interchanges; accordingly an odd cyclical permutation is equivalent to an even number of simple interchanges. Hence, if we move the counters so as to bring the blank space back into the sixteenth cell, the new order must differ from the initial order by an even number of simple interchanges. If therefore the order we want to get can be obtained from this initial order only by an odd number of interchanges, the problem is incapable of solution; if it can be obtained by an even number, the problem is possible. Thus the order in the second of the diagrams given on the current page is deducible from that in the first diagram by six interchanges; namely, by interchanging the counters1 and 2, 3 and 4, 5 and 6, 7 and 8, 9 and 10, 11 and 12. Hence the one can be deduced from the other by moving the counters about in the box. Ifhoweverintheseconddiagramtheorderofthelastthreecounters had been 13, 15, 14, then it would have required seven interchanges of

PG26839.B00107
[PDF page 106] 90 MISCELLANEOUS MATHEMATICAL RECREATIONS. [CH. IV counters to bring them into the order given in the first diagram. Hence in this case the problem would be insoluble. The easiest way of finding the number of simple interchanges neces- sary in order to obtain one given arrangement from another is to make the transformation by a series of cycles. For example, suppose that we take the counters in the box in any definite order, such as taking the successive rows from left to right, and suppose the original order and the final order to be respectively 1, 13, 2, 3, 5, 7, 12, 8, 15, 6, 9, 4, 11, 10, 14, and 11, 2, 3, 4, 5, 6, 7, 1, 9, 10, 13, 12, 8, 14, 15. We can deduce the second order from the first by 12 simple inter- changes. The simplest way of seeing this is to arrange the process in three separate cycles as follows:— 1, 11, 8 ; 13, 2, 3, 4, 12, 7, 6, 10, 14, 15, 9 ; 5. 11, 8, 1 ; 2, 3, 4, 12, 7, 6, 10, 14, 15, 9, 13 ; 5. Thus, if in the first row of figures11 is substituted for 1, then 8 for 11, then 1 for 8, we have made a cyclical interchange of3 numbers, which is equivalent to2 simple interchanges (namely, interchanging1 and 11, and then1 and 8). Thus the whole process is equivalent to one cyclical interchange of3 numbers, another of11 numbers, and another of 1 number. Hence it is equivalent to(2 + 10 + 0)simple interchanges. This is an even number, and thus one of these orders can be deduced from the other by moving the counters about in the box. It is obvious that, if the initial order is the same as the required order except that the last three counters are in the order15, 14, 13, it would require one interchange to put them in the order13, 14, 15; hence the problem is insoluble. If however the box is turned through a right angle, so as to make AD the top, this rotation will be equivalent to13 simple interchanges. For, if we keep the sixteenth square always blank, then such a rotation would change any order such as 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, to 13, 9, 5, 1, 14, 10, 6, 2, 15, 11, 7, 3, 12, 8, 4, which is equivalent to13 simple interchanges. Hence it will change the arrangement from one in which a solution is impossible to one where it is possible, and vice versa.

PG26839.B00108
[PDF page 107] CH. IV] THE TOWER OF HANOÏ. 91 Again, even if the initial order is one which makes a solution impos- sible, yet if the first cell and not the last is left blank it will be possible to arrange the fifteen counters in their natural order. For, if we repre- sent the blank cell byb, this will be equivalent to changing the order 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, b, b, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 : this is a cyclical interchange of16 things and therefore is equivalent to 15 simple interchanges. Hence it will change the arrangement from one in which a solution is impossible to one where it is possible, and vice versa. It is evident that the above principles are applicable equally to a rectangular box containing mn cells or spaces and mn − 1 counters which are numbered. Of course m may be equal ton. If such a box is turned through a right angle, andm and n are both even, it will be equivalent tomn − 3 simple interchanges—and thus will change an impossible position to a possible one, and vice versa—but unless both m and n are even the rotation is equivalent to only an even number of interchanges. Similarly, if either m or n is even, and it is impossible to solve the problem when the last cell is left blank, then it will be possible to solve it by leaving the first cell blank. The problem may be made more difficult by limiting the possible movements by fixing bars inside the box which will prevent the move- ment of a counter transverse to their directions. We can conceive also of a similar cubical puzzle, but we could not work it practically except by sections. The Tower of Hanoï. I may mention next the ingenious puz- zle known as the Tower of Hanoï. It was brought out in 1883 by M. Claus (Lucas). It consists of three pegs fastened to a stand, and of eight circular discs of wood or cardboard each of which has a hole in the middle so that a peg can be put through it. These discs are of different radii, and initially they are placed all on one peg, so that the biggest is at the bottom, and the radii of the successive discs decrease as we ascend: thus the smallest disc is at the top. This arrangement is called the Tower. The problem is to shift the discs from one peg to another in such a way that a disc shall never rest on one smaller than itself, and

PG26839.B00109
[PDF page 108] 92 MISCELLANEOUS MATHEMATICAL RECREATIONS. [CH. IV finally to transfer the tower (i.e. all the discs in their proper order) from the peg on which they initially rested to one of the other pegs. The method of effecting this is as follows. (i) If initially there are n discs on the peg A, the first operation is to transfer gradually the top n − 1 discs from the peg A to the peg B, leaving the peg C vacant: suppose that this requiresx separate transfers. (ii) Next, move the bottom disc to the pegC. (iii) Then, reversing the first process, transfer gradually then − 1 discs from B to C, which will necessitate x transfers. Hence, if it requiresx transfers of simple discs to move a tower of n − 1 discs, then it will require2x + 1 separate transfers of single discs to move a tower ofn discs. Now with 2 discs it requires3 transfers, i.e. 22−1transfers; hence with3discs the number of transfers required will be2(22 −1) + 1, that is,23 −1. Proceeding in this way we see that with a tower ofn discs it will require2n − 1 transfers of single discs to effect the complete transfer. Thus the eight discs of the puzzle will require255 single transfers. The result can be also obtained by the theory of finite differences. It will be noticed that every alternate move consists of a transfer of the smallest disc from one peg to another, the pegs being taken in cyclical order. M. De Parville gives an account of the origin of the toy which is a sufficiently pretty conceit to deserve repetition*. In the great temple at Benares, says he, beneath the dome which marks the centre of the world, rests a brass-plate in which are fixed three diamond needles, each a cubit high and as thick as the body of a bee. On one of these needles, at the creation, God placed sixty-four discs of pure gold, the largest disc resting on the brass plate, and the others getting smaller and smaller up to the top one. This is the Tower of Bramah. Day and nightunceasinglytheprieststransferthediscsfromonediamondneedle to another according to the fixed and immutable laws of Bramah, which require that the priest must not move more than one disc at a time and that he must place this disc on a needle so that there is no smaller disc below it. When the sixty-four discs shall have been thus transferred from the needle on which at the creation God placed them to one of the other needles, tower, temple, and Brahmins alike will crumble into dust, andwithathunder-claptheworldwillvanish. WouldthatEnglish writers were in the habit of inventing equally interesting origins for the puzzles they produce! * La Nature, Paris, 1884, parti, pp. 285–286.

PG26839.B00110
[PDF page 109] CH. IV] CHINESE RINGS. 93 ThenumberofseparatetransfersofsinglediscswhichtheBrahmins must make to effect the transfer of the tower is264 − 1, that is, is 18, 446744, 073709, 551615: a number which, even if the priests never made a mistake, would require many thousands of millions of years to carry out. Chinese Rings*. A somewhat more elaborate toy, known as Chinese Rings, which is on sale in most English toy-shops, is repre- sented in the accompanying figure. It consists of a number of rings hung upon a bar in such a manner that the ring at one end (sayA) can be taken off or put on the bar at pleasure; but any other ring can be taken off or put on only when the one next to it towardsA is on, and all the rest towardsA are off the bar. The order of the rings cannot be changed. Only one ring can be taken off or put on at a time. [In the toy, as usually sold, the first two rings form an exception to the rule. Both these can be taken off or put on together. To simplify the discussion I shall assume at first that only one ring is taken off or put on at a time.] I proceed to show that, if there are n rings, then in order to * It was described by Cardan in 1550 in hisDe Subtilitate, bk. xv, paragr. 2, ed. Sponius, vol. iii, p. 587; by Wallis in hisAlgebra, second edition, 1693,Opera, vol. ii, chap. 111, pp. 472–478; and allusion is made to it also in Ozanam’s Récréations, 1723 edition, vol.iv, p. 439.

PG26839.B00111
[PDF page 110] 94 MISCELLANEOUS MATHEMATICAL RECREATIONS. [CH. IV disconnect them from the bar, it will be necessary to take a ring off or to put a ring on either1 3(2n+1 −1) times or 1 3(2n+1 −2) times according as n is odd or even. Let the taking a ring off the bar or putting a ring on the bar be called astep. It is usual to number the rings from the free endA. Let us suppose that we commence with the firstm rings off the bar and all the rest on the bar; and suppose that then it requiresx − 1 steps to take off the next ring, that is, it requiresx − 1 additional steps to arrange the rings so that the firstm + 1 of them are off the bar and all the rest are on it. Before taking these steps we can take off the (m + 2)th ring and thus it will requirex steps from our initial position to remove the(m + 1)th and (m + 2)th rings. Suppose that thesex steps have been made and that thus the first m + 2 rings are off the bar and the rest on it, and let us find how many additional steps are now necessary to take off the(m + 3)th and (m + 4)th rings. To take these off we begin by taking off the(m + 4)th ring: this requires1 step. Before we can take off the(m+3)th we must arrange the rings so that the(m + 2)th is on and the firstm + 1 rings are off: to effect this, (i) we must get the(m + 1)th ring on and the first m rings off, which requiresx − 1 steps, (ii) then we must put on the (m + 2)th ring, which requires1 step, (iii) and lastly we must take the (m + 1)th ring off, which requiresx − 1 steps: thus this series of movements requires in all{2(x − 1) + 1} steps. Next we can take the (m + 3)th ring off, which requires1 step; this leaves us with the first m + 1 rings off, the (m + 2)th on, the (m + 3)th off and all the rest on. Finally to take off the(m + 2)th ring, (i) we get the(m + 1)th ring on and the firstm rings off, which requiresx − 1 steps, (ii) we take off the (m + 2)th ring, which requires1 step, (iii) we take(m + 1)th ring off, which requiresx − 1 steps: thus this series of movements requires {2(x − 1) + 1} steps. Therefore, if when the firstm rings are off it requiresx steps to take off the(m + 1)th and (m + 2)th rings, then the number of addi- tional steps required to take off the(m + 3)th and (m + 4)th rings is 1 + {2(x − 1) + 1} + 1 + {2(x − 1) + 1}, that is, is4x. To find the whole number of steps necessary to take off an odd number of rings we proceed as follows. To take off the first ring requires 1 step; ∴ to take off the first3 rings requires 4 additional steps; ∴ " " 5 " " 42 " " .

PG26839.B00112
[PDF page 111] CH. IV] CHINESE RINGS. 95 In this way we see that the number of steps required to take off the first 2n + 1rings is1 + 4 + 42 + · · ·+ 4n, which is equal to1 3(22n+2 − 1). To find the number of steps necessary to take off an even number of rings we proceed in a similar manner. To take off the first2 rings requires 2 steps; ∴ to take off the first 4 rings requires 2 × 4 additional steps; ∴ " " 6 " " 2 × 42 " " . In this way we see that the number of steps required to take off the first 2n rings is2 + (2× 4) + (2× 42) + · · ·+ (2 × 4n−1), which is equal to 1 3(22n+1 − 2). If we take off or put on the first two rings in one step instead of two separate steps, these results become respectively22n and 22n−1 −1. I give the above analysis because it is the direct solution of a prob- lem attacked by Cardan in 1550 and by Wallis in 1693—in both cases unsuccessfully—and which at one time attracted some attention. I pro- ceednext togiveanothersolution, moreelegantthoughratherartificial. This solution, which is due to M. Gros*, depends on a convention by which any position of the rings is denoted by a certain number expressed in the binary scale of notation in such a way that a step is indicated by the addition or subtraction of unity. Let the rings be indicated by circles: if a ring is on the bar, it is represented by a circle drawn above the bar; if the ring is off the bar, it is represented by a circle below the bar. Thus figure i below represents a set of seven rings of which the first two are off the bar, the next three are on it, the sixth is off it, and the seventh is on it. Denote the rings which are on the bar by the digits1 or 0 alter- nately, reckoning from left to right, and denote a ring which is off the bar by the digit assigned to that ring on the bar which is nearest to it on the left of it, or by a0 if there is no ring to the left of it. Thus the three positions indicated below are denoted respectively by the numbers written below them. The position represented in fig- ure ii is obtained from that in figure i by putting the first ring on to the bar, while the position represented in figure iii is obtained from that in figure i by taking the fourth ring off the bar. It follows that every position of the rings is denoted by a number expressed in the binary scale: moreover, since in going from left to right * Théorie du Baguenodier, by L. Gros, Lyons, 1872. I take the account of this from Lucas, vol.i, part 7.
