randomization in shuffling | 2016-06-01

randomization in shuffling | 2016-06-01
i’ve recently been noting to people some randomization theories related to card shuffling. my position is that the smoosh shuffle randomizes cards on the first try, the riffle shuffle randomizes in 7-10 shuffles, and the overhand shuffle randomizes in 20,000 shuffles.

i’m wrong

here is what is closer to truth:

smoosh = randomizes well if done for 1 minute, decently at 30 seconds, and poorly at less than 30 seconds
riffle = randomizes at 7 shuffles, mathematically; 5 is not sufficient; more than 7 is unnecessary
overhand = randomizes in 2500 – 10,000 shuffles, depending on the mathematician stating the theory

so, here’s how that works.

smoosh | 1 min

this method is the one where you put the whole deck on the table and push them around in a pile over and over again. since you don’t spread each card out completely, some of the remain on top of ones they were already on top of, so if you put them down and then piled them immediately back up, they would likely be in a very similar order. however, if you continue to smoosh, the cards eventually change their position enough to successfully create randomization. many casino dealers use this method.

overhand | 2500-10,000

this is the method where you grab a small stack from the top of the deck and place it at the bottom and then continue that process for a while. since you are grabbing the stacks, each card in each stack remains in its current order and only the cards on the outsides of the stacks change order. since there is no precision in how large the stacks are, it is equally possible, at all times, to grab the same stacks over and over again, thus, looping the shuffle and eventually coming back to your original deck order. many casual players shuffle this way.

riffle | 7 times

this is the method where you split the deck roughly in half and then snap the cards together, alternating cards from the two halves. in this method, since you are alternating the cards each time, you can mathematically predict the level of randomness quite accurately. one of the key pieces here is that, while alternating between halves, sometimes more than one card drops from a single half at one time, thus not perfectly toggling from one half to the other. if you did perfectly split the deck in half (26 cards per half) and then perfectly alternated between the halves, you would actually return to the exact same deck order in 8 shuffles! this is a magic used by some card sharks to cheat.

to get into the math of how this randomization works is quite a bit beyond me, so i’ll link a video below from the stanford math professor (persi diaconis… amazing name) who is responsible for the studies that led to this card randomization theory. but i’ll give it a go…

if open a new deck of cards from the factory, the deck will likely be ordered A-K, spades, hearts, clubs, diamonds. so, if you flip the deck into a standard, face-down, shuffling position, the ace of spaces (AS) becomes the bottom card. if you pull a single card out and place it into the deck somewhere else, you have 52 different spots you could put it back into the deck. 51 of those spots are above the AS; one of them is below it. so, you have a 1/52 chance of placing that single card under the AS. if you do, you have started down the path of randomization since the AS was one of the outer limits of the non-randomized set. now, if you pull another card out and place it back in the deck, you have two chances to get it under the AS: one directly under the AS and the other under the first card that made it under the AS. so, pulling that second card, you get a 2/52 chance and each of those two positions is equally likely (read: random). carrying on, you get a 3/52 chance and then a 4/52 chance and so on until you reach a point where the AS is now the top card (since it never goes down, it only stays in its spot or moves up). each of the 51 cards underneath the AS has an equal chance of being in any of the possible positions and, thus, you can take that AS, put it in the deck, and you now have a randomized deck. this near perfect randomization happens in about 200 pokes of a single card back into a deck (in mathematical theory).

simple summary: smoosh is great if you have a minute, riffle is fully sufficient at 7 shuffles, and overhand is folly.

check out persi diaconis explain it as only a fantastic mathematician could:

The Best (And Worst) Ways to Shuffle Cards – Numberphile

also, more on the theory here:

Randomization Time for the Overhand Shuffle
The Annals of Applied Probability
Random Paper
Rising Sequences
Perfect Shuffles
Seven Shuffles

and a chance to improve your shuffling:

Increase Your Shuffling Chops

so far on randomization in shuffling