From this fascinating piece in The Wall Street Journal, we learn about the randomness (or lack thereof) when shuffling cards:
The standard way to mix a deck of playing cards—the one used everywhere from casinos to rec rooms—is what is known as a riffle (or “dovetail”) shuffle. You begin by splitting the deck into two roughly equal stacks. Then you flick the cards with your thumbs off the bottoms of the piles in alternating fashion, interleaving the two stacks.
For games like blackjack or poker to be truly fair, the order of the cards must be completely random when the game begins. Otherwise a skilled cheat can exploit the lack of randomness to gain an advantage over other players.
How many riffle shuffles does it take to adequately mix a deck of 52 playing cards?
As it turns out, you have to shuffle seven times before a deck becomes truly scrambled. Not only that, the cards become mixed in a highly unusual way: The amount of randomness in the deck does not increase smoothly. The first few shuffles do little to disturb the original order, and even after six shuffles, you can still pick out distinctly non-random patches.
But right around the seventh shuffle something remarkable happens. Shuffling hits its tipping point, and the cards rapidly decay into chaos.
The seven-shuffles finding applies to messy, imperfect riffle shuffles. The deck might not be divided exactly in half, for instance, or the cards might be riffled together in a haphazard way. Far from undesirable, a little sloppiness is actually the key to a random shuffle.
A perfect (or “faro”) shuffle, meanwhile, wherein the deck is split precisely in half and the two halves are zippered together in perfect alternation, isn’t random at all. In fact, it’s completely predictable. Eight perfect shuffles will return a 52-card deck to its original order, with every card cycling back to its starting position.
And this doesn’t just work for 52 cards. A deck of any size will eventually return to its starting order after a finite sequence of faro shuffles, although the number of faros required isn’t always eight—and doesn’t increase linearly. If you have 104 cards, for instance, it takes 51 faros to restore the deck. For a thousand cards, it takes 36.
These findings are among the many fascinating results explored in Magical Mathematics, a dazzling tour of math-based magic tricks. The authors, Persi Diaconis and Ron Graham, are distinguished mathematicians with high-powered academic pedigrees. Both are also accomplished magicians who have taught courses on mathematical magic at Harvard and Stanford.
I’ve put the book on my to-read list.