Abstract
Thorp shuffle is a simple model for a random riffle shuffle that for many years has eluded good analysis. In Thorp shuffle, one first cuts a deck of cards in half, and then starts dropping the cards from the left or right hand as with an ordinary shuffle, so that at each time, one chooses the left or right card with probability \(\frac12\) and drops it, and then drops the card from the opposite hand. Then one continues this inductively until all cards have been dropped. The question is how many times one has to repeat this process to randomly shuffle a deck of n cards. Despite its rather simple description and wide interest in understanding its behavior, Thorp shuffle has been very difficult to analyze and only very recently, Morris showed that Thorp shuffle mixes in a polylogarithmic number of rounds.
In our main result, we show that if Thorp shuffle mixes sequences consisting of n − k distinct elements together with k identical elements (so-called k-partial n-permutations) with k = Θ(n), then \(\mathcal{O}(\log^2n)\) rounds are sufficient to randomly mix the input elements. In other words, \(\mathcal{O}(\log^2n)\) Thorp shuffles with n input elements randomly permutes any set of c n elements with any c < 1, or, equivalently, is almost cn-wise independent. The key technical part of our proof is a novel analysis of the shuffling process that uses non-Markovian coupling. While non-Markovian coupling is known to be more powerful than the Markovian coupling, our treatment is one of only a few examples where strictly non-Markovian coupling can be used to formally prove a strong mixing time. Our non-Markovian coupling is used to reduce the problem to the analysis of some random process in networks (in particular, when n is a power of two then this is in a butterfly network), which we solve using combinatorial and probabilistic arguments.
Our result can be used to randomly permute any number of elements using Thorp shuffle: If the input deck has N cards, then add another set of 0.01 N “empty” cards and run \(\mathcal{O}(\log^2N)\) Thorp shuffles. Then, if we remove the empty cards, the obtained deck will have the original N cards randomly permuted.
We also analyze a related shuffling process that we call Perfect shuffle. We cut a deck of n cards into two halves, randomly permute each half, and then perform one step of Thorp shuffle. Apart from being interesting on its own, our motivation to study this process is that a single Perfect shuffle is very similar to \(\mathcal{O}(\log n)\) Thorp shuffles, and thus understanding of Perfect shuffle can shed some light on the performance of Thorp shuffle. We apply coupling to show that Perfect shuffle mixes in \(\mathcal{O}(\log\log n)\) steps, which we conjecture to be asymptotically tight.
Research supported in part by the Centre for Discrete Mathematics and its Applications (DIMAP), EPSRC award EP/D063191/1.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Aldous, D.: Random walks of finite groups and rapidly mixing Markov chains. In: Séminaire de Probabilités XVII, 1981/82, pp. 243–297. Springer, Berlin (1983)
Aldous, D., Diaconis, P.: Strong uniform times and finite random walks. Advances in Applied Mathematics 8, 69–97 (1987)
Berenbrink, P., Czumaj, A., Steger, A., Vöcking, B.: Balanced allocations: The heavily loaded case. SIAM Journal on Computing 35(6), 1350–1385 (2006)
Bubley, R., Dyer, M.: Path coupling: A technique for proving rapid mixing in Markov chains. In: 38th IEEE FOCS, pp. 223–231 (1997)
Czumaj, A., Kanarek, P., Kutyłowski, M., Loryś, K.: Delayed path coupling and generating random permutations via distributed stochastic processes. In: SODA, pp. 271–280 (1999)
Czumaj, A., Kutyłowski, M.: Delayed path coupling and generating random permutations. Random Structures and Algorithms 17(3-4), 238–259 (2000)
Diaconis, P.: Group Representations in Probability and Statistics. Lecture Notes - Monograph Series, vol. 11. Institute of Mathematical Statistics, Hayward (1988)
Dyer, M., Greenhill, C.: Random walks on combinatorial objects. In: Surveys in Combinatorics, pp. 101–136. Cambridge University Press, UK (1999)
Griffeath, D.: A maximal coupling for Markov chains. Zeitschrift für Wahrscheinlichkeitstheorie und verwandte Gebiete 31, 95–106 (1975)
Håstad, J.: The square lattice shuffle. Random Struct. and Algorithms 29, 466–474 (2006)
Hayes, T.P., Vigoda, E.: A non-Markovian coupling for randomly sampling colorings. In: 44th IEEE FOCS, pp. 618–627 (2003)
Jerrum, M.: Mathematical foundations of the Markov chain Monte Carlo method. In: Probabilistic Methods for Algorithmic Discrete Mathematics, pp. 116–165. Springer (1998)
Knuth, D.E.: The Art of Computer Programming, Volume 3: Sorting and Searching. Section 5.3.4: Networks for Sorting, 3rd edn., pp. 219–247. Addison-Wesley (1997)
Montenegro, R., Tetali, P.: Mathematical aspects of mixing times in Markov chains. Foundations and Trends in Theoretical Computer Science 1(3), 237–354 (2006)
Morris, B.: The mixing time of the Thorp shuffle. In: 37th ACM STOC, pp. 403–412 (2005)
Morris, B.: The mixing time of the Thorp shuffle. SIAM Journal on Computing 38(2), 484–504 (2008); This is the full, corrected, and updated version of [15]
Morris, B.: Improved mixing time bounds for the Thorp shuffle and L-reversal chain. Annals of Probabability 37(2), 453–477 (2009)
Morris, B.: Improved mixing time bounds for the Thorp shuffle. arXiv 0912.2759 (2009)
Morris, B., Rogaway, P., Stegers, T.: How to Encipher Messages on a Small Domain. In: Halevi, S. (ed.) CRYPTO 2009. LNCS, vol. 5677, pp. 286–302. Springer, Heidelberg (2009)
Rackoff, C., Simon, D.R.: Cryptographic defense against traffic analysis. In: 25th ACM STOC, pp. 672–681 (1993)
Thorp, E.O.: Nonrandom shuffling with applications to the game of Faro. Journal of the American Statistical Association 68, 842–847 (1973)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2014 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Czumaj, A., Vöcking, B. (2014). Thorp Shuffling, Butterflies, and Non-Markovian Couplings. In: Esparza, J., Fraigniaud, P., Husfeldt, T., Koutsoupias, E. (eds) Automata, Languages, and Programming. ICALP 2014. Lecture Notes in Computer Science, vol 8572. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-662-43948-7_29
Download citation
DOI: https://doi.org/10.1007/978-3-662-43948-7_29
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-662-43947-0
Online ISBN: 978-3-662-43948-7
eBook Packages: Computer ScienceComputer Science (R0)