Projects

Perfect Faro Shuffling

Math

Exploring why eight perfect out-shuffles restore a 52-card deck, and how number theory describes the movement of individual cards.

Research poster explaining perfect Faro shuffles through card-position diagrams, number theory, and results.

Shuffle a standard deck of 52 cards perfectly eight times in a row, using an out-shuffle that keeps the top and bottom cards in place, and the deck returns to its original order. That surprising result was the starting point for a research project I worked on with Anirudh Arunprasad.

A perfect Faro shuffle interleaves the two halves of a deck one card at a time. Because the arrangement is exact, we can model where every card goes and follow the cycles that eventually bring it back.

From card tricks to number theory

We used code to explore patterns, then developed mathematical arguments using modular arithmetic, card cycles, and number theory. Our report studies how the return period changes with deck size and how combinations of in-shuffles and out-shuffles can control a card’s position.

What I enjoyed most was the connection between experimentation and proof: a small program could suggest a pattern, but we still had to explain why it held. A deck of cards turned into a surprisingly rich way to explore permutations and algorithms.

Final report

Read our February 2024 report (PDF)