November 24, 2013

Counting on Success

The setup looks simple, but people attracted to the long row of nine-sided, wooden rings at the Exploratorium in San Francisco can't resist trying it—again and again.


Each ring bears the numbers from 1 to 9. You "shuffle" the rings, rotating them so that you can read a scrambled string of digits along the top of the row.


Starting at one end, you think of a number from 1 to 9, and you move along the top row from ring to ring according to the designated number. For example, if your chosen number is 4, you move over four rings along the row. The number on top of the ring on which you land gives you the number of steps for your next move, and so on. You continue in this way as far as you can go down the line and note the number on the ring where you end up.

Amazingly, when you do it again from the same end and with the same sequence of numbered rings but with a different starting number, you're almost sure to end up at the same ring.

Aptly titled "Sooner or Later," the Exploratorium exhibit is an ingenious variant of a card-guessing trick that magicians can use to show off their mind-reading prowess, even though its success is rooted in mathematical principle.

This particular prediction trick is known as the Kruskal count, named for physicist and mathematician Martin D. Kruskal.

The magician invites a subject to shuffle a standard deck of 52 playing cards and secretly pick a number between 1 and 10. The subject slowly and steadily deals out the cards one by one, face up, to form a pile. As she does so, she goes through the following counting routine: Suppose her secret number is 6. The sixth card that she deals becomes a "key" card, and its face value tells her how many more cards must be dealt to get to the next key card. For example, if the key card happens to be 7, she starts counting again, this time from 1 up to 7, to find the next key card. She repeats the procedure until all 52 cards are dealt. An ace counts as 1, and a king, queen, or jack count as 5.

At some point, she reaches a key card (perhaps the last card in the deck) that is not followed by enough cards for her to complete the count. This final key card becomes the subject's "chosen" card and the magician's mind-reading target.

No matter how steadily the subject deals out the entire deck (with no pauses at crucial moments or other hints of which cards are key), the magician still has a high probability of identifying the mystery card.

The reason is that, for many arrangements of the deck, every starting point leads to the same final key card. So, all a magician has to do is to select his own starting point, then count his way to the end while the subject is dealing the cards. He is very likely to end up at the same "chosen" card as the subject.

One way to see what is going on is to deal out a shuffled deck so that the cards form an array. I used colored chips to identify the key cards associated with each of the 10 possible starting points. Suppose the first card is a 10. The second chip goes on the 11th card in the array—an ace; the next chip goes on the adjacent card—a 7, and so on. Using chips of a different color, I started with the second card—a 5—and laid down a new trail. At some stage, the second trail happened to hit a card already marked by a chip. From that point on, the trails coincided.

The same behavior underlies the convergence of paths along the row of nine-sided rings in the Exploratorium exhibit. For typical "random" arrangements of the rings, you'll end up at the same ring, no matter what your starting number.

The trick doesn't work every time. For certain arrangements of the deck (or rings), one or two starting points may generate trails that never coincide with the others. In the case of a deck of 52 cards, however, the probability is about 5/6 that the magician ends up at the same card as the subject—assuming both magician and subject count accurately and correctly.

A magician can increase his chances of "guessing" correctly by starting with a card near the beginning of the deck. Giving royal cards a lower value (say, 2 instead of 5) and using two decks shuffled together also improve the odds of having trails intersect.

In 2001, Jeffrey C. Lagarias, Eric Rains, and Robert J. Vanderbei took a closer look at the Kruskal count. They used computer simulations and mathematical arguments to determine the effect of two parameters on the probability of success for the magician: the freedom to choose the initial key card and the freedom to assign values to the face cards. The researchers described their results in a paper titled "The Kruskal Count."

Lagarias, Rains, and Vanderbei compared three possibilities for assigning values to face cards. Suppose the values 11, 12, and 13 are assigned to the jack, queen, and king, respectively. In this case, the magician's probability of failure is about 0.34. Assigning the value 10 to all face cards lowers the failure probability to 0.29. Going with the usual rule of assigning the value 5 to face cards slashes the failure probability to 0.16. If the magician chooses the first card as his starting point, the failure probability drops further to 0.14.

"The magician should choose his key card value to be 1," the researchers concluded. "Assuming this strategy for the magician, the success probability of the original Kruskal count trick is just over 85 percent."

In general, "the effect of the choice of the magician's key card on the failure probability is small, at most 2.5 percent," they noted. "The choice to have face cards take the value 5 rather than 10 has a much larger effect on the failure probability than the magician's choice of first key card position."

The underlying mechanics of the Kruskal count also highlights how seemingly unrelated chains of events can lock together in sync after a while—a phenomenon worth watching for in other contexts.

It also calls to mind a comment by Sherlock Holmes in the story "The Disappearance of Lady Frances Carfax" by Arthur Conan Doyle: "When you follow two separate chains of thought, Watson, you will find some point of intersection which should approximate to the truth."

References:

Gardner, M. 2000. Modeling mathematics with playing cardsCollege Mathematics Journal 31(May):173-177.

______. 1997. Sicherman dice, the Kruskal count and other curiosities. In Penrose Tiles to Trapdoor Ciphers. Mathematical Association of America.

______. 1956. Mathematics, Magic and Mystery. Dover.

Knopfmacher, A., and H. Prodinger. 2001. A simple card guessing game revisitedElectronic Journal of Combinatorics 8(No. 2):R13.

Mulcahy, C. 2000. Mathematical Card Tricks. American Mathematical Society. Oct. 1.

Photos by I. Peterson

1 comment:

  1. Anonymous8:53 AM

    In my experience, the effect is much easier to see with a randomly shaken and formed line of dice (only 6 possibilities). You just need a couple dozen dice to show that after six or so counted out moves, you will end up coinciding and following the same path.

    With a line of dice, you can see that no matter what number you start with, your counting forward for each number you land on means that eventually you will "intersect" or coincide on a die and from there forward, proceed on the same counting/path. And once you recognize this "intersection" you can take a step back and acknowledge that you have a 1 in 6 chance of intersecting for each time you count forward, so after about 5 - 7 counts, you probably have intersected and will follow the same path going forward.

    it is easy to do in the classroom. Technorama had such an exhibit in their MatheMagie exhibition (http://www.technorama.ch/ausstellung/mathemagie/).

    ReplyDelete