Communicating the Card
(An implementation of the algorithm described in part 5 of the paper
Using a Card Trick to Teach Discrete Mathematics
by Shai Simonson and Tara S. Holm.)
(I first heard about this trick in December 2017 from hpmetsfan.)
- Have the magician leave the room, and ask audience for five distinct numbers between 1 and 100, inclusive.
- Type these numbers below, comma separated. (e.g. 27, 87, 93, 23, 59)
- [?, ?, ?, ?] ← (Once you hit "Compute!", four of the numbers should appear here.)
- Read the four numbers to the magician in the order that they appear.
- Enter assistant's numbers below, comma separated. (e.g. 59, 87, 27, 23)
- ??? ← (Once you hit "Compute!", one number should appear here.)
- Reveal the secret number to the audience!