Card Shuffling as a Dynamical System - PowerPoint PPT Presentation

About This Presentation
Title:

Card Shuffling as a Dynamical System

Description:

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? – PowerPoint PPT presentation

Number of Views:488
Avg rating:3.0/5.0
Slides: 48
Provided by: UNCWSt2
Category:

less

Transcript and Presenter's Notes

Title: Card Shuffling as a Dynamical System


1
Card Shuffling as a Dynamical System
Dr. Russell HermanDepartment of Mathematics and
StatisticsUniversity 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?  
2
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

3
A Bit of History
4
History of the Faro Shuffle
  • Cards
  • Western Culture - 14th Century
  • Jokers 1860s
  • Pips 1890s 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-1900s in the West

5
The Game of Faro
  • Decks shuffled and rules are simple
  • (fârO) 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
    cardsone that wins and another that losesfrom
    the deck (or from a dealing box) to complete a
    turn. Betson which card will win or lose are
    placed on each turn, paying 11 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,

6
The Game
Wichita Faro http//www.gleeson.us/faro/
http//www.bcvc.net/faro/rules.htm
7
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 gt original order

What is a typical Riffle shuffle?
What is a typical Faro shuffle?
8
See!
Period 2 _at_ 18 and 35!
9
History of Faro Shuffle
  • 1726 Warning in book for first time
  • 1847 J H Green Stripper (tapered) Cards
  • 1860 Better description of shuffle
  • 1894 How to perform
  • Koschitzs Manual of Useful Information
  • Maskelynes Sharps and Flats 1st Illustration
  • 1915 Innis Order for 52 Cards
  • 1948 Levy O(p) for odd deck, cycles
  • 1957 Elmsley Coined In/Out - shuffles

10
Mathematical Models
11
A Model for Card Shuffling
  • Label the positions 0-51
  • Then
  • 0-gt0 and 26 -gt1
  • 1-gt2 and 27 -gt3
  • 2-gt4 and 28 -gt5
  • in general?
  • Ignoring card 51 f(x) 2x mod 51
  • Recall Congruences
  • 2x mod 51 remainder upon division by 51

12
The Order of a Shuffle
  • Minimum integer k such that 2 k x x mod 51 for
    all x in 0,1,,51
  • True for x 1 !
  • Minimum integer k such that 2 k - 1 0 mod 51
  • 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)

13
Generalization to n cards
14
The Out Shuffle
15
The In Shuffle
16
Representations for n Cards
  • In Shuffles
  • Out Shuffles


17
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)
  • gt o (O,2n-1) o (I,2n-1)
  • o (I,2n-2) o (O,2n)
  • Therefore, only need o (O,2n)

18
o (O,2n) Order for 2n Cards
  • One Shuffle O(p) 2p mod (2n-1), 0ltpltN-1
  • 2 shuffles O2(p) 2 O(p) mod (2n-1) 22
    p mod (2n-1)
  • k shuffles Ok(p) 2kp mod (2n-1)
  • Order o (O,2n) smallest k for 0 lt p lt 2n such
    that Ok(p) p mod (2n-1)
  • Or, 2k 1 mod (2n-1) gt (2n 1) (2k 1)

19
The Orders of Perfect Shuffles
n o(O,n) o(I,n) n o(O,n) o(I,n) 2 1 2
13 12 12 3 2 2 14 12 4 4 2 4 15 4
4 5 4 4 16 4 8 6 4 3 17 8 8 7 3 3 18
8 18 8 3 6 50 21 8 9 6 6 51 8 8 10 6 10 52
8 52 11 10 10 53 52 52 12 10 12 54 52 20
Demonstration
20
Another Model for 2n Cards
  • Label positions with rationals
  • Out Shuffle
  • Example Card 10 of 52 x 9/51
  • In Shuffle
  • Example Card 10 of 52 x 9/51

21
Shuffle Types
All denominators are odd numbers.
22
Doubling Function
23
Discrete Dynamical Systems
  • First Order System xn1 f (xn)
  • Orbits x0, x1,
  • Fixed Points
  • Periodic Orbits
  • Stability and Bifurcation
  • Chaos !!!!

24
The Logistic Map
  • Discrete Population Model
  • Pn1 a Pn
  • Pn1 a2 Pn-1
  • Pn1 an P0
  • agt1 gt exponential growth!
  • Competition
  • Pn1 a Pn - b Pn2
  • xn (a/b)Pn, ra/b gt
  • xn1 r xn(1 - xn), xne0,1 and re0,4

25
Example r2.1
Sample orbit for r2.1 and x0 0.5
26
Example r3.5
27
Example r3.56
28
Example r3.568
29
Example r4.0
30
Iterations
  • More Iterations

