-
Notifications
You must be signed in to change notification settings - Fork 0
/
cardshuffling.html
7747 lines (7549 loc) · 254 KB
/
cardshuffling.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<head> <title></title>
<meta charset="UTF-8" />
<meta name="generator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)" />
<link rel="stylesheet" type="text/css" href="cardshuffling.css" />
<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"
></script>
<style type="text/css">
.MathJax_MathML {text-indent: 0;}
</style>
</head><body
>
<!--l. 8--><p class="noindent" >Steven R. Dunbar <br
class="newline" />Department of Mathematics <br
class="newline" />203 Avery Hall <br
class="newline" />University of Nebraska-Lincoln <br
class="newline" />Lincoln, NE 68588-0130 <br
class="newline" /><span
class="cmtt-12">http://www.math.unl.edu </span><br
class="newline" />Voice: 402-472-3731 <br
class="newline" />Fax: 402-472-8466 </p>
<div class="center"
>
<!--l. 1--><p class="noindent" >
</p><!--l. 6--><p class="noindent" > <span
class="cmbx-12x-x-144">Topics in</span><br />
<span
class="cmbx-12x-x-144">Probability Theory and Stochastic Processes</span><br />
<span
class="cmbx-12x-x-144">Steven R. Dunbar</span>
</p></div>
<!--l. 19--><p class="noindent" >__________________________________________________________________________
</p>
<div class="center"
>
<!--l. 21--><p class="noindent" >
</p><!--l. 21--><p class="noindent" ><span
class="cmr-17">Card Shuffling as a Markov Chain</span></p></div>
<!--l. 23--><p class="indent" > _______________________________________________________________________
</p><!--l. 15--><p class="indent" > Note: These pages are prepared with MathJax. MathJax is an open source
JavaScript display engine for mathematics that works in all browsers.
See http://mathjax.org for details on supported browsers, accessibility,
copy-and-paste, and other features.
</p><!--l. 27--><p class="indent" > _______________________________________________________________________________________________
</p><!--l. 34--><p class="indent" > <img
src="../../../../CommonInformation/Lessons/rating.png" alt="Rating"
/>
</p>
<h3 class="likesectionHead"><a
id="x1-1000"></a>Rating</h3>
<!--l. 38--><p class="noindent" >Mathematically Mature: may contain mathematics beyond calculus with
proofs.
</p><!--l. 41--><p class="indent" > _______________________________________________________________________________________________
</p><!--l. 43--><p class="indent" > <img
src="../../../../CommonInformation/Lessons/question_mark.png" alt="Section Starter Question"
/>
</p>
<h3 class="likesectionHead"><a
id="x1-2000"></a>Section Starter Question</h3>
<!--l. 46--><p class="noindent" >Why shuffle a deck of cards? What kind of shuffle do you use? How many shuffles
are sufficient to achieve the purpose of shuffling?
</p><!--l. 49--><p class="indent" > _______________________________________________________________________________________________
</p><!--l. 51--><p class="indent" > <img
src="../../../../CommonInformation/Lessons/keyconcepts.png" alt="Key Concepts"
/>
</p>
<h3 class="likesectionHead"><a
id="x1-3000"></a>Key Concepts</h3>
<!--l. 55--><p class="noindent" >
</p><dl class="enumerate-enumitem"><dt class="enumerate-enumitem">
1. </dt><dd
class="enumerate-enumitem">Card deck shuffles are a family of possible re-orderings with probability
distributions, leading to transition probabilities, and thus Markov
processes. The most well-studied type of shuffle is the riffle shuffle and
that is the main focus here.
</dd><dt class="enumerate-enumitem">
2. </dt><dd
class="enumerate-enumitem">Going from card order<!--l. 61--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mi
>π</mi></mrow></math>
to <!--l. 61--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mi
>τ</mi></mrow></math>
is the same as composing <!--l. 62--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mi
>π</mi></mrow></math>
with the permutation <!--l. 62--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><msup><mrow
><mi
>π</mi></mrow><mrow
><mo
class="MathClass-bin">−</mo><mn>1</mn></mrow></msup
> <mo
class="MathClass-bin">∘</mo> <mi
>τ</mi></mrow></math>.
Now identify shuffles as functions on <!--l. 63--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mfenced separators=""
open="{" close="}" ><mrow><mn>1</mn><mo
class="MathClass-punc">,</mo><mo
class="MathClass-op">…</mo><mi
>n</mi></mrow></mfenced></mrow></math>
to <!--l. 63--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mfenced separators=""
open="{" close="}" ><mrow><mn>1</mn><mo
class="MathClass-punc">,</mo><mo
class="MathClass-op">…</mo><mi
>n</mi></mrow></mfenced></mrow></math>,
that is, permutations.Since a particular shuffle is one of a whole family
of shuffles, chosen with a probability distribution <!--l. 66--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mi
>Q</mi></mrow></math>
from the family, the transition probabilities are
<div class="math-display"><!--l. 68--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="block" ><mrow
>
<msub><mrow
><mi
>p</mi></mrow><mrow
><mi
>π</mi><mi
>τ</mi></mrow></msub
> <mo
class="MathClass-rel">=</mo> <mi
>ℙ</mi> <mfenced separators=""
open="[" close="]" ><mrow><msub><mrow
><mi
>X</mi></mrow><mrow
><mi
>t</mi></mrow></msub
> <mo
class="MathClass-rel">=</mo> <mi
>τ</mi><mo
class="MathClass-rel">∣</mo><msub><mrow
><mi
>X</mi></mrow><mrow
><mi
>t</mi><mo
class="MathClass-bin">−</mo><mn>1</mn></mrow></msub
> <mo
class="MathClass-rel">=</mo> <mi
>π</mi></mrow></mfenced> <mo
class="MathClass-rel">=</mo> <mi
>Q</mi><mrow ><mo
class="MathClass-open">(</mo><mrow><msup><mrow
><mi
>π</mi></mrow><mrow
><mo
class="MathClass-bin">−</mo><mn>1</mn></mrow></msup
> <mo
class="MathClass-bin">∘</mo> <mi
>τ</mi></mrow><mo
class="MathClass-close">)</mo></mrow><mo
class="MathClass-punc">.</mo>
</mrow></math></div>
<!--l. 71--><p class="nopar" >
</p></dd><dt class="enumerate-enumitem">
3. </dt><dd
class="enumerate-enumitem">The identification of shuffles or operations with permutations gives a
probability distribution on <!--l. 75--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><msub><mrow
><mi
>S</mi></mrow><mrow
><mi
>n</mi></mrow></msub
></mrow></math>.
</dd><dt class="enumerate-enumitem">
4. </dt><dd
class="enumerate-enumitem">A <span
class="cmbx-12">Top-to-Random Shuffle</span>, takes the top card from a stack of <!--l. 79--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mi
>n</mi></mrow></math>
cards and inserts it in the gap between the <!--l. 80--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mrow ><mo
class="MathClass-open">(</mo><mrow><mi
>k</mi> <mo
class="MathClass-bin">−</mo> <mn>1</mn></mrow><mo
class="MathClass-close">)</mo></mrow></mrow></math>th
card and the <!--l. 80--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mi
>k</mi></mrow></math>th
card in the deck.
</dd><dt class="enumerate-enumitem">
5. </dt><dd
class="enumerate-enumitem">The Top-To-Random-Shuffle demonstrates the cut-off phenomenon for
the Total Variation distance of the Markov chain distribution from the
uniform distribution as a function of the number of steps.
</dd><dt class="enumerate-enumitem">
6. </dt><dd
class="enumerate-enumitem">One realistic model of shuffling a deck of cards is the <span
class="cmbx-12">riffle shuffle</span>.
</dd><dt class="enumerate-enumitem">
7. </dt><dd
class="enumerate-enumitem">The set of cuts and interleavings in a riffle shuffle induces in a natural
way a density on the set of permutations. Call this a <span
class="cmbx-12">riffle shuffle </span>and
denote it by <!--l. 93--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mi
>R</mi></mrow></math>.
That is, <!--l. 93--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mi
>R</mi><mrow ><mo
class="MathClass-open">(</mo><mrow><mi
>π</mi></mrow><mo
class="MathClass-close">)</mo></mrow></mrow></math>
is the sum of probabilities of each cut and interleaving that gives the
rearrangement of the deck corresponding to <!--l. 95--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mi
>π</mi></mrow></math>.
</dd><dt class="enumerate-enumitem">
8. </dt><dd
class="enumerate-enumitem"><!--l. 97--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mn>7</mn></mrow></math>
shuffles the of 3-card deck gets very close to the uniform density, which
turns out to be the stationary density.
</dd><dt class="enumerate-enumitem">
9. </dt><dd
class="enumerate-enumitem">The probability of achieving a permutation <!--l. 100--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mi
>π</mi></mrow></math>
when doing an <!--l. 101--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mi
>a</mi></mrow></math>-shuffle
is
<div class="math-display"><!--l. 102--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="block" ><mrow
>
<mfrac><mrow
><mn>1</mn></mrow>
<mrow
><msup><mrow
><mi
>a</mi></mrow><mrow
><mi
>n</mi></mrow></msup
></mrow></mfrac><mfenced separators=""
open="(" close=")"><mfrac linethickness="0.0pt"><mrow> <mi
>n</mi> <mo
class="MathClass-bin">+</mo> <mi
>a</mi> <mo
class="MathClass-bin">−</mo> <mi
>r</mi></mrow>
<mrow><mi
>n</mi></mrow></mfrac></mfenced> <mo
class="MathClass-punc">,</mo>
</mrow></math></div>
<!--l. 104--><p class="nopar" > where <!--l. 104--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mi
>r</mi></mrow></math>
is the number of rising sequences in <!--l. 104--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mi
>π</mi></mrow></math>.
</p></dd><dt class="enumerate-enumitem">
10. </dt><dd
class="enumerate-enumitem">The eigenvalues of the transition probability matrix for a riffle shuffle
are <!--l. 107--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mn>1</mn></mrow></math>,
<!--l. 107--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mfrac><mrow
><mn>1</mn></mrow>
<mrow
><mn>2</mn></mrow></mfrac></mrow></math>,
<!--l. 107--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mfrac><mrow
><mn>1</mn></mrow>
<mrow
><mn>4</mn></mrow></mfrac></mrow></math>
and <!--l. 108--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
> <mfrac><mrow
><mn>1</mn></mrow>
<mrow
><msup><mrow
><mn>2</mn></mrow><mrow
><mi
>n</mi></mrow></msup
></mrow></mfrac></mrow></math>.
The second largest eigenvalue determines the rate of convergence to the
stationary distribution. For riffle shuffling, this eigenvalue is <!--l. 110--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mfrac><mrow
><mn>1</mn></mrow>
<mrow
><mn>2</mn></mrow></mfrac></mrow></math>.
</dd><dt class="enumerate-enumitem">
11. </dt><dd
class="enumerate-enumitem">For a finite, irreducible, aperiodic Markov chain <!--l. 113--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><msub><mrow
><mi
>Y</mi> </mrow><mrow
><mi
>t</mi></mrow></msub
></mrow></math>
distributed as <!--l. 114--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><msup><mrow
><mi
>Q</mi></mrow><mrow
><mi
>t</mi></mrow></msup
></mrow></math>
at time <!--l. 114--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mi
>t</mi></mrow></math>
and with stationary distribution <!--l. 115--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mi
>π</mi></mrow></math>,
and <!--l. 115--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mi
>τ</mi></mrow></math>
is a strong stationary time, then
<div class="math-display"><!--l. 117--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="block" ><mrow
>
<mo
class="MathClass-rel">∥</mo><msup><mrow
><mi
>Q</mi></mrow><mrow
><mi
>τ</mi></mrow></msup
> <mo
class="MathClass-bin">−</mo> <mi
>π</mi><msub><mrow
><mo
class="MathClass-rel">∥</mo></mrow><mrow
>
<mi
>T</mi><mi
>V</mi> </mrow></msub
> <mo
class="MathClass-rel">≤</mo> <mi
>ℙ</mi> <mfenced separators=""
open="[" close="]" ><mrow><mrow ><mo
class="MathClass-open">(</mo><mrow></mrow></mfenced> <mi
>τ</mi> <mo
class="MathClass-rel">≥</mo> <mi
>t</mi></mrow><mo
class="MathClass-close">)</mo></mrow><mo
class="MathClass-punc">.</mo>
</mrow></math></div>
<!--l. 119--><p class="nopar" >
</p></dd><dt class="enumerate-enumitem">
12. </dt><dd
class="enumerate-enumitem">Set <!--l. 121--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><msub><mrow
><mi
>d</mi></mrow><mrow
><mi
>n</mi></mrow></msub
><mrow ><mo
class="MathClass-open">(</mo><mrow><mi
>t</mi></mrow><mo
class="MathClass-close">)</mo></mrow> <mo
class="MathClass-rel">=</mo> <mo
class="MathClass-rel">∥</mo><msup><mrow
><mi
>P</mi></mrow><mrow
><msub><mrow
><mi
>τ</mi></mrow><mrow
><mstyle
class="text"><mtext >top</mtext></mstyle></mrow></msub
><mo
class="MathClass-bin">+</mo><mn>1</mn>
</mrow></msup
> <mo
class="MathClass-bin">−</mo> <mi
>U</mi><msub><mrow
><mo
class="MathClass-rel">∥</mo></mrow><mrow
><mi
>T</mi><mi
>V</mi> </mrow></msub
></mrow></math>. Then
for <!--l. 122--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mi
>𝜖</mi> <mo
class="MathClass-rel">></mo> <mn>0</mn></mrow></math>,
<dl class="enumerate-enumitem"><dt class="enumerate-enumitem">
(a) </dt><dd
class="enumerate-enumitem"><!--l. 125--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><msub><mrow
><mi
>d</mi></mrow><mrow
><mi
>n</mi></mrow></msub
><mrow ><mo
class="MathClass-open">(</mo><mrow><mi
>n</mi><mo class="qopname"> log</mo><!--nolimits--> <mi
>n</mi> <mo
class="MathClass-bin">+</mo> <mi
>n</mi><mo class="qopname"> log</mo><!--nolimits--> <msup><mrow
><mi
>𝜖</mi></mrow><mrow
><mo
class="MathClass-bin">−</mo><mn>1</mn></mrow></msup
></mrow><mo
class="MathClass-close">)</mo></mrow> <mo
class="MathClass-rel">≤</mo> <mi
>𝜖</mi></mrow></math>
for <!--l. 126--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mi
>n</mi></mrow></math>
sufficiently large.
</dd><dt class="enumerate-enumitem">
(b) </dt><dd
class="enumerate-enumitem"><!--l. 128--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><msub><mrow
><mi
>d</mi></mrow><mrow
><mi
>n</mi></mrow></msub
><mrow ><mo
class="MathClass-open">(</mo><mrow><mi
>n</mi><mo class="qopname"> log</mo><!--nolimits--> <mi
>n</mi> <mo
class="MathClass-bin">−</mo> <mi
>n</mi><mo class="qopname"> log</mo><!--nolimits--><mrow ><mo
class="MathClass-open">(</mo><mrow><mi
>C</mi><msup><mrow
><mi
>𝜖</mi></mrow><mrow
><mo
class="MathClass-bin">−</mo><mn>1</mn></mrow></msup
></mrow><mo
class="MathClass-close">)</mo></mrow></mrow><mo
class="MathClass-close">)</mo></mrow> <mo
class="MathClass-rel">≥</mo> <mn>1</mn> <mo
class="MathClass-bin">−</mo> <mi
>𝜖</mi></mrow></math>
for <!--l. 129--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mi
>n</mi></mrow></math>
sufficiently large.</dd></dl>
</dd></dl>
<!--l. 133--><p class="noindent" >__________________________________________________________________________
</p><!--l. 135--><p class="indent" > <img
src="../../../../CommonInformation/Lessons/vocabulary.png" alt="Vocabulary"
/>
</p>
<h3 class="likesectionHead"><a
id="x1-4000"></a>Vocabulary</h3>
<!--l. 138--><p class="noindent" >
</p><dl class="enumerate-enumitem"><dt class="enumerate-enumitem">
1. </dt><dd
class="enumerate-enumitem">A defnTop-to-Random Shuffle, takes the top card from a stack of <!--l. 141--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mi
>n</mi></mrow></math>
cards and inserts it in the gap between the <!--l. 142--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mrow ><mo
class="MathClass-open">(</mo><mrow><mi
>k</mi> <mo
class="MathClass-bin">−</mo> <mn>1</mn></mrow><mo
class="MathClass-close">)</mo></mrow></mrow></math>th
card and the <!--l. 142--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mi
>k</mi></mrow></math>th
card in the deck.
</dd><dt class="enumerate-enumitem">
2. </dt><dd
class="enumerate-enumitem">The <span
class="cmbx-12">total variation distance </span>of <!--l. 145--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mi
>μ</mi></mrow></math>
from <!--l. 145--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mi
>ν</mi></mrow></math>
is
<div class="math-display"><!--l. 148--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="block" ><mrow
>
<mo
class="MathClass-rel">∥</mo><mi
>μ</mi> <mo
class="MathClass-bin">−</mo> <mi
>ν</mi><msub><mrow
><mo
class="MathClass-rel">∥</mo></mrow><mrow
><mi
>T</mi><mi
>V</mi> </mrow></msub
> <mo
class="MathClass-rel">=</mo><munder class="msub"><mrow
><mo class="qopname"> max</mo> </mrow><mrow
><mi
>A</mi><mo
class="MathClass-rel">⊂</mo><mi
>Ω</mi></mrow></munder
><mo
class="MathClass-rel">|</mo><mi
>μ</mi><mrow ><mo
class="MathClass-open">(</mo><mrow><mi
>A</mi></mrow><mo
class="MathClass-close">)</mo></mrow> <mo
class="MathClass-bin">−</mo> <mi
>ν</mi><mrow ><mo
class="MathClass-open">(</mo><mrow><mi
>A</mi></mrow><mo
class="MathClass-close">)</mo></mrow><mo
class="MathClass-rel">|</mo> <mo
class="MathClass-rel">=</mo> <mfrac><mrow
><mn>1</mn></mrow>
<mrow
><mn>2</mn></mrow></mfrac><munder class="msub"><mrow
><mo mathsize="big"
> ∑</mo>
</mrow><mrow
><mi
>x</mi><mo
class="MathClass-rel">∈</mo><mi
>Ω</mi></mrow></munder
><mo
class="MathClass-rel">|</mo><mi
>μ</mi><mrow ><mo
class="MathClass-open">(</mo><mrow><mi
>x</mi></mrow><mo
class="MathClass-close">)</mo></mrow> <mo
class="MathClass-bin">−</mo> <mi
>ν</mi><mrow ><mo
class="MathClass-open">(</mo><mrow><mi
>x</mi></mrow><mo
class="MathClass-close">)</mo></mrow><mo
class="MathClass-rel">|</mo><mo
class="MathClass-punc">.</mo>
</mrow></math></div>
<!--l. 152--><p class="nopar" >
</p></dd><dt class="enumerate-enumitem">
3. </dt><dd
class="enumerate-enumitem">A <span
class="cmbx-12">strong stationary time</span>for <!--l. 155--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><msub><mrow
><mi
>X</mi></mrow><mrow
><mi
>t</mi></mrow></msub
></mrow></math>,
<!--l. 155--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mi
>t</mi> <mo
class="MathClass-rel">≥</mo> <mn>0</mn></mrow></math>
if <!--l. 155--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><msub><mrow
><mi
>X</mi></mrow><mrow
><msub><mrow
><mi
>τ</mi></mrow><mrow
>
<mstyle
class="text"><mtext >top</mtext></mstyle></mrow></msub
><mo
class="MathClass-bin">+</mo><mn>1</mn></mrow></msub
> <mo
class="MathClass-rel">∼</mo><mo class="qopname"> unif</mo><!--nolimits--><mrow ><mo
class="MathClass-open">(</mo><mrow><msub><mrow
><mi
>S</mi></mrow><mrow
><mi
>n</mi></mrow></msub
></mrow><mo
class="MathClass-close">)</mo></mrow></mrow></math>,
and <!--l. 157--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><msub><mrow
><mi
>X</mi></mrow><mrow
><msub><mrow
><mi
>τ</mi></mrow><mrow
>
<mstyle
class="text"><mtext >top</mtext></mstyle></mrow></msub
><mo
class="MathClass-bin">+</mo><mn>1</mn></mrow></msub
></mrow></math>
is independent of <!--l. 157--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><msub><mrow
><mi
>τ</mi></mrow><mrow
><mstyle
class="text"><mtext >top</mtext></mstyle></mrow></msub
></mrow></math>.
</dd><dt class="enumerate-enumitem">
4. </dt><dd
class="enumerate-enumitem">The <span
class="cmbx-12">riffle shuffle </span>first cuts the deck randomly into two packets, one
containing <!--l. 161--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mi
>k</mi></mrow></math>
cards and the other containing <!--l. 161--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mi
>n</mi> <mo
class="MathClass-bin">−</mo> <mi
>k</mi></mrow></math>
cards. Choose <!--l. 162--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mi
>k</mi></mrow></math>,
the number of cards cut according to the binomial density. Once the
deck is cut into two packets, interleave the cards from each packet in
any possible way, such that the cards from each packet keep their own
relative order.
</dd><dt class="enumerate-enumitem">
5. </dt><dd
class="enumerate-enumitem">A special case of this is the <span
class="cmbx-12">perfect shuffle</span>, also know as the <span
class="cmbx-12">faro</span>
<span
class="cmbx-12">shuffle </span>wherein the two packets are completely interleaved.
</dd><dt class="enumerate-enumitem">
6. </dt><dd
class="enumerate-enumitem">A <span
class="cmbx-12">rising sequence </span>of a permutation is a maximal consecutive
increasing subsequence.
</dd><dt class="enumerate-enumitem">
7. </dt><dd
class="enumerate-enumitem">A <!--l. 174--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mi
>a</mi></mrow></math><span
class="cmbx-12">-shuffle</span>
is another probability density on <!--l. 174--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><msub><mrow
><mi
>S</mi></mrow><mrow
><mi
>n</mi></mrow></msub
></mrow></math>.
Let <!--l. 175--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mi
>a</mi></mrow></math>
be any positive integer. Cut the deck into <!--l. 175--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mi
>a</mi></mrow></math>
packets of nonnegative sizes <!--l. 176--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><msub><mrow
><mi
>m</mi></mrow><mrow
><mn>1</mn></mrow></msub
><mo
class="MathClass-punc">,</mo><msub><mrow
><mi
>m</mi></mrow><mrow
><mn>2</mn></mrow></msub
><mo
class="MathClass-punc">,</mo><mo
class="MathClass-op">…</mo><mo
class="MathClass-punc">,</mo><msub><mrow
><mi
>m</mi></mrow><mrow
><mi
>a</mi></mrow></msub
></mrow></math>
with <!--l. 177--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><msub><mrow
><mi
>m</mi></mrow><mrow
><mn>1</mn></mrow></msub
> <mo
class="MathClass-bin">+</mo> <mo
class="MathClass-rel">⋯</mo> <mo
class="MathClass-bin">+</mo> <msub><mrow
><mi
>m</mi></mrow><mrow
><mi
>a</mi></mrow></msub
> <mo
class="MathClass-rel">=</mo> <mi
>n</mi></mrow></math>
but some of the <!--l. 177--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><msub><mrow
><mi
>n</mi></mrow><mrow
><mi
>i</mi></mrow></msub
></mrow></math>
may be zero. Interleave the cards from each packet in any way, so long as
the cards from each packet, so long as the cards from each packet keep
the relative order among themselves. With a fixed packet structure,
consider all interleavings equally likely.</dd></dl>
<!--l. 185--><p class="noindent" >__________________________________________________________________________
</p><!--l. 187--><p class="indent" > <img
src="../../../../CommonInformation/Lessons/mathematicalideas.png" alt="Mathematical Ideas"
/>
</p>
<h3 class="likesectionHead"><a
id="x1-5000"></a>Mathematical Ideas</h3>
<!--l. 190--><p class="noindent" >
</p>
<h4 class="likesubsectionHead"><a
id="x1-6000"></a>General Setting</h4>
<!--l. 192--><p class="noindent" >An unopened deck of cards has the face-up order (depending on manufacturer,
but typically in the U.S.), starting with the Ace of Spades: </p>
<ul class="itemize1">
<li class="itemize">Ace, 2, 3, 4, 5, 6, 7, 8, 9, 10, Jack, Queen, King of Spades,
</li>
<li class="itemize">Ace, 2, 3, 4, 5, 6, 7, 8, 9, 10, Jack, Queen, King of Diamonds,
</li>
<li class="itemize">King, Queen, Jack, 10, 9, 8, 7, 6, 5, 4, 3, 2, Ace of Clubs, then
</li>
<li class="itemize">King, Queen, Jack, 10, 9, 8, 7, 6, 5, 4, 3, 2, Ace of Hearts.</li></ul>
<!--l. 206--><p class="noindent" >Call this the initial order of the deck. Knowing this order is essential for some sleight
of hand tricks performed by a magician. For card players, shuffling the deck to
remove this order is essential so that cards dealt from the deck come “at
random”, that is, in an order uniformly distributed over all possible deck
orders. The main question here is: Starting from this order, how many
shuffles are necessary to obtain a “random” deck order from the uniform
distribution?
</p><!--l. 214--><p class="indent" > In terms of Markov processes, the questions are: What is the state space, what
is an appropriate transition probability matrix, what is the steady state
distribution, hopefully uniform, and how fast does the Markov process approach
the steady state distribution?
</p><!--l. 219--><p class="indent" > For simplicity and definiteness, let the cards in the initial deck order above be
numbered <!--l. 220--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mn>1</mn></mrow></math>
to <!--l. 220--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mn>5</mn><mn>2</mn></mrow></math>.
It will also be convenient to study much smaller decks of cards having
<!--l. 221--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mi
>n</mi></mrow></math>
cards. The set of states for a Markov process modeling the order of the deck is
<!--l. 222--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><msub><mrow
><mi
>S</mi></mrow><mrow
><mi
>n</mi></mrow></msub
></mrow></math>, the set of permutations
on <!--l. 223--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mi
>n</mi></mrow></math> cards. For convenience,
set the initial state <!--l. 224--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><msub><mrow
><mi
>X</mi></mrow><mrow
><mn>0</mn></mrow></msub
></mrow></math>
to be the identity permutation with probability
<!--l. 224--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mn>1</mn></mrow></math>.
In other words, choose the initial distribution as not shuffling the deck
yet.
</p><!--l. 228--><p class="indent" > Consider a shuffle, that is, a re-ordering operation on a state that takes an
order to another order. For example, the riffle shuffle, also called a dovetail shuffle
or leafing the cards, is a common type of shuffle that interleaves packets of cards.
A perfect riffle shuffle, also called a faro shuffle, splits the deck exactly in half,
then interleaves cards alternately from each half. A perfect rifle shuffle is difficult
to perform, except for practiced magicians. More commonly, packets of adjacent
cards from unevenly split portions interleave, creating a new order for the deck
that nevertheless preserves some of the previous order in each packet. Thus a
particular riffle shuffle is one of a whole family of riffle shuffles, chosen with a
probability distribution on the family. This probability distribution then
induces a transition probability from state to state, and thus a Markov
process.
</p><!--l. 242--><p class="indent" > Other types of shuffles have colorful names such as the Top-to-Random shuffle,
Hindu shuffle, pile shuffle, Corgi shuffle, Mongean shuffle, and Weave shuffle. Some
shuffle types are a family of possible re-orderings with probability distributions
different from the riffle shuffle, leading to different transition probabilities, and
thus different Markov processes.
</p><!--l. 249--><p class="indent" > Going from card order <!--l. 249--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mi
>π</mi></mrow></math>
to <!--l. 249--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mi
>σ</mi></mrow></math> is the same as
composing <!--l. 249--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mi
>π</mi></mrow></math> with the
permutation <!--l. 250--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><msup><mrow
><mi
>π</mi></mrow><mrow
><mo
class="MathClass-bin">−</mo><mn>1</mn></mrow></msup
> <mo
class="MathClass-bin">∘</mo> <mi
>σ</mi></mrow></math>. Now identify
shuffles as functions on <!--l. 251--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mfenced separators=""
open="{" close="}" ><mrow><mn>1</mn><mo
class="MathClass-punc">,</mo><mo
class="MathClass-op">…</mo><mi
>n</mi></mrow></mfenced></mrow></math>
to <!--l. 251--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mfenced separators=""
open="{" close="}" ><mrow><mn>1</mn><mo
class="MathClass-punc">,</mo><mo
class="MathClass-op">…</mo><mi
>n</mi></mrow></mfenced></mrow></math>,
that is, permutations. Since a particular riffle shuffle is one of a
whole family of riffle shuffles, chosen with a probability distribution
<!--l. 255--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><mi
>Q</mi></mrow></math>
from the family, the transition probabilities are
<!--l. 256--><math
xmlns="http://www.w3.org/1998/Math/MathML"
display="inline" ><mrow
><msub><mrow
><mi
>p</mi></mrow><mrow
><mi
>π</mi><mi
>σ</mi></mrow></msub
> <mo
class="MathClass-rel">=</mo> <mi
>ℙ</mi> <mfenced separators=""
open="[" close="]" ><mrow><msub><mrow
><mi
>X</mi></mrow><mrow
><mi
>t</mi></mrow></msub
> <mo
class="MathClass-rel">=</mo> <mi
>σ</mi><mo
class="MathClass-rel">∣</mo><msub><mrow
><mi
>X</mi></mrow><mrow
><mi
>t</mi><mo
class="MathClass-bin">−</mo><mn>1</mn></mrow></msub
> <mo
class="MathClass-rel">=</mo> <mi
>π</mi></mrow></mfenced> <mo
class="MathClass-rel">=</mo> <mi
>Q</mi><mrow ><mo
class="MathClass-open">(</mo><mrow><msup><mrow
><mi
>π</mi></mrow><mrow
><mo
class="MathClass-bin">−</mo><mn>1</mn></mrow></msup
> <mo
class="MathClass-bin">∘</mo> <mi
>σ</mi></mrow><mo
class="MathClass-close">)</mo></mrow></mrow></math>.
So now the goal is to describe the probability distribution
<!--l. 258--><math
xmlns="http://www.w3.org/1998/Math/MathML"