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:


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.


  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.

4 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

Leave a Reply

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

You are commenting using your 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 )


Connecting to %s