Five cards enter the scene. One disappears, and the other four reach the magician in a carefully chosen order. There are no words, gestures, or marked cards.
The Magician and the Five Cards
Riddle statement
A spectator chooses five distinct cards from a standard 52-card deck and hands them to a magician's assistant.
The assistant:
- examines all five cards;
- hides one of them;
- hands the other four to the magician, one at a time, in any chosen order.
The magician may see only the identities of those four cards and the order in which they are presented. No words, gestures, or other signals are allowed.
Before the trick begins, the magician and assistant may agree on a fixed system.
How can they guarantee that the magician always determines the hidden card?
Show solution
Solution
Answer: the trick can always be performed.
The protocol combines three ideas:
- two of the five cards share a suit;
- one can serve as a starting point for the other;
- the order of the remaining three cards can communicate one of six numbers.
1. Agree on two orderings
The magician and assistant first agree on the cyclic rank order:
They also agree on a total ordering of all cards. For example:
- compare ranks using \(A<2<\cdots<10<J<Q<K\);
- when ranks are equal, use clubs \(<\) diamonds \(<\) hearts \(<\) spades.
This second ordering is used only to sort three cards from lowest to highest.
2. Find two cards of the same suit
The deck has four suits, but the spectator has chosen five cards.
By the pigeonhole principle, at least two of them share a suit.
Call two such cards \(X\) and \(Y\).
One will be shown first, while the other will be hidden.
The first card immediately tells the magician the suit of the hidden card.
Only its rank still needs to be communicated.
3. Choose a distance from 1 to 6
The thirteen ranks form a cycle.
If the forward distance from \(X\) to \(Y\) is \(r\), the forward distance from \(Y\) to \(X\) is:
The two distances add to 13. Exactly one of them therefore belongs to:
The assistant chooses as the first card the one from which the other can be reached in one to six forward steps.
The first card is the base card, and the other is the hidden card.
The hidden card is now determined by:
- the suit of the base card;
- a distance \(d\in\{1,2,3,4,5,6\}\).
4. Encode the distance with the other three cards
After choosing the base and hidden cards, three cards remain.
Sort them using the agreed total order and call them:
where \(L\), \(M\), and \(H\) are the low, middle, and high cards.
Those three cards have exactly:
possible permutations.
The magician and assistant agree on this table:
| Distance | Order of the three cards |
|---|---|
| 1 | \(L,M,H\) |
| 2 | \(L,H,M\) |
| 3 | \(M,L,H\) |
| 4 | \(M,H,L\) |
| 5 | \(H,L,M\) |
| 6 | \(H,M,L\) |
The assistant presents:
- the base card first;
- the other three cards in the permutation encoding \(d\).
5. How the magician decodes the message
On receiving the four cards, the magician:
- reads the suit of the first card: this is the hidden card's suit;
- mentally sorts the remaining three as \(L<M<H\);
- compares their received order with the table to recover \(d\);
- moves \(d\) steps forward from the first card's rank within the same suit.
The resulting card is the hidden one.
6. A complete example
Suppose the five cards are:
- three of spades;
- nine of spades;
- ace of hearts;
- seven of clubs;
- king of diamonds.
The two spades are the three and the nine.
Moving forward from three to nine gives:
a distance of 6.
The assistant:
- shows the three of spades first;
- hides the nine of spades;
- must encode the distance 6.
The other three cards, from low to high, are:
Distance 6 is encoded as high–middle–low:
The magician therefore receives:
The first card says that the hidden card is a spade. The order of the remaining cards says 6. Moving six ranks forward from three reaches nine.
The hidden card is:
7. Why the protocol never fails
Every selection of five cards contains two cards of the same suit.
For every same-suit pair, one of the two circular directions has length between 1 and 6.
The remaining three cards have exactly six possible orders, enough to communicate any of those six distances.
The protocol therefore works for every possible selection of five cards.
Key idea: the first card communicates the suit and supplies a starting rank. The order of the other three communicates a distance. Together, those pieces of information determine the hidden card exactly.