Mathematical Recreations and Essays
An example where the solution is obvious is if , , , in which case , .
If we take the case , , , we find ; and it happens that these 35 rows can be divided into 7 sets, each of which contains all the symbols; hence . More generally, if , , , we find , . It will be noticed that in the solutions of the original fifteen school-girls problem and of Walecki’s extension of it given above every possible pair of girls walk together once; hence we might infer that in these cases we could determine as well as .
The results of the last paragraph were given by Kirkman† in 1850. In the same memoir he also proved that, if is a prime, and if , , , then ; if where has no divisor less than , , , then ; if , , , then ;
- Philosophical Magazine, July, 1850, series 3, vol. XXXVII, p. 52; a solution by Sylvester is given in the Philosophical Magazine, May, 1861, series 4, vol. XXI, p. 371.
† Cambridge and Dublin Mathematical Journal, 1850, vol. v, pp. 255–262.
and Sylvester’s result that if , , , , . Three years later Kirkman solved the problem when , , . Lastly, in 1893, Sylvester published the solution when , , , in which case , ; and stated that a similar method was applicable when , , : thus 9 girls can be arranged to walk out 28 times (say 4 times a day for a week) so that in any day the same pair never are together more than once and so that at the end of the week each girl has been associated with every possible pair of her schoolfellows.
In 1867 Mr S. Bills showed that if , , , then : if , , , then : if , , , then : and the method by which these results are proved will give the value of , if , , . Shortly afterwards Mr W. Lea showed that if , , , then ; also that if , , , then ; the latter result is a particular case of Kirkman’s theorems. It will be noticed that these writers did not confine their discussion to cases where is an exact multiple of .
PROBLEMS CONNECTED WITH A PACK OF CARDS.
I mentioned in chapter I that an ordinary pack of playing cards could be used to illustrate many tricks depending on simple properties of numbers. Most of these involve the relative position of the cards. The principle of solution generally consists in re-arranging the pack in a particular manner so as to bring the card into some definite position. Any such rearrangement is a species of shuffling.
I shall treat in succession of problems connected with shuffling a pack, arrangements by rows and columns, the determination of a pair out of pairs, Gergonne’s pile problem, and the game known as the mouse trap.
SHUFFLING A PACK.
Any system of shuffling a pack of cards, if carried out consistently, leads to an arrangement which can be calculated; but tricks that depend on it generally require considerable
Ibid., 1853, vol. VIII, pp. 38–42.
Messenger of Mathematics, February, 1893, vol. XXII, pp. 159–160.
Educational Times Reprints, London, 1867, vol. VIII, pp. 32–33.
Ibid., 1868, vol. IX, pp. 35–36; and 1874, vol. XXII, pp. 74–76; see also the volume for 1869, vol. XI, p. 97.
technical skill.
Suppose for instance that a pack of cards is shuffled, as is not unusual, by placing the second card on the first, the third below these, the fourth above them, and so on. The theory of this system of shuffling is due to Monge*. The following are some of the results and are not difficult to prove directly.
If the pack contains cards, the th card will occupy the same position in the shuffled pack. For instance, if a complete pack of 52 cards is shuffled as described above, the 18th card will remain the 18th card.
Again, if a pack of cards is shuffled in this way, the th and the th cards will interchange places. For instance, if an écarté pack of 32 cards is shuffled as described above, the 7th and the 20th cards will change places.
More generally, one shuffle of a pack of cards will move the card which was in the th place to the th place, where if is odd, and if is even, from which the above results can be deduced. By repeated applications of the above formulae we can show that the effect of such shuffles is to move the card which was initially in the th place to the th place where , the sign representing an ambiguity of sign.
Again, in any pack of cards after a certain number of shufflings, not greater than , the cards will return to their primitive order. This will always be the case as soon as the original top card occupies that position again. To determine the number of shuffles required for a pack of cards, it is sufficient to put and find the smallest value of which satisfies the resulting equation for all values of from 1 to . It follows that, if is the least number which makes divisible by , then shuffles will be required if either or is divisible by , otherwise shuffles will be required. The number
- Monge’s investigations are printed in the Mémoires de l’Académie des Sciences. Paris, 1773, pp. 390–412. Among those who have studied the subject afresh I may in particular mention V. Bouniakowski, Bulletin physico-mathématique de St Pétersbourg, 1857, vol. xv, pp. 202–205, summarised in the Nouvelles annales de mathématiques, 1858, pp. 66–67; T. de St Laurent, Mémoires de l’Académie de Gard, 1865; L. Tanner, Educational Times Reprints, 1880, vol. XXXIII, pp. 73–75; and M.J. Bourget, Liouville’s Journal, 1882, pp. 413–434. The solutions given by Prof. Tanner are simple and concise.
for a pack of cards is the same as that for a pack of cards. With an écarté pack of 32 cards, six shuffles are sufficient; with a pack of cards, shuffles are sufficient; with a full pack of 52 cards, twelve shuffles are sufficient; with a pack of 13 cards ten shuffles are sufficient; while with a pack of 50 cards fifty shuffles are required; and so on.
Mr W.H.H. Hudson* has also shown that, whatever is the law of shuffling, yet if it is repeated again and again on a pack of cards, the cards will ultimately fall into their initial positions after a number of shufflings not greater than the greatest possible L.C.M. of all numbers whose sum is .
For suppose that any particular position is occupied after the 1st, 2nd, . . ., th shuffles by the cards respectively, and that initially the position is occupied by the card . Suppose further that after the th shuffle returns to its initial position, therefore . Then at the second shuffling succeeds by the same law by which succeeded at the first; hence it follows that previous to the second shuffling must have been in the place occupied by previous to the first. Thus the cards which after the successive shuffles take the place initially occupied by are ; that is, after the th shuffle has returned to the place initially occupied by it: and so for all the other cards .
Hence the cards form a cycle of cards, one or other of which is always in one or other of positions in the pack, and which go through all their changes in shufflings. Let the number of the pack be divided into such cycles, whose sum is ; then the L.C.M. of is the utmost number of shufflings necessary before all the cards will be brought back to their original places.
In the case of a pack of 52 cards, the greatest L.C.M. of numbers whose sum is 52 will be found by trial to be 180180.
ARRANGEMENTS BY ROWS AND COLUMNS. A not uncommon trick, which rests on a species of shuffling, depends on the obvious fact that if cards are arranged in the form of a square of rows, each containing cards, then any card will be defined if the row and the column in which it lies are mentioned.
This information is generally elicited by first asking in which row the selected card lies, and noting the extreme left-hand card of that
- Educational Times Reprints, London, 1865, vol. II, p. 105.
row. The cards in each column are then taken up, face upwards, one at a time beginning with the lowest card of each column and taking the columns in their order from right to left–each card taken up being placed on the top of those previously taken up. The cards are then dealt out again in rows, from left to right, beginning with the top left-hand corner, and a question is put as to which row contains the card. The selected card will be that card in the row mentioned which is in the same vertical column as the card which was originally noted.
The above is the form in which the trick is usually presented, but it is greatly improved by allowing the pack to be cut as often as is liked before the cards are re-dealt, and then giving one cut at the end so as to make the top card in the pack one of those originally in the top row.
The explanation is obvious. For, if 16 cards are taken, the first and second arrangements may be represented by figures i and ii. For example, if we are told that in figure i the card is in the third row, it must be either 9, 10, 11, or 12: hence, if we know in which row of figure ii it lies, it is determined. If we allow the pack to be cut between the deals, we must secure somehow that the top card is either 1, 2, 3, or 4, since that will leave the cards in each row of figure ii unaltered though the positions of the rows will be changed.