The Secret Math Behind Mind-Reading Magic Tricks | Quanta Magazine
combinatoricsde-bruijn-sequencenumber-theorymathematical-puzzlesmagic
Abstraction: Mathematical structures — de Bruijn sequences and logic deduction — underlying magic tricks
Key points:
- 7 × 11 × 13 = 1,001, so multiplying any 3-digit number by these factors yields two copies of it side by side — a child-friendly arithmetic trick
- The Freudenthal "impossible puzzle" (two mathematicians deduce hidden numbers from sum/product alone) is solved via iterated elimination using shared knowledge; solutions for range 2–9 are (3,4) and (3,6), with (3,4) being the stable solution
- A de Bruijn sequence of order n over alphabet size k is a cyclic sequence containing every possible length-n subsequence exactly once; order-5 binary de Bruijn sequence has 2^5=32 elements — matching a stripped deck of 32 cards
- Cutting a de Bruijn sequence (as with a card deck) preserves the property; knowing which of 5 cards are red uniquely identifies all 5
- De Bruijn sequences also appear in genome assembly algorithms using de Bruijn graphs
- The Freudenthal puzzle solution requires Goldbach conjecture to hold (verified up to 4×10^18) to exclude even sums
Connections: Persi Diaconis · Hans Freudenthal · De Bruijn Sequence · Combinatorics · Information Theory
Source: https://www.quantamagazine.org/the-secret-math-behind-mind-reading-magic-tricks-20220527/