Download presentation

Presentation is loading. Please wait.

Published byPranav Badders Modified over 2 years ago

1

2
Card Shuffling as a 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?

3
Introduction History of the Faro Shuffle History of the Faro Shuffle The Perfect Shuffle The Perfect Shuffle Mathematical Models of Perfect Shuffles Mathematical Models of Perfect Shuffles Dynamical Systems – The Logistic Model Dynamical Systems – The Logistic Model Features of Dynamical Systems Features of Dynamical Systems Shuffling as a Dynamical System Shuffling as a Dynamical System

4
A Bit of History

5
History of the Faro Shuffle Cards Cards Western Culture - 14 th Century Western Culture - 14 th Century Jokers – 1860s Jokers – 1860s Pips – 1890s added numbers Pips – 1890s added numbers First Card tricks by gamblers First Card tricks by gamblers Origins of Perfect Shuffles not known Origins of Perfect Shuffles not known Game of Faro Game of Faro 18 th Century France 18 th Century France Named after face card Named after face card Popular s in the West Popular s in the West

6
The Game of Faro Decks shuffled and rules are simple 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 Players bet on 13 cards Players bet on 13 cards Lose Slowly! Lose Slowly! Copper Tokens – bet card to lose Copper Tokens – bet card to lose Coppering, Copper a Bet Coppering, Copper a Bet Analysis – De Moivre, Euler, … Analysis – De Moivre, Euler, …

7
The Game Wichita Faro

8
Perfect (Faro or Weave) Shuffle Problem: Divide 52 cards into 2 equal piles Divide 52 cards into 2 equal piles Shuffle by interlacing cards Shuffle by interlacing cards Keep top card fixed (Out Shuffle) Keep top card fixed (Out Shuffle) 8 shuffles => original order 8 shuffles => original order What is a typical Riffle shuffle? What is a typical Faro shuffle?

9
See! Period 18 and 35!

10
History of Faro Shuffle 1726 – Warning in book for first time 1726 – Warning in book for first time 1847 – J H Green – Stripper (tapered) Cards 1847 – J H Green – Stripper (tapered) Cards 1860 – Better description of shuffle 1860 – Better description of shuffle 1894 – How to perform 1894 – How to perform Koschitzs Manual of Useful Information Koschitzs Manual of Useful Information Maskelynes Sharps and Flats – 1 st Illustration Maskelynes Sharps and Flats – 1 st Illustration 1915 – Innis – Order for 52 Cards 1915 – Innis – Order for 52 Cards 1948 – Levy – O(p) for odd deck, cycles 1948 – Levy – O(p) for odd deck, cycles 1957 – Elmsley – Coined In/Out - shuffles 1957 – Elmsley – Coined In/Out - shuffles

11
Mathematical Models

12
A Model for Card Shuffling Label the positions 0-51 Label the positions 0-51 Then Then 0->0 and 26 ->1 0->0 and 26 ->1 1->2 and 27 ->3 1->2 and 27 ->3 2->4 and 28 ->5 2->4 and 28 ->5 … in general? … in general? Ignoring card 51: f(x) = 2x mod 51 Ignoring card 51: f(x) = 2x mod 51 Recall Congruences: Recall Congruences: 2x mod 51 = remainder upon division by 51 2x mod 51 = remainder upon division by 51

13
The Order of a Shuffle Minimum integer k such that 2 k x = x mod 51 for all x in {0,1,…,51} Minimum integer k such that 2 k x = x mod 51 for all x in {0,1,…,51} True for x = 1 ! True for x = 1 ! Minimum integer k such that 2 k - 1= 0 mod 51 Minimum integer k such that 2 k - 1= 0 mod 51 Thus, 51 divides 2 k - 1 Thus, 51 divides 2 k - 1 k= 6, 2 k - 1 = 63 = 3(21) k= 6, 2 k - 1 = 63 = 3(21) k= 7, 2 k - 1 = 127 k= 7, 2 k - 1 = 127 k= 8, 2 k - 1 = 255 = 5(51) k= 8, 2 k - 1 = 255 = 5(51)

14
Generalization to n cards

15
The Out Shuffle

16
The In Shuffle

