Warning! Spoiler alert! This post contains the secret behind the card trick that I described in my last post. Read that post before reading this one.
First the bad news: this card trick is not fool-proof; it is a probabilistic card trick. The good news is that in my experience, it has a high probability of success. I can’t be more specific than that. If anyone wants to run a Monte Carlo simulation, I’d be happy to hear how often the trick fails.
The secret to this card trick is that you play along just like your friend is, but you use the first upturned card as your key card. She is silently counting and so are you. In the example shown below, her key cards have ovals on them and your key cards have rectangles on them.
As you can see, at first you and she have different key cards, but, and here’s the essential point, once you both land on the same card, you will have the same key cards from then onward. Thus, all you have to do is wait until you get near the end of the deck and stop on one of your key cards. If you are lucky, the two of you will be in sync by then and the trick will be a success.
In the example shown above you’re in sync when the seven of diamonds is dealt—the 31st card.
Note: in practice this card trick is quite successful. I played around with Random.org for a little while and was unable to find a shuffling that failed. One shuffling didn’t sync up until the second-to-last card though! Quite a few of the shufflings synced in the first or second row. Twice the first card was an ace, so they were in sync right from the beginning.
As I said in my last post, I do not know who to credit for this card trick. If you know, please post it in the comments.
The rules of the original card trick were slightly different than those I presented here. The face cards counted as 10′s. This is fine, but it decreases the probability of success, so I chose to spell the names of the face cards. Also, rather than having the other player draw a card at the start, she or he could mentally pick a card some time during the deal and start counting then. Again, this decreases the chances of success.
[Update: Thanks to John Allen Paulos who quickly responded on Twitter. He said that this trick is called the Kruskal count. He wrote about it in his 1998 book Once Upon a Number—The Hidden Mathematical Logic of Stories (he also proposes a biblical hoax that uses this trick). You can also read about the Kruskal count in Ivars Peterson's December 24, 2001 MathTrek article Guessing Cards. In his article he points to the article "The Kruskal Count," by Jeffrey C. Lagarias, Eric Rains, Robert J. Vanderbei in which they look at the probabilities of success for various face card values. Finally, here's a nice applet illustrating the Kruskal count (taking face cards to be 5's).]