Analysis and a variant of “The Premo” card trick

As part of last week’s discussion of card shuffling, I mentioned “The Premo,” a card trick worked out by Charles Jordan almost 100 years ago, and analyzed by Bayer and Diaconis in 1992 (see the references at the end of this post).  This week I want to focus on how this trick works, and more importantly, how frequently it doesn’t work… and finally, to propose a variant that I think is a slightly more powerful yet still robust effect.

(Card games in general, and card magic in particular, are a great source of interesting problems in mathematics and computer science.  This isn’t the first time card tricks have come up here; see here for another of my favorite “mathematical” card tricks.)

To begin, following is a description of the original effect as described by Bayer-Diaconis (reference 1):

The performer removes a deck of cards from its case, hands it to a spectator and turns away from the spectators: “Give the deck a cut and a riffle shuffle. Give it another cut and another shuffle. Give it a final cut. I’m sure you’ll agree that no living human could know the name of the top card. Remove this card, note its value, and insert it into the pack. Give the pack a further cut, a final shuffle, and a final cut.” Now the performer takes back the pack, spreads it in a wide arc on the table, and, after staring intensely, names the selected card.

The trick is based on the observation that even after three riffle shuffles, the resulting arrangement of cards still has a lot of exploitable structure (assuming that the initial arrangement was known), and it is possible to identify a card that has been moved from its “place” in that structure.  I like this trick, not just because it is a pretty powerful effect, but also because it is relatively simple to learn… and because it is amenable to computer analysis, which makes for a great programming project for students.  (E.g., how do you model and implement riffle shuffling a deck?  Can you do it in place?  Etc.)

With surprisingly little practice, you can learn to spot the selected card reasonably quickly, especially with some distracting patter while you’re looking.  I will leave you to consult the references for good explanations of how the trick works.  [Edit: I put together a description of the trick, with a visual example, on my web site here.]  I want to focus instead on the following interesting comment by Bayer and Diaconis:

The trick as described is not sure-fire… as expected, the trick is most successful when the card is moved after [my emphasis] the final shuffle. We programmed a computer to shuffle the cards [three] times according to the GSR distribution, cut the deck uniformly at random, move the top card to a binomially distributed position and then cut the deck again.

In other words, there is some probability that the trick will fail, and Bayer-Diaconis suggest that we can reduce this probability of failure by waiting to select a card until after the third and final shuffle.  If this were true, I think this would detract from the effect; that extra shuffle after re-inserting the selected card makes it seem that much more challenging to find the card.

Unfortunately, my initial computer simulations seemed to agree with this; the Bayer-Diaconis version worked about 84% of the time, while the original trick only worked about 43% of the time!  I thought something must surely be wrong with my model or my code.  Otherwise, who would bother with an effect that worked less than half the time?

Things got more interesting when I tracked down the following variant in a collection of Jordan’s tricks (reference 2):

The spectator cuts the deck, gives it a shuffle, cuts it again and then gives it another shuffle.  He removes the top quarter of the deck, takes the top card of the larger packet and replaces the top quarter back on top.  The card removed from the deck is looked at and replaced on top or bottom.  The deck is cut and then given another shuffle.

In this version, the final shuffle comes after the card is selected, but there are a couple of differences: (1) the selected card is moved from inside the pack to the top, not the other way around; and (2) the “distance” that the card is moved is explicitly specified, about one quarter of the deck.

What is interesting about this variant is that it also works about 84% of the time!  This led me to suspect that the critical variable in the trick was not whether the card is selected before or after the third and final shuffle, but how far in the deck the selected card is moved.

To verify this, I considered 256 different variations on the trick:

  1. Select the card before or after the final shuffle (2 options);
  2. Select the top card and insert it into the pack, or select a card from inside the pack and move it to the top (2 options);
  3. Before and after each of the four shuffle/select steps, choose whether to cut the deck or not (32 options);
  4. For the cuts of the deck, use a uniform or binomial distribution (2 options).

For each variant, I estimated the probability that the trick succeeds, as a function of the position in the deck where the selected card is inserted (or taken).  The result is the following figure:

Premo

Probability of success of variants of the Premo card trick.

Each variant falls into one of two categories, indicated by the single- and double-peaked curves above.  It turns out that only option (1) above matters: if the card is selected after the third shuffle, the trick behaves according to the single-peaked curve.  If the card is selected before the third shuffle, we get the double-peaked curve.

This explains the behavior observed in the Bayer-Diaconis version; by selecting an insertion position with a binomial distribution, most of the time we are near the relatively flat single peak, and the trick usually works.  Even more interesting, this also explains Jordan’s motivation for explicitly cutting one quarter of the pack in his version, since this is the first peak of the double-peaked curve.  I find this amazing; remember, Jordan came up with this almost a century ago.

So we see now that it is possible for the trick to succeed with high probability even when shuffling after selecting the card… but only as long as we are careful about exactly where the selected card is moved.  Jordan’s approach is to explicitly tell the spectator to cut to one quarter of the deck, to stay near the first of the two peaks in the curve above.  But it is worth observing that either of the two peaks is acceptable.  That is, viewing the deck cyclically, we just need to move the selected card about 13 cards forward or backward in the deck.

To that end, my wife suggested the following great twist on the trick, which I think hides the ruse more effectively, and still ensures a high probability of success without the magician ever having to touch the deck: the magician tells the spectator, “Cut the deck, give it a riffle shuffle, then cut, shuffle, and cut again.  Now cut the deck into two roughly equal packs and place both on the table.  Pick one of the two packs, and take the top card from that pack and look at and remember it.  Now insert your card into the center of either of the two packs, and place one pack on top of the other.  Give the deck another cut, another shuffle, and a final cut.”

