An assistant hands over four cards, and a magician instantly names the hidden fifth
A spectator picks five cards at random from a shuffled deck. An assistant looks at them, then hands a magician four of the five, one at a time, face up, with no words exchanged. The magician, who never saw the original five, instantly names the fifth card. No signals, no sleight of hand — just the order and identity of four cards. How does she encode a specific answer out of 48 possibilities?
Reveal the answer
Among any five cards, pigeonhole logic guarantees two share a suit. One of that pair is shown first, revealing the hidden card's suit; the other becomes the hidden card itself. Its rank is found by counting a fixed small distance from the shown card's rank, and that distance — a number from 1 to 6 — is secretly encoded in the order the remaining three cards are handed over. Mathematician William Fitch Cheney Jr. devised the trick in the 1950s.
— Martin Gardner, Mathematics, Magic and Mystery — Dover Publications, 1956