CSE 111, Fall 2004
BINARY MAGIC ANSWER
Here's how to do the trick:
Add up the number on the upper left corner of those cards that the
audience answered "yes" to.
For example: An audience member who is 20 years old would pick out the
third and fifth cards, which are the only ones with "20" on them. The
numbers on the upper left corner of those cards are 4 and
16,
respectively, which add up to 20!
1 | 11 | 21 | 31 | 41 | 51 |
3 | 13 | 23 | 33 | 43 | 53 |
5 | 15 | 25 | 35 | 45 | 55 |
7 | 17 | 27 | 37 | 47 | 57 |
9 | 19 | 29 | 39 | 49 | 59 |
|
2 | 11 | 22 | 31 | 42 | 51 |
3 | 14 | 23 | 34 | 43 | 54 |
6 | 15 | 26 | 35 | 46 | 55 |
7 | 18 | 27 | 38 | 47 | 58 |
10 | 19 | 30 | 39 | 50 | 59 |
|
4 | 13 | 22 | 31 | 44 | 53 |
5 | 14 | 23 | 36 | 45 | 54 |
6 | 15 | 28 | 37 | 46 | 55 |
7 | | 29 | 38 | 47 | 60 |
12 | 21 | 30 | 39 | 52 | ** |
|
8 | 13 | 26 | 31 | 44 | 57 |
9 | 14 | 27 | 40 | 45 | 58 |
10 | 15 | 28 | 41 | 46 | 59 |
11 | 24 | 29 | 42 | 47 | 60 |
12 | 25 | 30 | 43 | 56 | ** |
|
16 | 21 | 26 | 31 | 52 | 57 |
17 | 22 | 27 | 48 | 53 | 58 |
18 | 23 | 28 | 49 | 54 | 59 |
19 | 24 | 29 | 50 | 55 | 60 |
| 25 | 30 | 51 | 56 | ** |
|
32 | 37 | 42 | 47 | 52 | 57 |
33 | 38 | 43 | 48 | 53 | 58 |
34 | 39 | 44 | 49 | 54 | 59 |
35 | 40 | 45 | 50 | 55 | 60 |
36 | 41 | 46 | 51 | 56 | ** |
|
And here's how it works:
The decimal numeral 20 is represented in 6-bit binary notation by:
010100
(Why 6-bits? Because that's how many "cards" there are in the trick.
If you wanted to use 8-bit binary numerals, you would need 8 cards, and
vice versa. That way, you could let the audience guess even larger
numbers. Questions to think about: How many cards (or bits) would you
need to allow the audience to choose any number from 0 to 100? And, if
you used that many cards, what is the largest number the audience could
choose?)
Using 0 to represent "no" and 1 to represent "yes",
this numeral, 010100, can be interpreted to mean:
0 32s (the person answered "no" for card 32)
1 16 (the person answered "yes" for card 16)
0 8s (the person answered "no" for card 8)
1 4 (the person answered "yes" for card 4)
0 2s (the person answered "no" for card 2)
0 1s (the person answered "no" for card 1)
Now, letting "*" represent multiplication, we have:
(0 * 32) | + | (1 * 16) | + | (0 * 8) | + | (1 * 4) | + | (0 * 2) | + | (0 * 1) | = |
|
0 | + | 16 | + | 0 | + | 4 | + | 0 | + | 0 | = |
|
| | 16 | + | | | 4 | | | | | = |
|
| | | | 20 |
Back to the trick
Copyright © 2004 by
William J. Rapaport
(rapaport@cse.buffalo.edu)
file: 111F04/binarymagicanswer-2004-08-24.html