31
Fixed Points
  • f(x) x
  • x r x(1-x)
  • gt 0 x(1-r (1-x) )
  • gt x 0 or x 1 1/r
  • Logistic Map - Cobwebs

32
Periodic Orbits for f(x)rx(1-x)
  • Period 2
  • x1 r x0(1- x0) and x2 r x1(1- x1) x0
  • Or, f 2 (x0) x0
  • Period k
  • - smallest k such that f k (x) x
  • Periodic Cobwebs

33
Stability
  • Fixed Points
  • f(x) lt 1
  • Periodic Orbits
  • f(x0) f(x1) f(xn) lt 1
  • Bifurcations

34
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 ...

35
Itineraries Symbolic Dynamics
  • For G (x) 4x ( 1-x ) Assign Left L and Right
    R
  • Example x0 1/3
  • x0 1/3 gt L
  • x1 8/9 gt LR
  • x2 32/81 gt LRL
  • x3 gt LRL
  • Example x0 ¼
  • ¼, ¾, ¾, gt LRRRR
  • Periodic Orbits
  • LRLRLR , RLRRLRRLRRL

36
Shuffling as a Dynamical System
S(x) vs S4(x)
37
Demonstration
38
Iterations for 8 Cards
39
S3(x) vs S2(x)
S3(x) vs S2(x)
How can we study periodic orbits for S(x)?
40
Binary Representations
  • Binary Representation
  • 0.101121(2-1)0(2-2)1(2-3)1(2-4)
  • 1/2 1/8 1/16 10/16 5/8
  • xn1 S(xn), given x0
  • Represent xns in binary x0 0.101101
  • Then, x1 2 x0 1 1.01101 1 0.01101
  • Note S shifts binary representations!
  • Repeating Decimals
  • S(0.101101101101) 0.011011011011
  • S(0.011011011011) 0.110110110110

41
Periodic Orbits
  • Period 2
  • S(0.10101010) 0.01010101
  • S(0.01010101) 0.10101010
  • 0.102, 0.012, 0.112 ?
  • Period 3
  • 0.1002, 0.0102, 0.0012 ?
  • 0.1102, 0.0112, 0.1012 ?
  • Maple Computations

42
Card Shuffling Examples
  • 8 Cards All orbits are period 3
  • 52 Cards Period 2
  • 50 Cards Period 3 Orbit (Cycle)
  • Recall
  • Period 2 - 1/3, 2/3
  • Period 3 1/7, 2/7, 4/7 and 3/7, 6/7, 5/7
  • Out Shuffles i/(N-1) for (i1) st card

1/7, 2/7, 4/7 and 3/7, 6/7, 5/7 and 0/7,
7/7 1/3 ?/51 and 2/3 ?/51 1/7 ?/49
43
Finding Specific t-Cycles
  • Period k 0.000 0001
  • 2-t (2-t)2 (2-t) 3 2-t /(1- 2-t )
  • Or, 0.000 0001 1/(2t -1)
  • Examples
  • Period 2 1/3
  • Period 3 1/7
  • In general Select Shuffle Type
  • Rationals of form i/r gt (2t 1) r
  • Example r 3(7) 21
  • Out Shuffle for 22 or 21 cards
  • In Shuffle for 20 or 21 cards

Demonstration
44
Other Topics
  • Cards
  • Alternate In/Out Shuffles
  • k- handed Perfect Shuffles
  • Random Shuffles Diaconis, et al
  • Imperfect Perfect Shuffles
  • Nonlinear Dynamical Systems
  • Discrete (Difference Equations)
  • Systems in the Plane and Higher Dimensions
  • Continuous Dynamical Systems (ODES)
  • Integrability
  • Nonlinear Oscillations
  • MAT 463/563
  • Fractals
  • Chaos

45
Summary
  • History of the Faro Shuffle
  • The Perfect Shuffle How to do it!
  • Mathematical Models of Perfect Shuffles
  • Dynamical Systems The Logistic Model
  • Features of Dynamical Systems
  • Symbolic Dynamics
  • Shuffling as a Dynamical System

46
References
  • K.T. Alligood, T.D. Sauer, J.A. Yorke, Chaos, An
    Introduction to Dynamical Systems, Springer,
    1996.
  • S.B. Morris, Magic Tricks, Card Shuffling and
    Dynamic Computer Memories, MAA, 1998
  • D.J. Scully, Perfect Shuffles Through Dynamical
    Systems, Mathematics Magazine, 77, 2004

47
Websites
  • http//i-p-c-s.org/history.html
  • http//jducoeur.org/game-hist/seaan-cardhist.html
  • http//www.usplayingcard.com/gamerules/briefhistor
    y.html
  • http//bcvc.net/faro/
  • http//www.gleeson.us/faro/

Thank you !
Write a Comment
User Comments (0)
About PowerShow.com