I think the two-stage division into “roughly equal packs” and “insert into the center (of half a deck)” seem less contrived than trying for exactly one quarter of the full deck.  And the reader can verify that, no matter how the spectator selects a pack, selects his card, or reassembles the deck, the end result is that the selected card has moved approximately 13 cards from its original position in the cycle.

References:

  1. Bayer and Diaconis, Trailing the Dovetail Shuffle to its Lair. Ann. Appl. Prob., 2(2):294-313. (1992) [PDF]
  2. Fulves, Karl, Charles Jordan’s Best Card Tricks. Mineola: Dover Publications, 1992, p. 118-119. [Google Books]
This entry was posted in Uncategorized. Bookmark the permalink.

6 Responses to Analysis and a variant of “The Premo” card trick

  1. Pingback: Generalizing Fitch Cheney’s Five-Card Trick | Possibly Wrong

  2. Pingback: Card Shuffling: You’re Not Done Yet | Possibly Wrong

  3. Thanks for this – your wife’s method works well. I’ve had some fun writing a Python script so that you can start with the deck in any random order (not just new deck order) and have the script do the hard work of working out which card has the longest p(c) – c – s(c) chain

  4. Pingback: Analysis and a variant of “The Premo” card trick - Nevin Manimala's Blog

  5. ivanborsenco says:

    Thank you for very nice explanation. I was thinking how to make “Premo”
    into a trick that can be shown with success in public, a trick that doesn’t require hand dexterity to implement and based on pure math. Here are some details that are missing and some difficulties that I faced with when performing it.

    1. After 3 riffle shuffles it takes too much time to find the missing card.
    Placing all of them on the table helps, but still… The “magician” needs a way to make his search of card to look natural and effortless. If you start counting (in your head) the audience easily spots the “crux” of the trick.

    2. The 52 card deck is too big. It is hard to make a good riffle shuffle for an unexperienced person. The bigger is the deck the harder is to search. I think it is better to reduce the deck, say to 36 cards.

    3. Don’t forget about staging the trick. What should be the on-going story told by the magician to distract people and the whole presentation? I will be happy to find out how people would do that. How do we end the trick? How do we make “guessing” the card look showy?

    A possible suggestion on how to make it work.

    Instead of 3 shuffles, there will be 2 shuffles and say 36 cards (no 2, 3, 4, 5) – this makes search much simpler. Let’s call the trick: “Reading the person’s body language”, M = magician and P = person from the audience. M finds P and starts a conversation on how body language reveals a lot about person’s character, etc. M tells that he has been practicing lately to read info from people’s gestures and by looking into their eyes.

    M takes a deck of cards from the pocket, opens the card box, takes say 36 cards (which are in a setup) and places them on a table. M tells P that he wants to practice and will try to read P’s body language (eyes) by asking questions, by looking at P and seeing P’s reaction.
    Note: M doesn’t say a word about magic trick, it is just happened that M has a deck of cards.
    M doesn’t want too much unnecessary attention and if the trick doesn’t work, M can always have a way out by saying he was just practicing.

    (1) I suggest to setup cards as follows:
    A(C) 6(D) K(C) 7(D),…, 6(C), A(D), 6(H), A(S), 7(H), K(S), …, A(H), 6(S)

    We want to have alternating ordered suits, say clubs and diamonds; hearts and spades.
    Also, we need to mix their ranks, because we will shuffle cards only two times.
    The bottom card is of low value (less suspicion just in case).

    (2) M teaches P how to shuffle (not all people know that).
    M shows how to split the deck into two and how to bring the deck together (one “cut”).
    Then M shows how to make a riffle shuffle. M does it himself (one “riffle shuffle”).
    Because of the setup, suits will interleave well. Then M briefly shows P the cards in the deck (face up), to persuade P that there is no setup (regarding suit colors, ranks) and that cards are mixed well.

    (3) M gives cards to P. Asks to make (one “cut”). Then asks to split the deck into halves,
    pick a card from one half, remember it, place it wherever P wants (same half or another)
    and bring the deck together. Then M asks P to make a riffle shuffle and make one more cut.

    (4) Next, M places cards one by one in a semi-circle on a table. M asks P to pay attention
    if P’s card is there but say no word about it. This way M tries to reduce P’s attention to his starring at the card sequence. At the same time, when M places cards, M periodically looks at P, and most importantly scans at the same time two suits (diamonds and hearts) for the pattern. Once M is done laying the cards and scanning red cards, he asks P:
    Is your card red? Is your card black? (No answer is needed, just eye contact).
    Then:
    Is you card on the left of the semicircle? Is you card in the middle of the semicircle? Is you card in the right of the semicircle?

    Then M quickly scans one more time the deck, this time for clubs and spades, and hopefully figures out P’s card. Then knowing what it is (say black), M can ask: Is it clubs? Is it spades?
    (First small surprise for P, because M somehow ruled out two suits).
    Then M asks if it is a low card? Is it a high card?

    This is the time to enjoy eye-contact and time for jokes. M can make compliments
    about P’s reactions. Then reduces it to three-four questions:
    Is it a 10? Is it a Jack? Is it a Queen? Is it a King?
    Finally, M can say that it is a pleasure to have such and such person in front of him
    and says that he thinks that P’s card is …
    (Not the most dramatic way to end the trick, maybe someone suggests a better one).

    I will be glad to find out how other people would implement this math card trick and make it look simple.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.