How Many Riffle Shuffles Randomise a Deck
The surprising result that a 52-card deck needs about seven riffle shuffles to become close to truly random — and the rising-sequence intuition behind why the number is neither one nor a hundred.
Question you'll actually be asked: "How many times do you need to riffle-shuffle a deck of cards before it's well mixed?" Most people guess based on intuition — "a couple should do it," or "you can never really randomize a deck by hand." The real answer, made famous by Bayer and Diaconis's analysis, is a specific and surprising number: about seven riffle shuffles for a standard 52-card deck. The interesting part isn't memorizing "seven" — it's understanding why the mixing happens abruptly rather than gradually, which is the actual insight being tested.
What a riffle shuffle actually does
A riffle shuffle splits the deck into two packets and interleaves them card by card. Mathematically, the number of "rising sequences" — maximal runs of cards that are still in their original relative order — roughly doubles with each shuffle: one shuffle from a sorted deck produces at most 2 rising sequences, two shuffles at most 4, and after shuffles, at most rising sequences. A deck is only "well shuffled" once it has enough rising sequences that no meaningful structure survives, and since needs to approach the deck size of 52 for the structure to disappear, — which is why the answer lands around 6–7, not 2 and not 20.
The "cutoff phenomenon": why it's not gradual
The striking mathematical result isn't just the number 7 — it's that randomness arrives suddenly rather than gradually. After 4 shuffles, the deck is still measurably far from random (an expert can detect leftover order, for instance via poker hands still showing statistically unusual patterns). After 7 shuffles, the deck is close enough to uniformly random that no practical test can distinguish it from a perfect shuffle. This sharp transition — barely random, then suddenly random, in the span of just 2–3 more shuffles — is called a cutoff phenomenon, and it shows up in many mixing processes beyond cards (this is why "how many shuffles" has a crisp answer instead of a vague "it depends").
Worked example: rising sequences by hand on a small deck
Take a tiny 4-card deck in order . One riffle shuffle might split it into and and interleave to get . Count rising sequences (maximal runs still increasing relative to original order): is one run and is another — 2 rising sequences, matching the "at most " bound. Shuffle again, splitting into and , interleaving to or or similar: rising sequences can now go up to 4. For a 4-card deck, , and indeed 2 riffle shuffles are enough to essentially randomize a 4-card deck — matching the pattern that scales up to "7 for 52 cards."
A riffle shuffle roughly doubles the number of rising sequences each time, so mixing a deck of cards takes about shuffles — for , that's about , rounding to the well-known result of 7 shuffles for practical randomness. Mixing arrives as a sharp cutoff, not a gradual fade, meaning 4 shuffles leave detectable structure while 7 essentially don't.
If asked "how many shuffles for a deck of cards" for some other than 52, the fast mental-math move is , rounded up — for a 32-card deck (as used in some card games), that's shuffles, not 7.
The common wrong answer is "one shuffle randomizes it" (confusing "looks shuffled to the eye" with "is statistically random") or "you can never fully randomize by hand" (confusing "takes many shuffles" with "impossible"). Both miss the actual finding: a specific, finite, and fairly small number of shuffles suffices, and it's derivable from rather than being either 1 or infinity.
Related concepts
Practice in interviews
Further reading
- Bayer & Diaconis, Trailing the Dovetail Shuffle to its Lair (1992)