Real World Maths Busters

The Maths Behind Everyday Life

The story, the formula and a worked example — see exactly where this maths shows up in the world around you.

Back to all stories
Games & Chance 4 min read

Riffle Shuffle Randomness

How many shuffles to truly randomise a deck?

The Gilbert-Shannon-Reeds model describes a riffle shuffle: cut the deck approximately in half, then interleave. After n shuffles, the total variation distance from uniform drops sharply.

The 7-shuffle threshold

After 7 riffle shuffles, the deck is nearly indistinguishable from random.

dTV(n)≈1−2π (drops sharply around n=7)d_{TV}(n) \approx 1 - \frac{2}{\sqrt{\pi}} \text{ (drops sharply around } n=7 \text{)}

Why not fewer?

After 1 shuffle, the deck retains most of its original order. After 3, significant patterns remain. The mixing time exhibits a “cutoff phenomenon” around 7.

Mixing time≈32log⁡252≈8.5\text{Mixing time} \approx \frac{3}{2} \log_2 52 \approx 8.5

Rule of thumb

  1. 1

    Step

    (3/2) × log₂(52) = (3/2) × 5.7 ≈ 8.5

Answer

7-8 shuffles in practice

The formula behind it

Logarithm

log⁡bx=y  ⟺  by=x\log_b x = y \iff b^y = x
See the full formula, variables and more examples

The takeaway

Seven shuffles — the magic number for a fair deal.

Back to all stories