I Was Told There Would Be No Math

In a recent Daily Illuminator, I laid some of the groundwork for how many shuffles it takes to randomize a standard deck of cards (SPOILER: seven), and name-dropping some sources.

Today we're taking a deeper dive into how this affects us, and I use some shaky math to generate something useful.

So, I can't make heads or tails of most statistics papers. But I can understand the abstract of "Trailing the Dovetail Shuffle to its Lair," the foundational article that explores how many shuffles are needed. Or, more correctly, I can understand enough to be able to ask my kid what it means. And in this case, the foundational formula of "how many shuffles is sufficient," according to the abstract where "x" is the number of cards in the deck is: (3/2)log2(x). And that's enough that I can articulate the question for my kiddo. ("When are you ever gonna use this stuff?" the youth may ask. "When daddy needs to write a Daily Illuminator article. Now teach me about logs!")

Some internet searching later reveals at least one nice, basic log base 2 calculator. Checking our math, we plug in our standard 52-card deck and discover log2(52) is 5.7, which, when multiplied by 1.5 (that is, "3/2") gives us . . . umm . . . 8.55, which is more than the "seven is enough" that the internet promised me. Honestly, discovering a piece of wrong information on the internet has shaken me to my core.

However, poking at the article further, I remain convinced that seven shuffles is around what it takes because – at that point – there's basically 0 (rounding down) cards' worth of "non-randomness" between any two cards, which is what we want. Regardless, the gulf between "seven" and "8.55" isn't so huge that it's worth my worrying about it too much more – and 8.55 is much closer to my Dick Van Patten ideal of eight shuffles.

All of this means that, if we're looking for an answer of "what's the number of shuffles you need that's sufficient and probably a bit overkill?" then that can be calculated via the (3/2)log2(x) formula.

And that's a formula we can use to sort out how many shuffles we need for a good-and-random deck of some favorite games.

Breaking out a copy of Munchkin? No need to shuffle its 168-card deck more than 11 times. Adding 112 cards of Munchkin 2: Unnatural Axe? Then you only need 12 shuffles to get ready to play. Switching things up to Illuminati? Then 10 shuffles and you should be good to go!

Of course, actually shuffling 1,000 cards in one "riffle shuffle" isn't terribly likely unless your nickname is Longfingers. But it at least gives you an idea of how many riffle-like shuffles you'd need of an entire deck to get that deck of 1,000 cards shuffled . . . which is, perhaps surprisingly, about 15. (Logarithms are fun but weird.)

For those of you better steeped in math and statistics than I am, or who have a mathier kid, if I'm dabbling in arcane forces I don't comprehend and you feel compelled to set the record straight, please feel free to share your insight on the forums.

-- Steven Marsh