Live data from Hacker News

Seven Perfect Shuffles Randomize a Deck of Cards. But How Many Sloppy Ones?

quantamagazine.org

41–50 of 65 posts

Re: Seven Perfect Shuffles Randomize a Deck of Cards. But How Many Sloppy Ones?

#41
post #32

Earlier quoted context omitted.

It requires eight perfect riffle shuffles, not seven. (I just checked at the Python REPL.) And actually it depends on whether the riffles are done "in" or "out" (i.e. which half of the deck the new top card comes from). I had understood that seven "typical" riffle shuffles produce good randomness.

Yeah, my father could do that consistently, and used it to teach me "Always cut cards" having also memorized the card order for each shuffle --- I guess being on a troop ship for weeks on end had to have some sort of up-side. Nick Scarne is an interesting name to look up, and his writings are almost on a level with his facility to manipulate cards.

I love the fact that he intended to become a card shark but his mom steered him towards magic instead, and then he got hired by the US Army to teach enlistees about the various scams they might encounter overseas, in addition to serving as the "hands" for Paul Newman in the movie The Sting, which was about conning a mob boss? Damn, "interesting" is apt!

https://en.wikipedia.org/wiki/John_Scarne

Whenever someone acquires a morally-neutral skill (like "card manipulation" or "martial arts") that can be used for "good" or "evil" and chooses the former, that's almost always a good story... especially if they flirted with the latter...

Re: Seven Perfect Shuffles Randomize a Deck of Cards. But How Many Sloppy Ones?

#42
post #19

Earlier quoted context omitted.

Games that sort the cards are the worst / most interesting for this. Gin rummy, etc, where the end result of a game is sorted groups of same-numbers and runs. You can really tell when then shuffling has just transposed a few cards.

Magic the gathering has this problem. You have 2 types of cards, and drawing an imbalanced mixture is pretty detrimental. During play you tend to sort them into 2 piles though. Consequently it's a not uncommon sight to see people manually interweaving their cards after a match, then shuffling. Logically, this is either pointless or cheating depending on the quality of that shuffle, but people do it anyways haha.

There's quite the history of straight out cheating in high level MtG, and yes, insufficient randomization is one of the most typical ways around it. If all you do is cut their deck, and do zero shuffles, you will find a perfect interweaving of lands and spells either way.

Also see Magic players being fond of pile shuffles, which, of course, do very little randomization, and guarantee a good mana weave. Without a few shuffles of your own, most Magic decks ever presented are not sufficiently randomized, and it's even worse in Commander, where we are talking 100 card decks.

Re: Seven Perfect Shuffles Randomize a Deck of Cards. But How Many Sloppy Ones?

#43
Unrelated but the animated photo of the magician performing a shuffle really shows how advanced, efficient, and deliberate our limbs are.

I randomly came across a 1979 bbc documentary on "Word Processors" on YouTube yesterday. Even though I wrangle terabytes of data using AI agents everyday now, it still felt like magic to imagine myself seeing the documentary for the first time in 1979.

Re: Seven Perfect Shuffles Randomize a Deck of Cards. But How Many Sloppy Ones?

#44

Earlier quoted context omitted.

There are actually "marked" decks you can buy that come with an iphone app that tell you exactly where every card on the deck is by looking at the side.

Marked decks are an ancient tradition for both cheaters and magicians. There are also ways to mark a deck that aren't obvious to most people with a casual inspection and that don't need an app to read from the edge.

Yeah, but there aren't ones that will give you the _entire stack_ in less than a second from a glance at the side of the deck.

Re: Seven Perfect Shuffles Randomize a Deck of Cards. But How Many Sloppy Ones?

#45
post #6

Upper limit of 14. I’m curious then - when playing cards with friends we start with a semi -random, but definitely clumped, deck. It gets shuffled a couple times. How random is that deck? How many “cold spots” does it have? Just how not random of decks are people playing with, and ultimately does that even matter if players lack the knowledge or skill to change their play because of that knowledge?

There's this numberphile video where Persi Diaconis tells a story about bridge and how the players got used to not totally random shuffled decks: https://youtu.be/RIGJH12vVCY?si=cMSx6YEr8MMFgYg6 (Starts at around 3:30).

Re: Seven Perfect Shuffles Randomize a Deck of Cards. But How Many Sloppy Ones?

#47
post #3

Shouldn't a perfect shuffle just reorder the cards without adding entropy? You would need sloppy ones to introduce randomness.

Yeah, a "perfect" shuffle is known as a faro shuffle and it's the basis of a lot of magic tricks, but it's a weird looking shuffle and it sort of ruins the tricks once you can recognize it.

not a lot of magic tricks. quite few actually. and it's interesting that it ruins the trick for you, because it's still a quite hard maneuver.

as a magician, I'm always still impressed when I see perfect faros.

Re: Seven Perfect Shuffles Randomize a Deck of Cards. But How Many Sloppy Ones?

#48
post #19

Earlier quoted context omitted.

Games that sort the cards are the worst / most interesting for this. Gin rummy, etc, where the end result of a game is sorted groups of same-numbers and runs. You can really tell when then shuffling has just transposed a few cards.

I am in a tarot group where we have a lot of decks that people share. Many tarot users believe that a deck develops a personality specific to the user and because of that I got my own deck which I take to the group. There's the general belief that all magical tools develop significance for the user over time, something that my wife who is a "secular green witch" who doesn't believe in psi at all would tell you all ab…

One of the things is, I do magic, and used to do tarot.

I found the tarot readings were infinitely better to the person getting the reading when I just forced the results. So I did.

I still did all the things you're indicating about talking about specific personality, etc, as the patter to the concept.

Re: Seven Perfect Shuffles Randomize a Deck of Cards. But How Many Sloppy Ones?

#49
post #19

Earlier quoted context omitted.

Games that sort the cards are the worst / most interesting for this. Gin rummy, etc, where the end result of a game is sorted groups of same-numbers and runs. You can really tell when then shuffling has just transposed a few cards.

Magic the gathering has this problem. You have 2 types of cards, and drawing an imbalanced mixture is pretty detrimental. During play you tend to sort them into 2 piles though. Consequently it's a not uncommon sight to see people manually interweaving their cards after a match, then shuffling. Logically, this is either pointless or cheating depending on the quality of that shuffle, but people do it anyways haha.

The interesting thing is, the cheating in mtg has always been so, ridiculously bad.

If anyone actually cared, and really learned the moves, it would be imperceptible, even on camera, but instead regularly players get caught doing the dumbest of obvious things, even while on camera.

Re: Seven Perfect Shuffles Randomize a Deck of Cards. But How Many Sloppy Ones?

#50
I thought about this for a very long time. For any given deck of cards, there is a coefficient of the average magnitude of displacement from their current order after a shuffle. This can be positive or negative, but we take the absolute value. Then, divide the total number of cards in a deck by this number to get the number of times you need to shuffle. A total of 7 shuffles implies an average displacement of about 7 cards. I think it's reasonable if you alternate the cuts in between shuffles.

Sloppy shuffles have a much lower average displacement and thus need more shuffles to get to a random state.

Post reply on HN