How Often Does a Perfect Shuffle Repeat?
The problem
A deck of cards is cut into two piles of and perfectly interleaved — the top card of the deck stays on top (an 'out-shuffle'). If you repeat this shuffle over and over, how many shuffles does it take before the deck returns to its original order?
- The interleaving is perfect: the cards alternate exactly, without any of the randomness of a real shuffle.
- The top card stays on top after every shuffle.
Take a minute
Reveal hint 1
Label the card positions to and work out where position goes in one out-shuffle.
Reveal hint 2
The answer is the multiplicative order of modulo .
Solution
Answer shuffles.
Derivation
-
Find the position map.
-
Justify the modulus.
-
Ask for the period.
-
Compute the order.
-
Confirm no smaller exponent works.
-
Compare with the in-shuffle.