Skip to main content

Thorp Shuffling, Butterflies, and Non-Markovian Couplings

  • Conference paper
Automata, Languages, and Programming (ICALP 2014)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 8572))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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)

    Chapter  Google Scholar 

  2. Aldous, D., Diaconis, P.: Strong uniform times and finite random walks. Advances in Applied Mathematics 8, 69–97 (1987)

    Article  MATH  MathSciNet  Google Scholar 

  3. Berenbrink, P., Czumaj, A., Steger, A., Vöcking, B.: Balanced allocations: The heavily loaded case. SIAM Journal on Computing 35(6), 1350–1385 (2006)

    Article  MATH  MathSciNet  Google Scholar 

  4. Bubley, R., Dyer, M.: Path coupling: A technique for proving rapid mixing in Markov chains. In: 38th IEEE FOCS, pp. 223–231 (1997)

    Google Scholar 

  5. 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)

    Google Scholar 

  6. Czumaj, A., Kutyłowski, M.: Delayed path coupling and generating random permutations. Random Structures and Algorithms 17(3-4), 238–259 (2000)

    Article  MATH  MathSciNet  Google Scholar 

  7. Diaconis, P.: Group Representations in Probability and Statistics. Lecture Notes - Monograph Series, vol. 11. Institute of Mathematical Statistics, Hayward (1988)

    MATH  Google Scholar 

  8. Dyer, M., Greenhill, C.: Random walks on combinatorial objects. In: Surveys in Combinatorics, pp. 101–136. Cambridge University Press, UK (1999)

    Google Scholar 

  9. Griffeath, D.: A maximal coupling for Markov chains. Zeitschrift für Wahrscheinlichkeitstheorie und verwandte Gebiete 31, 95–106 (1975)

    Article  MATH  MathSciNet  Google Scholar 

  10. Håstad, J.: The square lattice shuffle. Random Struct. and Algorithms 29, 466–474 (2006)

    Article  MATH  Google Scholar 

  11. Hayes, T.P., Vigoda, E.: A non-Markovian coupling for randomly sampling colorings. In: 44th IEEE FOCS, pp. 618–627 (2003)

    Google Scholar 

  12. Jerrum, M.: Mathematical foundations of the Markov chain Monte Carlo method. In: Probabilistic Methods for Algorithmic Discrete Mathematics, pp. 116–165. Springer (1998)

    Google Scholar 

  13. 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)

    Google Scholar 

  14. Montenegro, R., Tetali, P.: Mathematical aspects of mixing times in Markov chains. Foundations and Trends in Theoretical Computer Science 1(3), 237–354 (2006)

    Article  MathSciNet  Google Scholar 

  15. Morris, B.: The mixing time of the Thorp shuffle. In: 37th ACM STOC, pp. 403–412 (2005)

    Google Scholar 

  16. 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]

    Article  MathSciNet  Google Scholar 

  17. Morris, B.: Improved mixing time bounds for the Thorp shuffle and L-reversal chain. Annals of Probabability 37(2), 453–477 (2009)

    Article  MATH  Google Scholar 

  18. Morris, B.: Improved mixing time bounds for the Thorp shuffle. arXiv 0912.2759 (2009)

    Google Scholar 

  19. 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)

    Chapter  Google Scholar 

  20. Rackoff, C., Simon, D.R.: Cryptographic defense against traffic analysis. In: 25th ACM STOC, pp. 672–681 (1993)

    Google Scholar 

  21. Thorp, E.O.: Nonrandom shuffling with applications to the game of Faro. Journal of the American Statistical Association 68, 842–847 (1973)

    Article  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics