Seven Shuffles Randomize a Deck. Your Shuffling Doesn’t Count
Say you’re at a kitchen table, it’s your deal, and someone at the table is the kind of person who counts cards or at least wants you to think they do. You shuffle. Seven times, because you read somewhere that seven is the magic number and you feel good about it. You should not feel good about it.
The famous “seven shuffles” result comes with a footnote most people never read, and the footnote is basically: this only works if you shuffle like a professional. In 1992, mathematicians Dave Bayer and Persi Diaconis proved that seven riffle shuffles are enough to properly mix a 52-card deck.

Not every breakthrough relevant to quantum computing involves qubits. Sometimes it starts with the mathematics of randomness itself, the same branch of probability that underpins everything from statistical physics to quantum information science.
The seventh shuffle is where the deck loses its mind
As Quanta Magazine writes, when Bayer and Diaconis worked through their proof, they found the deck doesn’t get gradually more random with each pass. It stays kind of orderly, kind of orderly, kind of orderly, and then on that seventh shuffle it falls off a cliff into full chaos.
That cliff is called a cutoff phenomenon. It’s a lot like water refusing to freeze as it cools, holding out, holding out, and then flipping to ice the instant it hits zero. Same energy. The technical home for this is Markov chains, which are just models for how a system stumbles from one configuration to the next based on probability. A deck mid-shuffle is one. The way to describe a cutoff, and honestly nobody has topped it, is the Hemingway line about going broke: gradually, then suddenly.
Why mathematicians care about cutoffs
Because cutoffs are everywhere. Sellke, one of the mathematicians we’ll get to, says they’re expected in most large, complex systems, up to and including spin glasses in condensed matter physics. The catch is that “expected” and “proven” live in different neighborhoods. As Cornell’s Laurent Saloff-Coste put it, for most problems where people think there’s a cutoff, nobody knows how to actually prove it. That’s why the seven-shuffles theorem was such a big deal. Bayer and Diaconis went beyond just showing a cutoff existed in a real system; they also handed over a single formula that pinpointed it, and it worked for a deck of any size.
Quick detour to appreciate the object we’re mixing, because “deck of cards” undersells it wildly. The number of ways to arrange 52 cards is 52 factorial, an 8 followed by 67 zeros, close to the number of atoms in the galaxy. Every honest shuffle you’ve ever done produced an order that had never existed before and never will again. You, at the kitchen table, snacks nearby, casually generating a once-in-the-history-of-the-universe event. Anyway.
The problem was the terms and conditions, as the proof needed two things. The cards had to interleave one at a time under a specific realistic rule, dropping from the left or right pile with a probability tied to how many cards were left in each. And the deck had to be cut more or less exactly in half. “All of our analysis depends on those details,” Diaconis said. Which is another way of saying: shuffle like a person, and the miracle evaporates.

The middle-schooler shuffle is what broke everything
Real people do not cut a deck neatly in half. Some cut high, some cut low, everyone’s a little off, and that “little off” was mathematical poison for decades.
Back in 1999, University of Chicago mathematician Steven Lalley went after exactly this. Cut the deck unevenly and something stubborn shows up. Certain clusters of cards keep their relative order shuffle after shuffle, even as everything around them dissolves into randomness. Lalley named these hangers-on cold spots, and the nickname does a lot of work, so hang onto it.
A cold spot is a patch of the deck that resists mixing. Label your cards 1 through 52. After a bunch of shuffles, cards 16 and 17 won’t sit next to each other anymore, sure, but 16 might still show up before 17 more often than pure chance allows. Get a whole stretch like that, say cards 15 through 25 all quietly leaning the same way, and you’ve got a region still whispering about where it started. Lalley figured that if he could prove the cold spots eventually vanish, he’d prove the last of the order vanishes with them, and the cutoff would fall out.
He couldn’t do it. The idea was right, but the tools weren’t there yet, so the problem sat.

A card gets a barcode and suddenly you can follow it
Twenty years later the thread got picked back up, and the way it happened is almost too cool. In 2019, a Stanford grad student named Mark Sellke, son of Lalley’s old collaborator Thomas Sellke, ended up in one of Diaconis’ classes. Diaconis mentioned, kind of in passing, that if you don’t cut the deck in half the whole proof collapses. Sellke’s reaction was the reaction of every stubborn person who has ever heard “that’s impossible.” As he put it:
“I was like, ‘This is it? … Come on, we must be able to do this.'”
By 2021 he’d cracked the case of much more lopsided cuts, even decks chopped into more than two piles, but with a cheat: you had to cut the same way every single time. He wanted the messy version, where each cut looks nothing like the last. So in summer 2024 he teamed up with Jialu Shi at Cambridge and Jiamin Wang at Princeton, and the three of them built the thing that finally worked.
Their move: give every card a barcode. When you cut, every card in the left pile gets a 1, every card on the right gets a 0. Shuffle. Cut again, and tack on another digit, 1 for left, 0 for right. Do it again and again and each card grows a longer string of ones and zeros, a running diary of its journey left, right, left, back to right. A card with barcode 0110 started on the right, went left twice, landed right. Two cards that began in the same order and end up with identical barcodes took the exact same path, which means they never actually got shuffled apart.
Turning barcodes into a proof
Prove a cutoff and you have to show almost none of those matching barcodes survive past a certain point, for any deck size and any way of cutting. Checking every pair is a nightmare. This is where the cold spots pay off exactly like Lalley hoped, because the resistant regions are the only places matches can hide, so those are the only places you check.
From there the trio turned it into a graph: each card a dot, an edge drawn between any two dots sharing a barcode. Do it for two separate decks, lay the graphs on top of each other, and watch where the unmixed regions overlap. They proved the overlap shrinks at an exponential rate after enough shuffles, and that exponential drop-off is what pins down an upper bound on how long a deck clings to order.
Diaconis, whose own theorem this extends, did not hold back.
“It’s a fresh idea, and it’s remarkable that something like that would work as effectively as it does. It’s a brilliant piece of mathematics.”
Worth knowing where his instincts come from: Diaconis ran away from home at 14 to work with a magician and came back to school ten years later, and card tricks still turn up in his research.
The number is 14, and there’s still a catch
So how many shuffles if you cut at a random spot every time, like an actual human? About 14 for a 52-card deck. Get past that and your cards are properly mixed. Double the polite magician’s seven, which feels about right for the rest of us.
Sellke’s reason for caring is the least mathematician thing he says in the whole piece.
“I occasionally play poker with my friends, and I want to know how many times I should be shuffling my cards.”
Lalley, who watched this problem sit unsolved for 26 years and has known Sellke since he was a kid, called it spectacular.
Now the deflating footnote, because there always is one. This proof, like the 1992 original, still assumes cards riffle down one clean card at a time. Nobody shuffles like that. Real hands drop little clumps, two or three cards stuck together, and the clumpy version is still wide open.
Diaconis can riffle one card at a time, and he made sure everyone knew it. The rest of us are still, mathematically speaking, a mystery. Sellke says he likes the clumpy problem and hasn’t made progress in a while, which is close to where the whole thing lands: they figured out the deck, then admitted they still can’t account for your thumbs.