The Annals of Applied Probability

Analysis of casino shelf shuffling machines

Persi Diaconis, Jason Fulman, and Susan Holmes

Full-text: Open access


Many casinos routinely use mechanical card shuffling machines. We were asked to evaluate a new product, a shelf shuffler. This leads to new probability, new combinatorics and to some practical advice which was adopted by the manufacturer. The interplay between theory, computing, and real-world application is developed.

Article information

Ann. Appl. Probab., Volume 23, Number 4 (2013), 1692-1720.

First available in Project Euclid: 21 June 2013

Permanent link to this document

Digital Object Identifier

Mathematical Reviews number (MathSciNet)

Zentralblatt MATH identifier

Primary: 60C05: Combinatorial probability
Secondary: 05A15: Exact enumeration problems, generating functions [See also 33Cxx, 33Dxx]

Riffle shuffling testing for randomness valleys in permutations


Diaconis, Persi; Fulman, Jason; Holmes, Susan. Analysis of casino shelf shuffling machines. Ann. Appl. Probab. 23 (2013), no. 4, 1692--1720. doi:10.1214/12-AAP884.

Export citation


  • Aguiar, M., Bergeron, N. and Nyman, K. (2004). The peak algebra and the descent algebras of types $B$ and $D$. Trans. Amer. Math. Soc. 356 2781–2824.
  • Aguiar, M., Bergeron, N. and Sottile, F. (2006). Combinatorial Hopf algebras and generalized Dehn–Sommerville relations. Compos. Math. 142 1–30.
  • Aldous, D. (1983). Random walks on finite groups and rapidly mixing Markov chains. In Seminar on Probability, XVII. Lecture Notes in Math. 986 243–297. Springer, Berlin.
  • Aldous, D. and Diaconis, P. (1986). Shuffling cards and stopping times. Amer. Math. Monthly 93 333–348.
  • Assaf, S., Diaconis, P. and Soundararajan, K. (2011). A rule of thumb for riffle shuffling. Ann. Appl. Probab. 21 843–875.
  • Bayer, D. and Diaconis, P. (1992). Trailing the dovetail shuffle to its lair. Ann. Appl. Probab. 2 294–313.
  • Bidigare, P., Hanlon, P. and Rockmore, D. (1999). A combinatorial description of the spectrum for the Tsetlin library and its generalization to hyperplane arrangements. Duke Math. J. 99 135–174.
  • Billera, L. J., Hsiao, S. K. and van Willigenburg, S. (2003). Peak quasisymmetric functions and Eulerian enumeration. Adv. Math. 176 248–276.
  • Blessenohl, D., Hohlweg, C. and Schocker, M. (2005). A symmetry of the descent algebra of a finite Coxeter group. Adv. Math. 193 416–437.
  • Borel, E. and Chéron, A. (1955). Théorie Mathématique du Bridge à la Portée de Tous, 2ème ed. Gauthier-Villars, Paris.
  • Brown, K. S. and Diaconis, P. (1998). Random walks and hyperplane arrangements. Ann. Probab. 26 1813–1854.
  • Ciucu, M. (1998). No-feedback card guessing for dovetail shuffles. Ann. Appl. Probab. 8 1251–1269.
  • Comtet, L. (1974). Advanced Combinatorics: The Art of Finite and Infinite Expansions, enlarged ed. Reidel, Dordrecht.
  • Conger, M. A. and Howald, J. (2010). A better way to deal the cards. Amer. Math. Monthly 117 686–700.
  • Conger, M. and Viswanath, D. (2006). Riffle shuffles of decks with repeated cards. Ann. Probab. 34 804–819.
  • Diaconis, P. (1988). Group Representations in Probability and Statistics. Institute of Mathematical Statistics Lecture Notes—Monograph Series 11. IMS, Hayward, CA.
  • Diaconis, P. (1996). The cutoff phenomenon in finite Markov chains. Proc. Natl. Acad. Sci. USA 93 1659–1664.
  • Diaconis, P. (2003). Mathematical developments from the analysis of riffle shuffling. In Groups, Combinatorics & Geometry (Durham, 2001) 73–97. World Sci. Publ., River Edge, NJ.
  • Diaconis, P. and Fulman, J. (2009a). Carries, shuffling, and an amazing matrix. Amer. Math. Monthly 116 788–803.
  • Diaconis, P. and Fulman, J. (2009b). Carries, shuffling, and symmetric functions. Adv. in Appl. Math. 43 176–196.
  • Diaconis, P. and Fulman, J. (2012). Foulkes characters, Eulerian idempotents, and an amazing matrix. J. Algebraic Combin. 36 425–440.
  • Diaconis, P. and Graham, R. (2012). Magical Mathematics. Princeton Univ. Press, Princeton, NJ.
  • Diaconis, P., McGrath, M. and Pitman, J. (1995). Riffle shuffles, cycles, and descents. Combinatorica 15 11–29.
  • Diaconis, P. and Shahshahani, M. (1981). Generating a random permutation with random transpositions. Z. Wahrsch. Verw. Gebiete 57 159–179.
  • Epstein, R. A. (1977). The Theory of Gambling and Statistical Logic, revised ed. Academic Press, New York.
  • Ethier, S. N. (2010). The Doctrine of Chances: Probabilistic Aspects of Gambling. Springer, Berlin.
  • Feller, W. (1968). An Introduction to Probability Theory and Its Applications. Vol. I, 3rd ed. Wiley, New York.
  • Fulman, J. (1998). The combinatorics of biased riffle shuffles. Combinatorica 18 173–184.
  • Fulman, J. (2000a). Affine shuffles, shuffles with cuts, the Whitehouse module, and patience sorting. J. Algebra 231 614–639.
  • Fulman, J. (2000b). Semisimple orbits of Lie algebras and card-shuffling measures on Coxeter groups. J. Algebra 224 151–165.
  • Fulman, J. (2001). Applications of the Brauer complex: Card shuffling, permutation statistics, and dynamical systems. J. Algebra 243 96–122.
  • Fulman, J. (2002). Applications of symmetric functions to cycle and increasing subsequence structure after shuffles. J. Algebraic Combin. 16 165–194.
  • Gannon, T. (2001). The cyclic structure of unimodal permutations. Discrete Math. 237 149–161.
  • Gessel, I. M. and Reutenauer, C. (1993). Counting permutations with given cycle structure and descent set. J. Combin. Theory Ser. A 64 189–215.
  • Gontcharoff, W. (1942). Sur la distribution des cycles dans les permutations. C. R. (Doklady) Acad. Sci. URSS (N.S.) 35 267–269.
  • Gontcharoff, V. (1944). Du domaine de l’analyse combinatoire. Bull. Acad. Sci. URSS Sér. Math. [Izvestia Akad. Nauk SSSR] 8 3–48.
  • Grinstead, C. M. and Snell, J. L. (1997). Introduction to Probability, 2nd ed. Amer. Math. Soc., Providence, RI.
  • Hadamard, J. (1906). Note de lecture sur J. Gibbs, “Elementary principles in statistical mechanics”. Bull. Amer. Math. Soc 12 194–210.
  • Kerov, S. V. and Vershik, A. M. (1986). The characters of the infinite symmetric group and probability properties of the Robinson–Schensted–Knuth algorithm. SIAM J. Algebraic Discrete Methods 7 116–124.
  • Klarreich, E. (2002). Coming up trumps. New Scientist 175 42–44.
  • Klarreich, E. (2003). Within every math problem, for this mathematician, lurks a card-shuffling problem. SIAM News 36. Available at
  • Lalley, S. P. (1996). Cycle structure of riffle shuffles. Ann. Probab. 24 49–73.
  • Lalley, S. P. (1999). Riffle shuffles and their associated dynamical systems. J. Theoret. Probab. 12 903–932.
  • Macdonald, I. G. (1995). Symmetric Functions and Hall Polynomials, 2nd ed. Oxford Univ. Press, New York.
  • Mackenzie, D. (2002). The mathematics of …shuffling. DISCOVER. Available at
  • Mann, B. (1994). How many times should you shuffle a deck of cards? UMAP J. 15 303–332.
  • Mann, B. (1995). How many times should you shuffle a deck of cards? In Topics in Contemporary Probability and Its Applications 261–289. CRC, Boca Raton, FL.
  • Morris, B. (2009). Improved mixing time bounds for the Thorp shuffle and $L$-reversal chain. Ann. Probab. 37 453–477.
  • Nyman, K. L. (2003). The peak algebra of the symmetric group. J. Algebraic Combin. 17 309–322.
  • Petersen, T. K. (2005). Cyclic descents and $P$-partitions. J. Algebraic Combin. 22 343–375.
  • Petersen, T. K. (2007). Enriched $P$-partitions and peak algebras. Adv. Math. 209 561–610.
  • Poincaré, H. (1912). Calcul des probabilités. Georges Carré, Paris.
  • Poirier, S. (1998). Cycle type and descent set in wreath products. In Proceedings of the 7th Conference on Formal Power Series and Algebraic Combinatorics (Noisy-le-Grand, 1995) 180 315–343.
  • Reiner, V. (1993). Signed permutation statistics and cycle type. European J. Combin. 14 569–579.
  • Rogers, T. D. (1981). Chaos in systems in population biology. In Progress in Theoretical Biology, Vol. 6 91–146. Academic Press, New York.
  • Shepp, L. A. and Lloyd, S. P. (1966). Ordered cycle lengths in a random permutation. Trans. Amer. Math. Soc. 121 340–357.
  • Stanley, R. P. (1999). Enumerative Combinatorics, Vol. 2. Cambridge Studies in Advanced Mathematics 62. Cambridge Univ. Press, Cambridge.
  • Stanley, R. P. (2001). Generalized riffle shuffles and quasisymmetric functions. Ann. Comb. 5 479–491.
  • Stark, D., Ganesh, A. and O’Connell, N. (2002). Information loss in riffle shuffling. Combin. Probab. Comput. 11 79–95.
  • Stembridge, J. R. (1997). Enriched $P$-partitions. Trans. Amer. Math. Soc. 349 763–788.
  • Thibon, J.-Y. (2001). The cycle enumerator of unimodal permutations. Ann. Comb. 5 493–500.
  • Thorp, E. O. (1973). Nonrandom shuffling with applications to the game of Faro. J. Amer. Statist. Assoc. 68 842–847.
  • Vershik, A. M. and Shmidt, A. A. (1977). Limit measures arising in the asymptotic theory of symmetric groups, Vol. 1. Theory Probab. Appl. 22 70–85.
  • Vershik, A. M. and Shmidt, A. A. (1978). Limit measures arising in the asymptotic theory of symmetric groups, Vol. 2. Theory Probab. Appl. 23 36–49.
  • Warren, D. and Seneta, E. (1996). Peaks and Eulerian numbers in a random sequence. J. Appl. Probab. 33 101–114.