Starting in October 2004, Card Colm has been exploring mathematical card principles and effects old and new for fun every two months here, very much inspired by the extensive writings of Martin Gardner on the subject, going back to his seminal book Mathematics, Magic and Mystery (Dover, 1956). We were very fortunate to enjoy corresponding (and chatting on the phone) several times a year with Martin over the last decade, and also visiting him a few times "in retirement" in his native Oklahoma. Hence, like many others, we were deeply saddened when this lovely man, intellectual giant and amazingly prolific writer passed away suddenly last month, at the age of 95. Professional and personal reminiscences can be found linked from here: http://www.spelman.edu/~colm/mg.html.
"We all know (intellectually) that no one is immortal, but I think that Martin will come the closest to being so among all the people that I know." (Ron Graham, personal communication)
Powerful words indeed, especially coming from a man who also knew the legendary itinerant Hungarian mathematician Paul Erdös well.
Somerset Maugham's short story "Mr. Know-All" contains the following dialogue :
"Do you like card tricks?"
"No, I hate card tricks."
"Well, I'll just show you this one."
After the third trick, the victim finds an excuse to leave the room. His reaction is understandable. Most card magic is a crashing bore unless it is performed by skillful professionals. There are, however, some "self-working" card tricks that are interesting from a mathematical standpoint.
Consider the following trick. The magician, who is seated at a table directly opposite a spectator, first reverses 20 cards anywhere in the deck. That is, he turns them face up in the pack. The spectator thoroughly shuffles the deck so that these reversed cards are randomly distributed. He then holds the deck underneath the table, where it is out of sight of everyone, and counts off 20 cards from the top. This packet of 20 cards is handed under the table to the magician. The magician takes the packet but continues to hold it beneath the table so that he cannot see the cards. "Neither you nor I," he says, "knows how many cards are reversed in this group of 20 which you handed me. However, it is likely that the number of such cards is less than the number of reversed cards among the 32 which you are holding. Without looking at my cards I am going to turn a few more face-down cards face up and attempt to bring the number of reversed cards in my packet to exactly the same number as the number of reversed cards in yours."
The magician fumbles with his cards for a moment, pretending that he can distinguish the fronts and backs of the cards by feeling them. Then he brings the packet into view and spreads it on the table. The face-up cards are counted. Their number proves to be identical with the number of face-up cards among the 32 held by the spectator!
This remarkable trick can best be explained by reference to one of the oldest mathematical brain-teasers. Imagine that you have before you two beakers, one containing a liter of water; the other a liter of wine. One cubic centimeter of water is transferred to the beaker of wine and the wine and water mixed thoroughly. Then a cubic centimeter of the mixture is transferred back to the water. Is there now more water in the wine than wine in the water? Or vice versa?
(We ignore the fact that in practice, a mixture of water and alcohol is a trifle less than the sum of the volumes of the two liquids before they are mixed.) The answer is that there is just as much wine in the water as water in the wine.
The amusing thing about this problem is the extraordinary amount of irrelevant information involved. It is not necessary to know how much liquid there is in each beaker, how much is transferred, or how many transfers are made. It does not matter whether the mixtures are thoroughly stirred or not. It is not even essential that the two vessels hold equal amounts of liquid at the start! The only significant condition is that at the end each beaker must hold exactly as much liquid as i t did at the beginning. When this obtains, then obviously if x amount of wine is missing from the wine beaker, the space previously occupied by the wine must now be filled with x amount of water.
If the reader is troubled by this reasoning, he can quickly clarify it with a deck of cards. Place 26 cards face down on the table to represent wine. Beside them put 26 cards face up to represent water. Now you may transfer cards back and forth in any manner you please from any part of one pile to any part of the other, provided you finish with exactly 26 in each pile. You will then find that the number of face-down cards in either pile will match the number of face-up cards in the other pile.
Now try a similar test beginning with 32 face-down cards and 20 face up. Make as many transfers as you wish, ending with 20 cards in the smaller pile. The number of face-up cards in the large pile will of necessity exactly equal the number of face-down cards among the 20. Now turn over the small pile. This automatically turns its face-down cards face up and its face-up cards face down. The number of face-up cards in both groups will therefore be the same.
The operation of the trick should now be clear. At the beginning the magician reverses exactly 20 cards. Later, when he takes the packet of 20 cards from the spectator, it will contain a number of face-down cards equal to the number of face-up cards remaining in the deck. He then pretends to reverse some additional cards, but actually all he does is turn the packet over. It will then contain the same number of reversed cards as there are reversed cards in the group of 32 held by the spectator. The trick is particularly puzzling to mathematicians, who are apt to think of all sorts of complicated explanations.
Many card effects known in the conjuring trade as "spellers" are based on elementary mathematical principles. Here is one of the best.
With your back to the audience, ask someone to take from one to 12 cards from the deck and hide them in his pocket without telling you the number. You then tell him to look at the card at that number from the top of the remainder of the deck and remember it.
Turn around and ask for the name of any individual, living or dead. For example, someone suggests Marilyn Monroe (the name, by the way, must have more than 12 letters). Taking the deck in your hand, you say to the person who pocketed the cards: "I want you to deal the cards one at a time on the table, spelling the name Marilyn Monroe like this." To demonstrate, deal the cards from the top of the deck to form a face-down pile on the table, taking one card for each letter until you have spelled the name aloud. Pick up the small pile and replace it on the deck.
"Before you do this, however," you continue, "I want you to add to the top of the deck the cards you have in your pocket." Emphasize the fact, which is true, that you have no way of knowing how many cards this will be. Yet in spite of this addition of an unknown number of cards, after the spectator has completed spelling Marilyn Monroe, the next card (that is, the card on top of the deck) will invariably turn out to be his chosen card!
The operation of the trick yields easily to analysis. Let x be the number of cards in the spectator's pocket and also the position of the chosen card from the top of the deck. Let y be the number of letters in the selected name. Your demonstration of how to spell the name automatically reverses the order of y cards, bringing the chosen card to a position from the top that is y minus x. Adding x cards to the deck therefore puts y minus x plus x cards above the selected one. The x's cancel out, leaving exactly y cards to be spelled before the desired card is reached.
A more subtle compensatory principle is involved in the following effect. A spectator is asked to select any three cards and place them face down on the table without letting the magician see them. The remaining cards are shuffled and handed to the magician.
"I will not alter the position of a single card," the magician explains. "All I shall do is remove one card which will match in value and color the card you will select in a moment." He then takes a single card from the pack and places it face down at one side of the table. The spectator is now asked to take the remaining cards in hand and to turn face up the three cards he previously placed on the table.
The spectator is now asked to take the remaining cards in hand and to turn face up the three cards he previously placed on the table. Let us assume that they are a nine, a queen and an ace. The magician requests that he start dealing cards face down on top of the nine, counting aloud as he does so, beginning the count with 10 and continuing until he reaches 15. In other words, the spectator deals six cards face down on the nine. The same procedure is followed with the other two cards. The queen, which has a value of 12 (jacks are 11, kings 13), will require three cards to bring the count from 12 to 15. The ace (1) will require 14 cards.
The magician now has the spectator total the values of the three original face-up cards, and note the card at that position from the top of the remainder of the deck. In this case the total is 22 (9 plus 12 plus 1), so he looks at the 22nd card. The magician turns over his "prediction card." The two cards match in value and color!
How is it done? When the magician glances through the deck to find a "prediction card," he notes the fourth card from the bottom and then removes another card which matches it in value and color. The rest of the trick works automatically. (On rare occasions you may find the prediction card among the bottom three cards of the pack. When this happens you must remember to tell the spectator later, when he makes his final count to a selected card, to finish the count, then look at the next card.) I leave to the reader the easy task of working out an algebraic proof of why the trick cannot fail.
The ease with which cards can be shuffled makes them peculiarly appropriate for demonstrating a variety of probability theorems, many of which are startling enough to be called tricks. For example, let us imagine that two people each hold a shuffled deck of 52 cards. One person counts aloud from 1 to 52 ; on each count both deal a card face up on the table. What is the probability that at some point during the deal two identical cards will be dealt simultaneously?
Most people would suppose the probability to be low, but actually it is better than 1/2! The probability there will be no coincidence is 1 over the transcendental number e. (This is not precisely true, but the error is less than 1 over 10 to the 69th power. The reader may consult page 47 in the current edition of W. Rouse Ball's Mathematical Recreations and Essays for a method of arriving at this figure.) Since e is 2.718..., the probability of a coincidence is roughly 17/27 or almost 2/3. If you can find someone willing to bet you even odds that no coincidence will occur, you stand a rather good chance to pick up some extra change. It is interesting to note that we have here an empirical procedure, based on probability, for making a decimal expansion of e (comparable to the "Buffon's Needle" procedure for doing the same thing with pi). The more cards used, the closer the probability of no coincidence approaches l/e.
Because 9 is the largest digit in the decimal number system, the sum of the digits of any number will always be congruent modulo 9 to the original number. The digits of this second number can then be added to obtain a third number congruent to the other two, and if we continue this process until only one digit remains, it will be the remainder itself. For example, 4157 has a remainder of 8 when divided by 9. It;s digits total 17, which also has a remainder of 8 modulo 9. And the digits of 17 add up to 8. This last digit is called the digital root of the original number. It is the same as the number's remainder modulo 9, with the exception of numbers with a remainder of 0, in which case the digital root is 9 instead of 0.After observing that "Obtaining the digital root is simply the ancient process of casting out 9's," and that IBM computers "use the technique as one of their built-in methods of self-checking for accuracy", a few pages later he continues:
A large number of self-working card tricks depend on the properties of digital roots. In my opinion the best is a trick currently sold in magic shops as a four-page typescript titled "Remembering the Future." It was invented by Stewart James of Courtright, Ontario, a magician who has probably devised more high-quality mathematical card tricks than anyone who ever lived. The trick is explained here with James's permission. From a thoroughly shuffled deck you remove nine cards with values from ace to 9, arranging them in sequence with the ace on top. Show the audience what you have done, then explain that you will cut this packet so that no one will know what cards are at what positions. Hold the packet face down in your hands and appear to cut it randomly but actually cut it so that three cards are transferred from bottom to top.
From the top down the cards will now be in the order: 7-8-9-1-2-3-4-5-6. Slowly remove one card at a time from the top of this packet, transferring these cards to the top of the deck. As you take each card, ask a spectator if he wishes to select that card. He must, of course, select one of the nine. When he says "Yes," leave the chosen card on top of the remaining cards in the packet and put the packet aside. The deck is now cut at any spot by a spectator to form two piles. Count the cards in one pile, then reduce this number to its digital root by adding the digits until a single digit remains. Do the same with the other pile. The two roots are now added, and if necessary the total is reduced to its digital root. The chosen card, on top of the packet placed aside, is now turned over. It has correctly predicted the outcome of the previous steps!
Why does it work? After the nine cards are properly arranged and cut, the 7 will be on top. The deck will consist of 43 cards, a number with a digital root of 7. If the spectator does not choose the 7, it is added to the deck, making a total of 44 cards. The packet now has an 8 on top, and 8 is the digital root of 44. In other words, the card selected by the spectator must necessarily correspond to the digital root of the number of cards in the deck. Cutting the deck in two parts and combining the roots of each portion as described will, of course, result in the same digit as the digital root of the entire deck.
An increasing number of mathematically inclined amateur conjurers have lately been turning their attention toward "mathemagic": tricks that rely heavily on mathematical principles. Professional magicians shy away from such tricks because they are too cerebral and boring for most audiences, but as parlor stunts presented more in the spirit of puzzles than of feats of magic, they can be interesting and entertaining. My friend Victor Eigen, an electronics engineer and past president of the Brotherhood of American Wand Wielders, manages to keep posted on the latest developments in this curious field, and it was in the hope of finding some off-beat material for this department that I paid him a visit.After some chit-chat, Martin asks Victor, "What's new?". The story continues:
Victor lost no time in taking a deck of cards from his shirt pocket. "The latest thing out in cards is the Gilbreath principle. It's a whimsical theorem discovered by Norman Gilbreath, a young California magician." As he talked, his short fingers skillfully arranged the deck so that red and black cards alternated throughout. "You know, I'm sure, that riffle shuffling is notoriously inefficient as a method of randomizing."There we leave Martin and Victor, who move on to explore other topics. In an Addendum to this chapter, Martin gives many references to tricks which use the (so-called first) Gilbreath Principle, and also gives this explanation as to why it works:
"No, I didn't realize that." Victor's eyebrows went up. "Well, this ought to convince you. Please give the deck one thorough riffle shuffle." I cut the deck into two parts and shuffled them together. Take a look at the faces," he said. "You'll see that the alternating color arrangement has been pretty well destroyed."
"Now give the deck a cut," he went on, "but cut between two cards of the same color. Square up the pack and hand it to me face down." I did as he suggested. He held the deck under the table where it was out of sight for both of us. "I'm going to try to distinguish the colors by sense of touch," he said, "and bring out the cards in rled-black pairs." Sure enough, the first pair he tossed on the table consisted of one red and one black card. The second pair likewise. He produced a dozen such pairs.
Victor interrupted with a laugh. He slapped the rest of the deck: on the table and started taking cards from the top, two at a time, tossing them face up. Each pair contained a red and a bladk card. "Couldn't be simpler," he explained. "The shuffle and cut -- remember, the cut must be between two cards of the same color - destroys the alternation of red and black all right, but it leaves the cards strongly ordered. Each pair still contains both colors."
"I can't believe it !"
"Well, think about it a bit and you'll see why it works, but it's not so easy to state a proof in a few words."
The principle can be proved informally as follows. When the deck is cut for a riffle shuffle, there are two possible situations: The bottom cards of the two halves are either the same color or different. Assume they are different. After the first card falls, the bottom cards of the two halves will then be the same color, and opposite to that of the card that fell. It makes no difference, therefore, whether the next card slips past the left or right thumb; in either case, a card of opposite color must fall on the previous one. This places on the table a pair of cards that do not match. The situation is now exactly as before. The bottom cards of the halves in the hands do not match. Whichever card falls, the remaining bottom cards will both have the opposite color. And so on. The argument repeats for each pair until the deck is exhausted.
Now suppose that the deck is initially cut so that the two bottom cards are the same color. Either card may fall first. The previous argument now applies to all the pairs of cards that follow. One last card will remain. It must, of course, be opposite in color to the first card that fell. When the deck is cut between two cards of the same color (that is, between the ordered pairs), the top and bottom cards of the deck are brought together, and all pairs are now intact.
A friend from Winnipeg, Mel Stover was explaining how the binary system could be applied to a familiar method of revealing a chosen card. In many card tricks the selected card is disclosed when the spectator is handed a small packet of cards and asked to shift the top card to the bottom of the packet, deal the next card to the table, shift the next card to the bottom, deal the next to the table, and so on, until only one card remains. It proves to be the selected card. At what position in the packet must this card originally be placed so that it will become the last card? The position will vary, of course, with the number of cards in the packet. It can be determined by experiment, but for large packets experimenting is tedious. Fortunately, Stover explained, the binary system provides a simple answer. This is how it is done. Express the number of cards in the binary system, shift the first digit to the end of the number, and the resulting binary number will indicate the position that the chosen card should be in from the top of the original packet. For example, suppose an entire deck of 52 cards is used. The binary expression for 52 is 110100. We move the first digit to the end: 101001. This new number is 41, therefore the chosen card must be the 41st card from the top of the deck.In an Addendum to that chapter, Martin credits the legendary Bob Hummer (whom he knew) with "the earliest published trick I know of that exploits this formula" (in 1939). He also gives a valuable reference to the mathematics literature. however, note the subtle switch from the Under-Down deal above to the related but not identical Down-Under deal below:
What size packets can be used if we want the top card of the packet to be the card that remains? The binary number for the position of the top card is 1, so we must use packets with binary numbers of 10, 100, 1000, 10000 . . . (in decimal notation packets of 2, 4, 8, 16 . . . cards). If we want the bottom card of the packet to be the remaining card, then the binary numbers of the packets must be 11, 111, 1111, 11111 . . . (or 3, 7, 15, 31 . . . cards). Is it possible for the second card from the top of a packet to be the remaining card? No. In fact, no card at an even position from the top can ever be the remaining card. The position of the chosen card, expressed as a binary number, must end in 1 (because after the first digit, which must be 1, is moved to the end it forms a number ending in 1). All binary numbers ending in 1 are odd numbers.
The binary method that I gave for determining the position of a card in a packet of n cards (so that it will be the last card when one follows the procedure of alternately dealing a card to the table and placing a card under the packet) was published by Nathan Mendelsohn in American Mathematical Monthly, August-September, 1950. An equivalent way of calculating the position had long before been known to magicians: simply take from n the highest power of 2 that is less than n, and double the result. This gives the card's position if the first card is dealt to the table. If the first card is placed beneath the packet, 1 is added to the result. (If n is itself a power of 2, the card's position is on top of the packet if the first card goes beneath, on the bottom of the packet if the first card is dealt.)
Victor Eigen, whose tricks were discussed in New Mathematical Diversions from Scientific American, took the floor to demonstrate a remarkable new card trick that involves the coding of information.Later on in that chapter, Martin describes his own ingenious solution:
"I want to explain in advance exactly what I intend to do," he said. "Anyone may shuffle his own deck of cards and from it select any five cards. From those five he must choose one. I am allowed to arrange the remaining four cards in any order I please. These four cards, squared into a packet and all face down, are to be taken to my hotel room by whoever selected the card. My wife is in the room, waiting to assist in the trick. The person carrying the packet will knock three times on the door, then push the packet of four cards, held face down, under the door. No words will be spoken by either person. My wife will examine the packet and name the selected card."
I asked permission to do the selecting. The procedure was carried out exactly as Eigen had directed. I took five cards from my own deck and selected from them the six of spades. Eigen did not touch the cards. He wanted to rule out the possibility that he might mark them in some way and so provide additional information. Moreover, most cards have backs that vary in minute details when turned upside down. By taking advantage of these "one-way backs" (as magicians call them) it would be possible to arrange the cards in a pattern -- some turned one way, some the other -- that would convey a large amount of information. If the cards had been placed in a container of some sort, say an envelope, still more information could be coded. For example, the cards could be put in the envelope either face up or face down, the envelope could be sealed or left unsealed, and so on. Even the choice of a container or no container could convey information. Had Eigen been given the privilege of picking someone to take the cards to his wife, this choice also could be used as part of the code. He could select a person with dark or light hair, married or unmarried, last initial from A to M or M to Z, and so on. Of course his wife would have to observe in some way who delivered the cards. It was to rule out all these possibilities that Eigen had described the procedure in advance and had been careful not to touch the cards in any way.
After I had arranged the four cards in an order specified by Eigen, I asked for his room number and was about to leave when Mel Stover spoke up. "Hold on a minute," he said. "How do we know that Eigen isn't sending information by the time he picks to send you to his room? By conversation he delays your leaving until the time is within a certain interval that is part of the code." Eigen shook his head. "No time intervals are involved. If you like, wait awhile and let Gardner go whenever he wishes."
We delayed about fifteen minutes, watching with awe while Ed Marlo, a Chicago card expert, showed how a flawless series of eight faro shuffles would bring a full pack back to its original order. A faro shuffle-in England it is called a weave shuffle--is a perfect riffle shuffle in which single cards alternate from left and right halves, each half containing twenty-six cards. If the first card to fall is from the former bottom half, it is called an out-shuffle. If the first card is from the former top half, it is an in-shuffle. Eight outshuffles or fifty-two in-shuffles will restore the deck's original order. Only the most skillful card hustlers and magicians can execute such shuffles rapidly and without error. In recent years many articles analyzing the faro shuffle in the binary system have been published in both magic and mathematical journals. Ed Marlo has published two books about the shuffle and the brilliant mathematical card tricks that can be based on it.
After Marlo's demonstration I carried my packet of four cards to Eigen's room, knocked three times, pushed the facedown packet under the door. I heard footsteps. The packet was pulled out of sight. A moment later Mrs. Eigen's voice said: "Your card is the six of spades." Exactly how did Eigen convey this information to her?
The earliest reference I have on the five-card problem is Wallace Lee, Math Miracles (1950), Chapter 14, which explains a trick of Fitch Cheney's similar to the one I described. The difference is that in Cheney's version the magician is allowed to decide which of the five cards is to be the selected one. The problem of coding the fifth card when it is chosen by the spectator was first given, I believe, by "Rusduck" in the third issue (June 1957) of his obscure little magazine, The Cardiste. Issues 4 and 5 (September 1957 and February 1958) give two imperfect methods of doing the trick. (There are, of course, no "perfect" methods.) Further suggestions are supplied by Tom Ransom in the Canadian magic magazine Ibidem, No. 24 (December 1961), page 31, and many other methods have since appeared in other magic magazines.
Since none of the four cards can be the selected card, it is necessary only to code the name of one of 48 cards. The magician and assistant have agreed on an order for all 52 cards, so that each card can be assigned a number, from 1 to 52, in the agreed-on hierarchy. The four cards that carry the code will then represent four numbers that can be designated A, B, C, D in order of rank. These four cards can be arranged in 24 different ways, exactly one half of 48. The 48 cards (one of which must be coded) are thought of as ordered according to the ranks of their assigned numbers, then divided in half, half consisting of the 24 lower cards, the other half consisting of the 24 higher cards.
Suppose the chosen card is the seventeenth card in the "low" group. The number 17 can be communicated by the ordering of the four cards, but one additional signal is needed to indicate whether it is the seventeenth card in the "low" or the "high" group. The problem that remains, then, is how to communicate this final yes-no signal. It cannot be communicated by the ordering of the four cards. The problem was stated in such a way as to rule out various other methods that suggest themselves, such as marks on the cards, the choice of the person who takes the cards to the assistant, the use of a container for the cards, the procedure to be followed, the time at which the cards are taken to the assistant and so forth.
One subtle loophole was not ruled out: the hotel room in which Mrs. Eigen waited. The Eigens had taken two rooms, adjoining and connecting. Victor Eigen did not give the number of his hotel room until after the card had been selected. He arranged the four cards to code a position from 1 to 24, then transmitted the final clue-whether the high or the low group was involved-by choosing one of his two rooms. Mrs. Eigen simply went to the door at which she heard knocking. This information, combined with the four-card code, was sufficient to pinpoint the selected card.