Card Shuffling As A Dynamical System
Card Shuffling As A Dynamical System
Dynamical System
Dr. Russell Herman
Department of Mathematics and Statistics
University of North Carolina at Wilmington
How does a magician know that the eighth card in a deck of 50 cards returns to it
original position after only three perfect shuffles? How many perfect shuffles will
return a full deck of cards to their original order? What is a "perfect" shuffle?
Introduction
History of the Faro Shuffle
The Perfect Shuffle
Mathematical Models of Perfect Shuffles
Dynamical Systems – The Logistic Model
Features of Dynamical Systems
Shuffling as a Dynamical System
A Bit of History
History of the Faro Shuffle
Cards
Western Culture - 14th Century
Jokers – 1860’s
Pips – 1890’s added numbers
First Card tricks by gamblers
Origins of Perfect Shuffles not known
Game of Faro
18th Century France
Named after face card
Popular 1803-1900’s in the West
The Game of Faro
Decks shuffled and rules are simple
(fâr´O) [for Pharaoh, from an old French playing card design],
gambling game played with a standard pack of 52 cards. First played in
France and England, faro was especially popular in U.S. gambling
houses in the 19th Century. Players bet against a banker (dealer), who
draws two cards–one that wins and another that loses–from the deck
(or from a dealing box) to complete a turn. Bets–on which card will
win or lose– are placed on each turn, paying 1:1 odds. Columbia
Encyclopedia, Sixth Edition. 2001
Players bet on 13 cards
Lose Slowly!
Copper Tokens – bet card to lose
“Coppering”, “Copper a Bet”
Analysis – De Moivre, Euler, …
The Game
Wichita Faro
http://www.gleeson.us/faro/ http://www.bcvc.net/faro/rules.htm
Perfect (Faro or Weave) Shuffle
Problem:
Divide 52 cards into 2 equal piles
Shuffle by interlacing cards
Keep top card fixed (Out Shuffle)
8 shuffles => original order
True for x = 1 !
Thus, 51 divides 2 k - 1
k= 6, 2 k - 1 = 63 = 3(21)
k= 7, 2 k - 1 = 127
k= 8, 2 k - 1 = 255 = 5(51)
Generalization to n cards
The Out Shuffle
The In Shuffle
Representations for n Cards
0 p n 1
In Shuffles
mod n 1, n even
I ( p) 2 p 1
mod n, n odd
Out Shuffles
mod n 1, n even and 0 p n 1
O( p) 2 p
mod n, n odd and 0 p n 1
Order of Shuffles
8 Out Shuffles for 52 Cards
In General?
o (O,2n-1) = o (O,2n)
o (I,2n-1) = o (O,2n)
=> o (O,2n-1) = o (I,2n-1)
o (I,2n-2) = o (O,2n)
Therefore, only need o (O,2n)
o (O,2n) = Order for 2n Cards
One Shuffle: O(p) = 2p mod (2n-1), 0<p<N-1
2 shuffles:
O2(p) = 2 O(p) mod (2n-1) = 22 p mod (2n-1)
Demonstration
Another Model for 2n Cards
Label positions with rationals
Out Shuffle 0 1 2 2n 1
0 , , , , 1.
2n 1 2 n 1 2n 1 2n 1
Example: Card 10 of 52: x = 9/51
1 2 2n
In Shuffle ,
2n 1 2 n 1
, ,
2n 1
.
More Iterations
Fixed Points
f(x*) = x*
x*= r x*(1-x*)
=> 0 = x*(1-r (1-x*) )
=> x* = 0 or x* = 1 – 1/r
Period k
- smallest k
such that f k (x*) = x*
Periodic Cobwebs
Stability
Fixed Points
|f’(x*)| <1
Periodic Orbits
|f’(x0)| |f’(x1)| … |f’(xn)| < 1
Bifurcations
Bifurcations
r1 = 3.0
r2 = 3.449490 ...
r3 = 3.544090 ...
r4 = 3.564407 ...
r5 = 3.568759 ...
r6 = 3.569692 ...
r7 = 3.569891 ...
r8 = 3.569934 ...
Itineraries: Symbolic Dynamics
For G (x) = 4x ( 1-x )
Assign Left “L” and Right “R”
Example: x0 = 1/3
x0 = 1/3 => “L”
x1 = 8/9 => “LR”
x2 = 32/81 => “LRL”
x3 = … => “LRL …”
Example: x0 = ¼
{ ¼, ¾, ¾, …}=>” LRRRR…”
Periodic Orbits
“LRLRLR …”, “RLRRLRRLRRL …”
Shuffling as a Dynamical System
1
2 x, 0x
2
S ( x) .
2 x 1, 1 x 1
2
S(x) vs S4(x)
Demonstration
Iterations for 8 Cards
S3(x) vs S2(x)
S3(x) vs S2(x)
Thank you !