Mathematical Recreations and Essays
Determination of a selected pair of cards out of given pairs.* Another common trick is to throw twenty cards on to a table in ten couples, and ask someone to select one couple. The cards are then taken up, and dealt out in a certain manner into four rows each containing five cards. If the rows which contain the given cards are indicated, the cards selected are known at once.
This depends on the fact that the number of homogeneous products of two dimensions which can be formed out of four things is 10. Hence the homogeneous products of two dimensions formed out of four things can be used to define ten things.
Suppose that ten pairs of cards are placed on a table and someone selects one couple. Take up the cards in their couples. Then the first two cards form the first couple, the next two the second couple, and so on. Deal them out in four rows each containing five cards according to the scheme shown in the diagram.
Enquire in which rows the two selected cards appear. If only one line, the th, is mentioned as containing the cards then the required pair of cards are the th and th cards in that line. These
* Bachet, problem XVII, avvertissement, p. 146 et seq.
occupy the clue squares of that line. Next, if two lines are mentioned, then proceed as follows. Let the two lines be the th and the th and suppose . Then that one of the required cards which is in the th line will be the th card which is below the first of the clue squares in the th line. The other of the required cards is in the th line and is the th card to the right of the second of the clue squares.
Bachet’s rule, in the form in which I have given it, is applicable to a pack of cards divided into couples, and dealt in rows each containing cards; for there are such couples, also there are homogeneous products of two dimensions which can be formed out of things. Bachet gave the diagrams for the cases of 20, 30, and 42 cards: these the reader will have no difficulty in constructing for himself, and I have enunciated the rule for 20 cards in a form which covers all the cases.
I have seen the same trick performed by means of a sentence and not by numbers. If we take the case of ten couples, then after collecting the pairs the cards must be dealt in four rows each containing five cards, in the order indicated by the sentence Matas dedit nomen Cocis. This sentence must be imagined as written on the table, each word forming one line, The first card is dealt on the . The next card (which is the pair of the first) is placed on the second in the sentence, that is, third in the third row. The third card is placed on the . The fourth card (which is the pair of the third) is placed on the second , that is, fourth in the first row. Each of the next two cards is placed on a , and so on. Enquire in which rows the two selected cards appear. If two rows are mentioned, the two cards are on the letters common to the words that make these rows. If only one row is mentioned, the cards are on the two letters common to that row.
The reason is obvious: let us denote each of the first pair by an , and similarly each of any of the other pairs by an , , , , , , , , or respectively. Now the sentence Matas dedit nomen Cocis contains four words each of five letters; ten letters are used, and each letter is repeated only twice. Hence, if two of the words are mentioned, they will have one letter in common, or, if one word is mentioned, it will have two like letters.
To perform the same trick with any other number of cards we should require a different sentence.
The number of homogeneous products of three dimensions which
can be formed out of four things is 20, and of these the number consisting of products in which three things are alike and those in which three things are different is 8. This leads to a trick with 8 trios of things, which is similar to that last given—the cards being arranged in the order indicated by the sentence Lanata levete livini novoto.
I believe that these arrangements by sentences are known, but I am not aware who invented them.
Gergonne’s Pile Problem.
Before discussing Gergonne’s theorem I will describe the familiar three pile problem, the theory of which is included in his results.
The Three Pile Problem. This trick is usually performed as follows. Take 27 cards and deal them into three piles, face upwards. By “dealing” is to be understood that the top card is placed as the bottom card of the first pile, the second card in the pack as the bottom card of the second pile, the third card as the bottom card of the third pile, the fourth card on the top of the first one, and so on: moreover I assume that throughout the problem the cards are held in the hand face upwards. The result can be modified to cover any other way of dealing.
Request a spectator to note a card, and remember in which pile it is. After finishing the deal, ask in which pile the card is. Take up the three piles, placing that pile between the other two. Deal again as before, and repeat the question as to which pile contains the given card. Take up the three packs again, placing the pile which now contains the selected card between the other two. Deal again as before, but in dealing note the middle card of each pile. Ask again for the third time in which pile the card lies, and you will know that the card was the one which you noted as being the middle card of that pile. The trick can be finished then in any way that you like. The usual method—but a very clumsy one—is to take up the three piles once more, placing the named pile between the other two as before, when the selected card will be the middle one in the pack, that is, if 27 cards are used it will be the fourteenth.
The trick is often performed with 15 cards or with 21 cards, in either of which cases the same rule holds.
- The trick is mentioned by Bachet, problem XVIII, p. 143, but his analysis of it is insufficient.
Gergonne’s Generalization. The general theory for a pack of cards was given by M. Gergonne. Suppose the pack is arranged in piles, each containing cards, and that, after the first deal, the pile indicated as containing the selected card is taken up ; after the second deal, is taken up ; and so on, and finally after the deal, the pile containing the card is taken up . Then when the cards are collected after the deal the selected card will be from the top where
For example, if a pack of 256 cards (i.e. ) was given, and anyone selected a card out of it, the card could be determined by making four successive deals into four piles of 64 cards each, and after each deal asking in which pile the selected card lay. The reason is that after the first deal you know it is one of sixty-four cards. In the next deal these sixty-four cards are distributed equally over the four piles, and therefore, if you know in which pile it is, you will know that it is one of sixteen cards. After the third deal you know it is one of four cards. After the fourth deal you know which card it is.
Moreover, if the pack of 256 cards is used, it is immaterial in what order the pile containing the selected card is taken up after a deal. For, if after the first deal it is taken up , after the second , after the third , and after the fourth , the card will be the th from the top of the pack, and thus will be known. We need not take up the cards after the fourth deal, for the same argument will show that it is the th in the pile then indicated as containing it. Thus if , , , , it will be the 62nd card in the pile indicated after the fourth deal as containing it and will be the 126th card in the pack as then collected.
In exactly the same way a pack of twenty-seven cards may be used, and three successive deals, each into three piles of nine cards, will suffice to determine the card. If after the deals the pile indicated as containing the given card is taken up , , and respectively, then the card will be the th in the pack or will be the th card in the pile indicated after the third deal as containing it.
Gergonne’s Annales de Mathématiques, Nismes, 1813–4, vol. IV, pp. 276–283.
The method of proof will be illustrated sufficiently by considering the usual case of a pack of twenty-seven cards, for which , which are dealt into three piles each of nine cards.
Suppose that, after the first deal, the pile containing the selected card is taken up th: then (i) at the top of the pack there are piles each containing nine cards; (ii) next there are 9 cards, of which one is the selected card; and (iii) lastly there are the remaining cards of the pack. The cards are dealt out now for the second time: in each pile the bottom cards will be taken from (i), the next 3 cards from (ii), and the remaining cards from (iii).
Suppose that the pile now indicated as containing the selected card is taken up th: then (i) at the top of the pack are cards; (ii) next are cards; (iii) next are 3 cards, of which one is the selected card; and (iv) lastly are the remaining cards of the pack. The cards are dealt out now for the third time: in each pile the bottom cards will be taken from (i), the next cards will be taken from (ii), the next card will be one of the three cards in (iii), and the remaining cards are from (iv).