17
In Shuffles In Shuffles Out Shuffles Out Shuffles Representations for n Cards

18
Order of Shuffles 8 Out Shuffles for 52 Cards 8 Out Shuffles for 52 Cards In General? In General? o (O,2n-1) = o (O,2n) o (O,2n-1) = o (O,2n) o (I,2n-1) = o (O,2n) o (I,2n-1) = o (O,2n) => o (O,2n-1) = o (I,2n-1) => o (O,2n-1) = o (I,2n-1) o (I,2n-2) = o (O,2n) o (I,2n-2) = o (O,2n) Therefore, only need o (O,2n) Therefore, only need o (O,2n)

19 o (O,2n) = Order for 2n Cards One Shuffle: O(p) = 2p mod (2n-1), 0

(2n – 1) | (2 k – 1) Or, 2 k = 1 mod (2n-1) => (2n – 1) | (2 k – 1)

20
The Orders of Perfect Shuffles no(O,n)o(I,n) Demonstration

21
Another Model for 2n Cards Example: Card 10 of 52: x = 9/51 Example: Card 10 of 52: x = 9/51 In Shuffle In Shuffle Label positions with rationals Label positions with rationals Out Shuffle Out Shuffle Example: Card 10 of 52: x = 9/51 Example: Card 10 of 52: x = 9/51

22
Shuffle Types All denominators are odd numbers.

23
Doubling Function

24
Discrete Dynamical Systems First Order System: x n+1 = f (x n ) First Order System: x n+1 = f (x n ) Orbits: {x 0, x 1, … } Orbits: {x 0, x 1, … } Fixed Points Fixed Points Periodic Orbits Periodic Orbits Stability and Bifurcation Stability and Bifurcation Chaos !!!! Chaos !!!!

25
The Logistic Map Discrete Population Model Discrete Population Model P n+1 = a P n P n+1 = a P n P n+1 = a 2 P n-1 P n+1 = a 2 P n-1 P n+1 = a n P 0 P n+1 = a n P 0 a>1 => exponential growth! a>1 => exponential growth! Competition Competition P n+1 = a P n - b P n 2 P n+1 = a P n - b P n 2 x n = (a/b)P n, r=a/b => x n = (a/b)P n, r=a/b => x n+1 = r x n (1 - x n ), x n [0,1] and r [0,4] x n+1 = r x n (1 - x n ), x n [0,1] and r [0,4]

26
Example r=2.1 Sample orbit for r=2.1 and x0 = 0.5

27
Example r=3.5

28
Example r=3.56

29
Example r=3.568

30
Example r=4.0

31
Iterations More Iterations More Iterations

32
Fixed Points f(x*) = x* x* = r x*(1-x*) x* = r x*(1-x*) => 0 = x*(1-r (1-x*) ) => 0 = x*(1-r (1-x*) ) => x* = 0 or x* = 1 – 1/r => x* = 0 or x* = 1 – 1/r Logistic Map - Cobwebs Logistic Map - CobwebsCobwebs

33
Periodic Orbits for f(x)=rx(1-x) Period 2 Period 2 x 1 = r x 0 (1- x 0 ) and x 2 = r x 1 (1- x 1 ) = x 0 x 1 = r x 0 (1- x 0 ) and x 2 = r x 1 (1- x 1 ) = x 0 Or, f 2 (x 0 ) = x 0 Or, f 2 (x 0 ) = x 0 Period k Period k - smallest k such that f k (x*) = x* - smallest k such that f k (x*) = x* Periodic Cobwebs Periodic Cobwebs Periodic Cobwebs Periodic Cobwebs

34
Stability Fixed Points Fixed Points |f(x*)| < 1 |f(x*)| < 1 Periodic Orbits Periodic Orbits |f(x 0 )| |f(x 1 )| … |f(x n )| < 1 |f(x 0 )| |f(x 1 )| … |f(x n )| < 1 Bifurcations Bifurcations

35
Bifurcations r1 = 3.0 r2 = r3 = r4 = r5 = r6 = r7 = r8 =

