Visualizing what happens when you shuffle a deck of cards

Originally published at: https://boingboing.net/2019/10/07/cabinet-shuffle.html

5 Likes

Not me! As a computer programmer, I roll a 52 sided die and swap the first card for the card number of the die roll. Then I do it for the 2d card, etc, until I get to the last card.

Where my nerd friends at?!

6 Likes

Really great data visualization. This man is living a good life.

8 Likes

I once made a spreadsheet to prove that after 8 perfect riffle shuffles, a 52-card deck is restored to its starting position. And I once got very good at riffle shuffling, but I never managed to pull off 8 perfect ones in a row. Retaining top stock is usually enough, though. Nice visualization.

4 Likes

It is probably easier to manage with a Faro shuffle.

1 Like

Well, yes, technically it is, but a Faro shuffle just looks suspicious, like it’s obvious you’re manipulating the cards. I’m still pretty good at perfect Faro shuffles, but I rarely use them.

Then I do it for the 2nd card,

You have to roll a 51-sided dice for the 2nd card if you really want a random shuffle. (And a 50-sided dice for the 3rd &c).

Sincerely,

Your Nerd Friend.

10 Likes

What, you don’t have a factorial dice?

2 Likes

Maybe when you shuffle. When I do it, it’s a game of 52-pickup.

3 Likes

Gone home waiting for you to shuffle the deck. :wink:

1 Like

u6fC2ZR

8 Likes

It’s like the butterfly operation that is used to calculate an FFT (fast Fourier transform).

1 Like

There are more ways to arrange a deck of cards than there are atoms in the Milkyway galaxy; 2-4 times more actually.

Cooley-Tukey?

when I shuffle cards it’s more like the same 3 cards get swapped around a few times. (overhand shuffler)

Yes, that would be more efficient for the computer, but onerous IRL.
We can agree that I dumbed it down a hair for the sake of the hilarious comedy gold.

We can agree that you dumbed it down a hair for the sake of hilarious comedy gold. Good job.

But what are nerdy friends for if not to point out that the procedure you suggested isn’t a perfect shuffle. With your procedure, the 2nd card of the pre-shuffled deck ends up on top of the deck 80% more often than the last card ends up on top of the deck! The correct procedure is far more hilarious.

Would anyone like to suggest an actually effective method for shuffling a deck of cards with D&D dice, if you forgot to bring your D51? Bonus points if you can do it using only a D20.

::stuck_out_tongue:

p.s. verified with a quick C# program. To be honest, I expected the shuffle to be subtly bad. I was surprised to find out how bad it really was.

1 Like

This topic was automatically closed after 5 days. New replies are no longer allowed.