How many shuffles of a deck before it's back in the original order?

Suppose I had a brand new deck of cards, still in factory order. Assuming a “perfect” shuffle (deck cut exactly on half, then exactly one card from each stack interlaced together, then repeated), how many shuffles would it take to get that deck back to its original order?

I know the number of possible distinct sequence of a deck of cards is 52!, a ridiculously large number ( IIRC, that’s more seconds than the universe has existed). But I don’t think the deck necessarily has to go through every permutation to get back to original order, does it? Intuitively, I expect it’s a very large number, but the math necessary to calculate it eludes me. I am curious to know if the number is much smaller than I expect (though I don’t even know what to expect…billions? Trillions?)

Hopefully responses can break down the math, rather than just giving a number.

It depends whether you’re using an out-shuffle or an in-shuffle. It takes eight times for an out-shuffle. It takes 52 times for an in-shuffle. I’ll explain the difference as soon as I can understand the explanation I found online.

Here’s a neat visualization: https://old.reddit.com/r/dataisbeautiful/comments/r9b8uz/oc_8_perfect_shuffles_shuffling_a_deck_of_cards/

Along with more detailed explanation: The Perfect Shuffle | Towards Data Science and even more math: https://mathweb.ucsd.edu/~ronspubs/83_05_shuffles.pdf

I’ll let Wendell explain it, though!

In an out-shuffle the deck is split in half and the cards are interleaved with the bottom half of the deck used to start the interleaving. In an in-shuffle, the deck is split in half and the top half of the deck is used to start the interleaving. Does that make sense to you? I’m not sure that it makes sense to me.

Doesn’t that mean that the new top card is the first card from the top half half of the deck for an in shuffle (card #1) , and the new top card comes from the first card on top of the bottom half of the deck (card #27) in an out shuffle?

That data science link has a visualization that might help:

And here’s a separate animation: Eight Perfect Shuffles (of an out-shuffle)

Wow, that’s pretty cool. And much less times than I would have thought.

That is damn cool!

And because I was confused, I looked up what V and D and R stood for.

It’s a French card deck.

V: Valet
D: Dame
R: Roi

When you shuffle a deck of cards, the intermixing of the cards are random. Since that is the case, there are: 80,658,175,170,943,878,571,660,443,885,386,014,120,000,000,000,000,000,000,000,000,000) possible combinations, and a truly random shuffle is unlikely to ever result in the original order. The entire age of the universe probably isn’t long enough time for it to actually happen.

A “perfect” shuffle isn’t random though.

PS there is a name for this, a faro shuffle: Faro shuffle - Wikipedia

It includes yet another diagram:

True, but the OP didn’t mention anything about a “perfect shuffle”.

This thread makes me think of square dancing. One of the movements has all the dancers line up in two long parallel lines and do a shuffle just like this. After a few times, everyone ends up back in their original places.

It’s in his second sentence.

Isn’t it his second sentence…?

Ninjaed!

This is why you never fake a book report without reading the book. LOL

He did not mention a perfect shuffle by name, but he described it:

deck cut exactly on half, then exactly one card from each stack interlaced together, then repeated

That is the definition of a perfect shuffle, he only did not specify whether he meant an out shuffle or an in shuffle.
ETA: Double ninja’d!

@Zoobi might have something to say about that :wink:

Am I taking crazy pills? He literally called it a “perfect” shuffle and then spent several words describing it. I can’t fathom how that gets missed.

You throw enough math at somebody, like 52!, and the brain must spend all its neurons on that and there’s none left for Englishing.