Why it happens
Why Seven Shuffles Are Enough to Mix a Deck
Seven riffle shuffles mix a 52-card deck well enough for most games. Bayer and Diaconis showed in 1992 that the deck stays far from random through five riffles, still 92.4% of the way from a perfect shuffle, then the gap falls to 61.4% at six and 33.4% at seven. Each riffle after that roughly halves it.
A sorted deck, riffled seven times
- CH1 sequences 1, 5, 9…
- CH2 2, 6, 10…
- CH3 3, 7, 11…
- CH4 4, 8, 12…
How to read the stage
- Objective
- Read the deck, the plot and the chart, and follow the count of rising sequences riffle by riffle.
- How this step gets you there
- The text names each panel and gives the default run's counts, so you can check them as you step.
The deck runs top to bottom. Under each card is its rising sequence: a run of successive cards still in order, with others between them. The plot draws each sequence as a line. With seed 7, seven riffles take the count from 1 to 2, 4, 8, 14, 20, 24 and 29, against 26.5 on average for a perfectly shuffled deck.
Why one riffle isn't enough
- Objective
- Explain why a riffle keeps each packet in order, and why that caps the rising sequences at 2^k.
- How this step gets you there
- The text follows one riffle of a sorted deck and counts what it can reach; the stage shows the doubling.
A riffle cuts the deck and drops the two packets together, so each packet keeps its order. One riffle of a sorted deck leaves two rising sequences and can reach only 2^52 − 52 orders, about 4.5 × 10^15 of the 52! possible. Each riffle at most doubles the count, so three leave at most 8. Magicians were reading cards from these sequences by 1912.
Where seven comes from
- Objective
- Say what total variation distance measures, and why seven is the first count below half for 52 cards.
- How this step gets you there
- The text gives the exact distance riffle by riffle from Bayer and Diaconis's formula, the numbers the second stage draws.
Bayer and Diaconis found the exact chance of every order after any number of riffles, and it depends only on the rising sequences. From it comes the total variation distance from a perfect shuffle: the biggest difference in odds any bet on the deck's order can find. For 52 cards it's 100% through four riffles, 92.4% at five, 61.4% at six and 33.4% at seven, then 4.3% by ten.
1,000 decks, measured
- Objective
- Compare measured decks with the exact distance, and say what a sample of 1,000 can and can't detect.
- How this step gets you there
- The stage plots measured and exact distance together, and the spread of rising sequences against a perfect shuffle's.
The second stage riffles 1,000 sorted decks ten times and sorts them by rising sequences, the one number the model's odds depend on. After seven riffles they average 24.7 against 26.5, and the measured distance is 34.9% against an exact 33.4%. At ten it reads 6.4% against 4.3%: a sample of 1,000 can't see a gap that small, so it levels off above the truth.
1,000 decks, each riffled ten times
A deck that never existed before
- Objective
- Explain why a well-shuffled deck is almost surely new, and why a lightly shuffled one isn't.
- How this step gets you there
- The text sizes 52! against a generous count of every deck ever shuffled, counting pairs as the birthday problem does.
52 cards can be ordered 52! ways, about 8.07 × 10^67. If a billion people each shuffled a deck every second for a billion years, the chance any two perfectly shuffled decks ever matched would be under 1 in 10^17. Seven riffles from a new deck come close: two such decks match only 2.0 times as often. After three riffles, a match is 3.8 × 10^21 times as likely.
What the model leaves out
- Objective
- Say how real shuffles differ from the model, and why other measures give other answers.
- How this step gets you there
- The text names the model's assumption, the perfect shuffle that breaks it, and the competing measure.
Real hands aren't exactly the model, though Diaconis's experiments found it a good description of ordinary riffles. A shuffler who alternates cards perfectly mixes nothing: eight perfect out-shuffles restore a 52-card deck. Distance is one measure among several, and Trefethen and Trefethen argued six riffles suffice under another. Magician Charles Jordan's card trick, naming a moved card in 26 guesses, still wins 54.8% of Bayer and Diaconis's simulated deals after eight riffles, against 50% for a random deck.
Questions
- How many times should you shuffle a deck of cards?
- Seven riffle shuffles for a 52-card deck, by Bayer and Diaconis's measure: the distance from a perfect shuffle first drops below half there, to 33.4%. In 1990 Diaconis told the New York Times that most people shuffle three or four times, which leaves a deck far from random.
- Is every shuffled deck unique?
- A well-shuffled one almost certainly is. 52! is about 8.07 × 10^67, so even a billion people shuffling every second for a billion years would almost surely never repeat a deck. A new deck shuffled once or twice is different: far fewer orders are reachable, and the old order still shows.
- What is a rising sequence?
- A run of successive cards, like 4, 5, 6 and 7, that still appear in order through the deck with other cards between them. A sorted deck has one, one riffle makes two, and a perfectly shuffled 52-card deck has 26.5 on average. Magicians used them first; Bayer and Diaconis built the math on them.
- Do casinos shuffle seven times?
- Not always. In 1990, Las Vegas casinos shuffled from four to seven times at the owners' discretion, and Diaconis told the New York Times he almost never saw a dealer shuffle seven times.