Date post: | 22-Dec-2015 |
Category: |
Documents |
View: | 215 times |
Download: | 0 times |
You Too Can be a Mathematician Magician
John Bonomo
Westminster College
////////////////////////
The Basic Trick
• Volunteer picks one of 15 cards (call this the “key” card)
• Cards dealt in three piles, volunteer identifies “key” pile
• Pick up piles with key pile in the middle
• After three passes, key card is in the middle of the deck
Two Modifications
• Place key card in any location of the deck
• Allow users to pick up the decks
Analysis
03
69
12
14
710
13
25
811
14
← Row 0← Row 1
← Row 2← Row 3
← Row 4
f(p) = 5 + p/3
• Let p = position prior to deal
• Then new position is given by
p3 = f(p2)
• Let p0 = initial position; p1, p2, p3, positions after deals 1, 2 and 3
= f(f(p1)) = f(f(f(p0)))
p3 =
• Let p0 = initial position; p1, p2, p3, positions after deals 1, 2 and 3
7 + 6 + p0
27
• Since 0 ≤ p0 ≤ 14, we have
p3 = 7 + 6 + p0
27
p3 = 7
= 5 + 2 + 6 + p0
27
p3 = 7 + 6 + p0
27
base offset
• Generalized position function:
• Where i = 0 (bottom pile),
1 (middle pile),
2 (top pile)
fi(p) = 5i + p/3
0
i1 1
2
0
i2
1 2
12 + p04 + 27
6 + p02 + 27
24 + p03 + 27
18 + p01 + 27
21 + p02 + 27
15 + p0 27
3 + p01 + 27
9 + p03 + 27
p0 27
0 ≤ p0 ≤ 14
0
i1 1
2
0
i2
1 2
24 + p03 + 27
18 + p01 + 27
21 + p02 + 27
15 + p0 27
0 ≤ p0 ≤ 14
0
1
2
3
4
What’s your favorite number? Nine
Nine
8 = 9 - 18 = 5 + 3
i1=0, i2=2, i3=1Bottom, top, middle
9 = 8 - 18 = 5 + 3
i1=0, i2=2, i3=1Bottom, top, middle
Why is your face so sweaty?
And pale?
Zzzzzzzzz…
0
i1 1
2
0
i2
1 2
24 + p03 + 27
18 + p01 + 27
21 + p02 + 27
15 + p0 27
0 ≤ p0 ≤ 14
0
1
2
3
4
0
i1 1
2
0
i2
1 2
24 + p03 + 27
18 + p01 + 27
21 + p02 + 27
0 ≤ p0 ≤ 14
0
1
2
3
4
0, 0 ≤ p0 ≤ 11
1, 12 ≤ p0 ≤ 14
0
i1 1
2
0
i2
1 2
0 ≤ p0 ≤ 14
0
1
2
3
4
0, 0 ≤ p0 ≤ 11
1, 12 ≤ p0 ≤ 14
1, 0 ≤ p0 ≤ 8
2, 9 ≤ p0 ≤ 14
2, 0 ≤ p0 ≤ 5
3, 6 ≤ p0 ≤ 14
3, 0 ≤ p0 ≤ 2
4, 3 ≤ p0 ≤ 14
0
i1 1
2
0
i2
1 2
0 ≤ p0 ≤ 14
0: 100%
1: 100%
2: 100%
3: 100%
4: 100%
0, 0 ≤ p0 ≤ 11
1, 12 ≤ p0 ≤ 14
1, 0 ≤ p0 ≤ 8
2, 9 ≤ p0 ≤ 14
2, 0 ≤ p0 ≤ 5
3, 6 ≤ p0 ≤ 14
3, 0 ≤ p0 ≤ 2
4, 3 ≤ p0 ≤ 14
0
i1 1
2
0
i2
1 2
0 ≤ p0 ≤ 14
0: 100%
1: 100%
2: 100%
3: 100%
4: 100%
1, 0 ≤ p0 ≤ 8
2, 9 ≤ p0 ≤ 14
2, 0 ≤ p0 ≤ 5
3, 6 ≤ p0 ≤ 14
3, 0 ≤ p0 ≤ 2
4, 3 ≤ p0 ≤ 14
0: 80%
1: 20%
0
i1 1
2
0
i2
1 2
0 ≤ p0 ≤ 14
0: 100%
1: 100%
2: 100%
3: 100%
4: 100%
0: 80%
1: 20%
1: 60%
2: 40%
2: 40%
3: 60%
3: 20%
4: 80%
Always pick the “best” card
• 87% chance of selecting key card on first pick
• 100% chance of selecting key card on second pick (if necessary)
Generalize “Any Position” Trick
• n piles of m cards each
• still use only three deals
• Two questions:
– What values of n and m work?
– How do we determine i1, i2 and i3?
m ≤n2 + gcd(n2,m)
2
n
(piles)
m
(cards in pile)
3 1,…,6,9
5 1,…,13,15,25
6 1,…,18,20,24,36
m ≤n2 + 1
2(n,m relatively prime)
Valid n,m pairs
Determine i1,i2 and i3 for a given location L
Let s = (L mod m) n2
m
Then i1 = s mod n
i2 = s/n
i3 = L/m
Example: n=5, m=11 L = 40-1 = 39
i1 = 14 mod 5 = 4
i2 = 14/5 = 2
i3 = 39/11 = 3
s =(39 mod 11) 52
11= 14