Sunday 25 December 2016

Mystery calculator

I got the game binary card trick from a Christmas cracker. And I was really intrigued by the math behind it. Lets see how it works.

It consist of 6 cards, printed with a series of numbers. Show all the cards to your friends and ask them to select a number from one of the card. Then flash the card one by one and ask them if the selected number is present in the card. Take all the cards on which the number is present, add the number from the top left-hand corner on each card. The total is the number your friend has selected.











































Table to form the card

BinaryCard No.

Binary
Card No.
1
000000011
33
001000011, 6
2
000000102
34
001000102, 6
3
000000111, 2
35
001000111, 2, 6
4
000001003
36
001001003, 6
5
000001011, 3
37
001001011, 3, 6
6
000001102, 3
38
001001102, 3, 6
7
000001111, 2, 3
39
001001111, 2, 3, 6
8
000010004
40
001010004, 6
9
000010011, 4
41
001010011, 4, 6
10
000010102, 4
42
001010102, 4, 6
11
000010111, 2, 4
43
001010111, 2, 4, 6
12
000011003, 4
44
001011003, 4, 6
13
000011011, 3, 4
45
001011011, 3, 4, 6
14
000011102, 3, 4
46
001011102, 3, 4, 6
15
000011111, 2, 3, 4
47
001011111, 2, 3, 4, 6
16
000100005
48
001100005, 6
17
000100011, 5
49
001100011, 5, 6
18
000100102, 5
50
001100102, 5, 6
19
000100111, 2, 5
51
001100111, 2, 5, 6
20
000101003, 5
52
001101003, 5, 6
21
000101011, 3, 5
53
001101011, 3, 5, 6
22
000101102, 3, 5
54
001101102, 3, 5, 6
23
000101111, 2, 3, 5
55
001101111, 2, 3, 5, 6
24
000110004, 5
56
001110004, 5, 6
25
000110011, 4, 5
57
001110011, 4, 5, 6
26
000110102, 4, 5
58
001110102, 4, 5, 6
27
000110111, 2, 4, 5
59
001110111, 2, 4, 5, 6
28
000111003, 4, 5
60
001111003, 4, 5, 6
29
000111011, 3, 4, 5
61
001111011, 3, 4, 5, 6
30
000111102, 3, 4, 5
62
001111106, 2, 3, 4, 5, 6
31
000111111, 2, 3, 4, 5
63
001111111, 2, 3, 4, 5, 6
32
001000006





Say for instance, pinky selected the number 41. It's available in card 1, 4 and 6, adding the number on left-hand corner will give you 1+8+32 = 41. Thats really awesome isn't!

How it works?

Have a look at the number in top corner 1, 2, 4, 8, 16, 32. Do you see a pattern?

Thats right, they are powers of 2.
2^0, 2^1,  2^2, 2^3, 2^4, 2^5

Although the number written in those cards looks like randomly selected ones, they are specifically chosen to appear on the card between 1 to 63. All the available numbers in the card can be written using power of 2 because binary/base-2 numbers system used to make up the cards.

How to make up the cards?
Write down the binary expansion of numbers from 1 to 63 as shown in the above table. The numbers in card 1 are the numbers which has one at the 1st position (starting from right to left), numbers in card 2 are those have one at 2nd position and so on.

Since we have six cards, the number 63 is chosen as the max 2^8-1. If we want to add one more card the max number to discover would be 2^9-1 and so on.

Reference:

http://www.norsemathology.org/wiki/index.php?title=Binary_Cards#The_Prime_Card_Trick

No comments:

Post a Comment