36
Itineraries: Symbolic Dynamics Example: x 0 = 1/3 Example: x 0 = 1/3 x 0 = 1/3 => L x 0 = 1/3 => L x 1 = 8/9 => LR x 1 = 8/9 => LR x 2 = 32/81 => LRL x 2 = 32/81 => LRL x 3 = … => LRL … x 3 = … => LRL … Example: x 0 = ¼ Example: x 0 = ¼ { ¼, ¾, ¾, …}=> LRRRR… { ¼, ¾, ¾, …}=> LRRRR… For G (x) = 4x ( 1-x ) Assign Left L and Right R For G (x) = 4x ( 1-x ) Assign Left L and Right R Periodic Orbits Periodic Orbits LRLRLR …, RLRRLRRLRRL … LRLRLR …, RLRRLRRLRRL …

37
Shuffling as a Dynamical System S(x) vs S 4 (x) S(x) vs S 4 (x)

38
Demonstration

39
Iterations for 8 Cards

40
S 3 (x) vs S 2 (x) S 3 (x) vs S 2 (x) S 3 (x) vs S 2 (x) How can we study periodic orbits for S(x)?

41
Binary Representations Binary Representation Binary Representation =1(2 -1 )+0(2 -2 )+1(2 -3 )+1(2 -4 ) = =1(2 -1 )+0(2 -2 )+1(2 -3 )+1(2 -4 ) = 1/2 + 1/8 + 1/16 = 10/16 = 5/8 1/2 + 1/8 + 1/16 = 10/16 = 5/8 x n+1 = S(x n ), given x 0 x n+1 = S(x n ), given x 0 Represent x n s in binary: x 0 = Represent x n s in binary: x 0 = Then, x 1 = 2 x 0 – 1 = – 1 = Then, x 1 = 2 x 0 – 1 = – 1 = Note: S shifts binary representations! Note: S shifts binary representations! Repeating Decimals Repeating Decimals S( …) = … S( …) = … S( …) = … S( …) = …

42
Periodic Orbits Period 2 Period 2 S( …) = … S( …) = … S( …) = … S( …) = … , , = ? , , = ? Period 3 Period , , = ? , , = ? , , = ? , , = ? Maple Computations Maple Computations Maple Computations Maple Computations

43
Card Shuffling Examples 8 Cards – All orbits are period 3 8 Cards – All orbits are period 3 52 Cards – Period 2 52 Cards – Period 2 50 Cards – Period 3 Orbit (Cycle) 50 Cards – Period 3 Orbit (Cycle) Recall: Recall: Period 2 - {1/3, 2/3} Period 2 - {1/3, 2/3} Period 3 – {1/7, 2/7, 4/7} and {3/7, 6/7, 5/7} Period 3 – {1/7, 2/7, 4/7} and {3/7, 6/7, 5/7} Out Shuffles – i/(N-1) for (i+1) st card Out Shuffles – i/(N-1) for (i+1) 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

44
Finding Specific t-Cycles Period k: … 0001 Period k: … t + (2 -t )2 + (2 -t ) 3 + … = 2 -t /(1- 2 -t ) 2 -t + (2 -t )2 + (2 -t ) 3 + … = 2 -t /(1- 2 -t ) Or, … 0001 = 1/(2 t -1) Or, … 0001 = 1/(2 t -1) Examples Examples Period 2: 1/3 Period 2: 1/3 Period 3: 1/7 Period 3: 1/7 In general: Select Shuffle Type In general: Select Shuffle Type Rationals of form i/r => (2 t –1) | r Rationals of form i/r => (2 t –1) | r Example r = 3(7) = 21 Example r = 3(7) = 21 Out Shuffle for 22 or 21 cards Out Shuffle for 22 or 21 cards In Shuffle for 20 or 21 cards In Shuffle for 20 or 21 cards Demonstration

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

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

47
References K.T. Alligood, T.D. Sauer, J.A. Yorke, Chaos, An Introduction to Dynamical Systems, Springer, K.T. Alligood, T.D. Sauer, J.A. Yorke, Chaos, An Introduction to Dynamical Systems, Springer, S.B. Morris, Magic Tricks, Card Shuffling and Dynamic Computer Memories, MAA, 1998 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 D.J. Scully, Perfect Shuffles Through Dynamical Systems, Mathematics Magazine, 77, 2004

48
Websites Thank you !

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google