Home > Riddles > The magician and the five cards

The magician and the five cards

Pure logicLevel 5 · Expert · ●●●●●

A spectator chooses 5 different cards from a standard deck of 52. The assistant sees the 5 cards, hands 4 to the magician (in the order he wants) and hides the fifth.

The magician, seeing only those 4 cards and their order, must say exactly what the hidden card is. Question: Can this trick always be guaranteed, no matter what 5 cards are drawn?

Hints

Show hints
  1. The coding is divided into three layers.
  2. Suit Between 5 cards and 4 suits, at least two share a suit. The wizard chooses that pair, hides one and shows the other as the first card. Thus the magician already knows the suit of the occult.
  3. Code with the order of 3 letters There are 3 letters left to send. Its 3!=6 possible orders encode the six values ​​of d. With a prior convention (e.g. lexicographic order), each permutation represents a number 1..6.

Solution

Show full solution

Back to problem
Answer: Yes, you can always.
The coding is divided into three layers.

  1. Stick

Between 5 cards and 4 suits, at least two share a suit.
The wizard chooses that pair, hides one and shows the other as the first card. Thus the magician already knows the suit of the occult.

  1. Distance value (1 to 6)

Sorts the 13 values in a cycle (A,2,...,K,A).
Between two cards of the same suit, one is a circular distance between 1 and 6 from the other in a clockwise direction.
The wizard decides which one to show and which to hide so that the hidden one is exactly at a distance $d\in\{1,\dots,6\}$ from the visible one.

  1. Code with the order of 3 cards

There are 3 letters left to send. Its $3!=6$ possible commands encode the six values ​​of $d$.
With a prior convention (e.g. lexicographic order), each permutation represents a number 1..6.
The magician reads:

  • suit and base value of the first card,
  • number $d$ from the order of the other three.

Advance $d$ positions in the cycle of the same suit and obtain the exact hidden card.


Related riddles

Keep practicing

If you enjoyed this one, try more pure-logic riddles, explore this theme, browse the full archive, or read the riddle-solving guide.

← Previous: The cursed chocolate (Chomp) · Next: The code with checksum and reverse →