# The Best (and Worst) Ways to Shuffle Cards – Numberphile

Question is How many times do you have to shuffle the cards – a deck of cards – to mix it up I mean by shuffling probably what you mean by shuffling Cut ’em about in half; you go like that; you push ’em together Right and how many times do you have to do that til the cards get all mixed up and uhh.. There’s a practical answer The answer’s about 7 And uh.. And it’s not “I think it” or “it feels that way” It’s a theorem In contrast There’s another way that people shuffle cards Uh.. They shuffle cards this way You’ve seen people shuffle cards that way (Brady: That’s how I shuffle cards) Ok well uh.. And in India, they do it this way It’s the same – you can see it’s the same Little – dropping little clumps one after another And so lots of – some – people shuffle that way And the answer to “how many of those shuffles does it take to mix up cards?” is about 10,000 So It makes a difference Uh.. (Brady: yes) It makes a difference There’s a 3rd way of shuffling cards that is used in tournament poker games And is used in Monte Carlo I call that “Smooshing” So that’s This method of shuffling cards You’ve probably seen somebody do that You might have done it yourself And then you gather them up and hope for the best If you smoosh for a minute uhh.. It passes all the tests we’ve ever thrown at it um.. If you smoosh for 30 seconds It’s sort of on the edge But seems ok And less than that uh.. It starts failing tests And somebody could make money against you Or guess cards right Suppose you had a scheme for shuffling cards One of these schemes And you wanted to think about “Is it working? Is it random? Or What am I talking about?” If it was a few cards Suppose you had 4 cards And you had some scheme for shuffling them I don’t know – some specific scheme You could just try it a lot With 4 cards there are only 24 possibilities The top card could be any of 4 cards The next could be any of 3 That’s 4 times 3 is 12 Times 2 is 24 And then this is forced to go So you could just do it 1000 times And see Do all 24 possibilities occur about equally likely But with 52 cards There are about 10^68 arrangements of a deck of 52 cards It’s more than the number of particles in the universe Ok so one way of defining randomness is to say all arrangements should be about equally likely I’ll say a sort of more practical version of it Suppose that you had a scheme for shuffling cards And then we were playing a card game And you had to guess at the cards 1 at a a time as I turned them over So for example Y’know Take a guess – what do you think the top card is (Brady: 6 of spades) Uh.. maybe upside down Not so bad, Brady, not so bad Uh.. y’know 6, 9, could be Ok, but suppose As in a card game or in a casino The cards were turned up 1 at a time And somebody tried to guess what they were Now We know now That the 9 of spades is out of the deck So you’re not gonna guess that again What do you think the next card is (Brady: Jack of diamonds) mm… not so good ok So No, but of course it’s not so good Your chance of being right on the first card is 1/52 If the cards were perfectly mixed Your chance of being right on the next card is 1/51 Then 1/50 if you have a good memory And if you have a really good memory, if the cards were all turned face up you would know what the last card is for sure It’s the matching 9 If the cards were perfectly shuffled um.. you expect to get 1/52 + 1/51 + 1/50 etc. Right and going through the deck 1 at a time And that adds up to about 4 and a half So, if somebody could remember and was guessing but the cards were well mixed you could get about 4 and a half right on average If you don’t riffle shuffle enough if you riffle shuffle 4 or 5 times somebody can get 9 or 10 cards right on average Anybody would say that’s not random Riffle shuffle is this guy You riffle ’em together is the way we say it They sometimes do it on the table this way Y’know Casino dealer will do..will do that That’s riffle This is called overhand and the other one I call smooshing I wanted to say it’s not just experimental that gives us these numbers I gave you 7 shuffles It’s math and I wanted to try to explain a theorem and I think this is one that I can explain without writing anything down Let’s see if I make it I’m gonna take A very simple shuffle Which is take the top card off And put it in at random You might put it back on top You might put it back 2nd from the top You might put it on the bottom It’s intuitively obvious that if you did that alot The cards would get all mixed up I mean it’s a silly way of shuffling But it is like a riffle shuffle where you just happen to have cut off 1 card Y’know I’m riffle shuffling this 1 card into this big deck Putting it in at random The deck starts out in order Yknow ace of spades, 2 of spades, 3 of spades whatever and there’s some card at the bottom I’m gonna suppose it’s the king of hearts so the deck is in order, you know the order of the deck It’s in order (Brady: that’s how it came from the pack) yes, yes or you might have written them down the guys in casinos, y’know, record them as they come off right how it came from the pack And now, you’re taking the top card off the and poking it in at random and just do that a lot ok, uh huh, poke poke poke now eventually because of the rules some card will go underneath that original bottom card the king of hearts there it is on the botom eventually if you wait long enough, a card goes under the bottom card how long does that take? well, the chance of a card going underneath the bottom card is 1/52 Because there are 52 places it can go So the chance of that then happening is 1/52 Therefore it takes about 52 pokes on the average to have that happen ok and now , keep going like an idiot and eventually a 2nd card goes underneath the king of hearts when I put that 2nd card underneath the king of hearts so there are 2 card there even if I told you “hey it’s on poke 503” I just poked the 2nd card underneath the king of hearts it’s equally likely that the 2 cards underneath the king of hearts are in order low-high or high-low because I’m poking the card in at random I could have put it above the card that’s on the bottom or below it I’m poking them in at random now, keep poking, eventually a 3rd card goes underneath the king of hearts there are 2 cards previously this one there are 2 cards this one goes in here, here, or here at random so all 6 orders are equally likely every time you put a card in given, as long as you’re putting it in at random the cards underneath the king of hearts are in a completely random order I hope that’s intuitive and it’s true (Brady: that’s make sense) it makes sense and now look at what happens; keep poking the king of hearts slowly moves up it never goes down it might stay where it is if I put a card above it it stays where it is but if i put a card below, it moves up 1 so eventually the king of hearts comes up to the top by induction, by the argument we’ve been doing all the 51 cards are in random order when i put the king of hearts in at random, the whole deck is random exactly random at that moment every arrangement is equally likely so that is not only intuitive it is an exact mathematical fact i hope it makes sense, i think it makes sense and now, you can just ask “how long does that take?” well, it takes 52 pokes for the 1st card to go under there’s the king of hearts on the bottom then i put a card underneath it so now there are 2 places where the next card can go so it’s it it’s 2/52 So it takes 52/2 pokes and then it takes 52/3 pokes for the 3rd card to go under so it’s 52 +52/2 +52/3 and that answer is well it’s – what is it – it’s 52 times log of 52 which is around 200 or so so it takes about 200 of these pokes if you shuffle fewer times if you shuffle 5 or 6 times it really somebody could really make money against you in a card guessing experiment if you shuffle 10 or 11 times it’s not worth the wear and tear on your shoe leather standing there in the casino if you’re counting cards it’s just as close to random as it could be of course it’s never perfectly random y’know we’d have to shuffle infinitely often to make it there’s still some trace of the original order but it vanishes exponentially fast So wonderful question; let me try to match you with an answer the model that the 7 shuffle is based on i’m gonna say it as a slightly more mathy thing

Youtube suggested me this vid cause of yugioh, I wanted to prevent bricking hard so I clicked. Loved it.

2:45 what a legend

As a coder, I leave cards unshuffled. Instead, I 'chuffle' (my own word)

Pick a number between 1->52 and use it, swap the last card into its place. Then pick a number between 1->51, and again, swap the last card into its place. The swaps keep the cards contiguous, allowing a nice 1->x choice. So… the best, most complete and fastest shuffle – is NOT to shuffle ; ) To start a new game, just join the discards pile with the deck in their existing order and chuffle deal a new game.

So… 'chuffling' … a mixture of the words choose and shuffle ; ) It's a mathematically perfect shuffle in 0 time.

Actually, since it's actually a dealing method more than a shuffling method, feel free to call it 'duffling' ; )))) But if you see anyone doing it at a live game… leave ; )

As a card dealer this makes me cringe

Ohmygod! Subscribed!!!!! Love this brain content

So smooshing is the best. Got it

so as a guy who plays magic the gathering and plays with decks over 1000 bucks who do i not "riffle shuffle" (the first one) and mix up in a proper way for 60 cards or 100 cards as you normally do not go beyond that

There is also the table shuffling method where you make 4+ piles of cards on the table randomly from the top. I do that plus a few overhand shuffles while cycling my deck in dominion

2:10 "its more than the number of particles in the universe"

Nah

Cool, video. Thanks for making it. I found it very enjoyable

Putting aside the argument of computer generated random numbers not necessarily being random, the standard way computers shuffe a deck of cards is an interesting means. Essentially, it takes the deck, and then one at a time, goes through each position, first card, second card, third, etc, and picks a position to swap places with.

So the first card has a 1/52 chance to go right back to the start, but each of the other cards has a 1/52 chance to swap positions with it. And the same goes for all the cards. No slot is off limits, no matter how many times it gets traded, but every position in the deck is guaranteed at least one 51/52 chance to go somewhere else in the deck.

Anyone know if there's been a study of cradle shuffling?

"That's a silly way to shuffle"

Him describing placing the top card in the deck at random.

That is really close to how I shuffle. I switch to do it with the cards on the bottom after a minute though.

Doesn't that give the same result as just taking a card from the remaining unshuffled pile and putting it at a random position to the shuffled pile? It's the same method but skipping all steps where cards would be put ahead of the king of hearts. This results in 52 steps which is a log factor less.

If I'm bored or having a conversation and we're not looking to go again quickly I'll typically start making piles, grabbing cards from the top of the deck and decide "randomly" if I want to put them in an existing pile (at "random") or if I want to make a new pile. Typically by the end I have anywhere from 5-10 piles of cards with varying numbers of cards. I then "randomly" decide what order to grab the stacks in, after which I might do a few clump shuffles, and then repeat the first step.

Is this guy from the 1700s?

I thought I invented the smoosh

1/52 I GUESSED THE TOP CARD, I swear that's probably a one time thing

George Washington"More than the number of particles in the universe." —- No.

There are more possible combinations in a deck of cards than there are atoms in all of earth. When you shuffle a deck that combination has probably never existed before and will probably never happen again.

2:07 whoa….deep.

YO I was just shuffling around a deck while watching this and when he said 6 of spades I flipped the top one and it was the 6 of spades

editThe next one was the Jack of diamonds what is this???Poker dealers at casinos only do 3 riffle shuffles, a "box" shuffle (where you basically just cut about a quarter off the deck, place it down, and repeat 4 times total until the deck is full placed on the table), and then cut the cards roughly in half. This means that the poker cards dealt are very non-random.

What about pile shuffling? Mtg players want to know.

But what about pile shuffling?!

0:06 "what you mean by shuffling" — are we all croupiers here? Can we all riffle shuffle as he does there, with the cards in the air? or at all? Seven times, without any cards ever falling out? Best of luck with that one — we're not all as expert as you.

So I play Magic the Gathering, a card game in wich you usually have your own deck with 60 cards, how many times do I have to shuffle to make it random?

Also, some people I know shuffle the decks by taking it and making 5 piles of 12 cards each and then just picking them up in a random order, is that mathematically efficient?

wtf he's lying. 2:10 the number of particles in the universe is around 10^86

I always shuffle cut the deck and then shuffle again

I love how this video answers the question and shows all the methods in the first minute and thirty seconds. THANK YOU!

Perfect riffle shuffling will take infinitely long to be random, because perfect riffle shuffling fails to randomize.

I like to mix the truffle with the overhand shuffle

Was playing a game of cards with some friends, asked if they could riffle but insisted on doing overhand shuffles… I could link this to them but that'd be rude, instead I can go to bed at night knowing that I wasn't wrong :]

You wanna wash and take clumps from the bottom and drop on top

this fucker is not teaching us to shuffle save ur time

7 riffle shuffles is incredibly insecure from a player's perspective. The dealer could easily force the top several cards to stay on top by riffling below the top several cards on each riffle, while keeping it looking natural. And, I'm sure a big reason why it takes 7 shuffles is because it's so hard to bring the cards at the top to the bottom when riffling. The cards at the top stay on top and the cards at the bottom stay at the bottom. I would love to see a randomness analysis of the standard riffle riffle box riffle cut that casinos use.

It's not "smushing" bro, it's known as washing the deck. Washing the deck then 3 riffle shuffles is standard at a Poker table.

More than the number of particles in the universe. I can't see that statement ever holding true.

The numbers when it comes to cards has fascinated me for some time now. Like the fact that if you smoosh the cards properly you will likely have put them in an order that they have never been put in before in the history of cards. That is just mindblowing to me.

Card counters keep count of low and high cards and use this as a prediction of next cards. It doesn't matter how many times it's shuffled. The only problems are cutting card and continuous shuffle machines. But much more easier way is just sitting at full table and predict next cards by analysing the visible cards.

As a casino dealer I mainly do a poker riffle. It goes like this:

1. Take the unsorted deck. Cut the top third and move it to the bottom. Riffle and combine.

2. Cut the middle third and move it to the bottom, riffle and combine.

3. Cut the bottom third and move it to the top, riffle and combine.

4. Cut the top third and move it to the bottom. Riffle and combine.

5. Cut the middle third and move it to the bottom. Riffle and combine.

As you can see, this is only 5 riffles. However, assuming you do a normal riffle without cutting, if you do it card for card with 26 cards in each riffle stack you are putting Ah next to As and so on.

I wonder what effect the cutting would have on the riffle. I assume quite a considerable difference as the each cut and riffle moves the "to be riffled" cards to a different part of the deck.

In short, initial riffle makes a much bigger difference, a few cards cut differently on each third makes an enormous difference.

Thoughts?

Why does this man always have his eyes closed

Why’d i guess the exact same card as the guy in the vid for the top card 😳😳

Wow Bertrand Russel is alive and living with us

52 log of 52 is definitely not 200. Log of 52 would have to be around 4 if that's true. And log of 10,000 is 4 so….what?

More than the number of particles in the universe? Somehow, I doubt that.

10^3rd Comment 😎

Am I the only one that didn't get how 200 pokes turns into about 7 shuffles? I also saw 3/2 log_2(52) = 8.55 shuffles but that wasn't talked about either…

Ruffle shuffle is the worst for bending you cards.

Is the column direct shuffle better than a riffle? Making, let's say, 5 piles by dealing all the cards then dealing each pile across the remaining piles until you have 2 then combine or riffle.

52 Card = More configurations than particles in the universe???

I highly doubt that.

Wait, for the very last example, if you are intentionally putting one card at a time under the original bottom card in a random order, like was shown in the video, wouldn't that mean you have a perfectly random shuffle after only 52 times

What about "pile shuffling"?

Why can't I hit the ball icon? It says error.

i work in a casino and on our card tables we do 1 chemmy to begin, then 3 riffle, one overhand, two riffles. Its different on blackjack where in it takes longer as theres 6 decks as opposed to just one

How does pile shuffling compare? Yugioh and MTG players are curious

52 over 2 and 52 over 3 is transcribed as 52/2 and 52/3 in the English subtitles, which is I believe an incorrect transcription.

I thought dude was wearing a powdered wig there in the thumbnail

One flaw, I have found with this idea, is that the bottom card and the top card usually isn't moved far away from their original place. You might not be able to know exactly where it goes, but if about half of the cards are given out, and you have in interest knowing whether the previous top card or the previous bottom card is given out, you often can say that the bottom card probably isn't and the top card is.

That's why I combine the effective shuffle and Top-to-bottom. A rough shuffle and a fine shuffle.

What about the way those Magic The Gathering players shuffle. Were they place each card in its own individual pile and then stack them together.

Random shuffle: laydown on table and mix with both handS.

Do 3 riffle shuffles, smoosh for 10 seconds, 3 more riffles.

Why waste? your time

I do the version of the Riffle Shuffle for people who don't have the skill to do it – it accomplishes the same thing, evenly mixing two half-decks together with randomness, but doesn't make a bunch of noise or need training.

Playing board games and dont want to bend my cards …what now?

One weird thing about the riffle shuffle is if you were to "Perfectly" riffle shuffle, as in you split the deck perfectly in half and your riffle perfectly alternates the two sides like a robot, the deck will actually be comepletely back to its starting position after 7 shuffles. This only applies to a 52-card deck, but it's true!

Doesn’t it take 26 times to put the first card under the last? If you have 52 chances, why should it happen on the last attempt. I can’t figure it out

You don't need to remember all of the 51 card that was flipped over to guess the last one correct. Just give the card a value ranging from 1-52 add them as the cards gets fliped and since 1+2+3+…+51+52=1378 you only need to subtract your number from that to get the number of the last card.

You're sort of missing the direct insertion shuffle, which is close to the riffle shuffle, but more likely to get true 1-1 interleaving. This requires suitable cards (sleeved decks are ideal) which are very slippery with regards to one another and have relatively sharper edges than their middles. You just split the deck in half and push them together edgewise. There's far less clumping this way which means you don't wind up with 4-5 of one deck interleaved with 1-3 of the other deck, then 1-2 of deck A, 3 of deck B, and so forth.

Probably still 7, but 6 might be enough.

OK something really amazing just happened. I haven't seen this vid before. When the shuffler at 2:30 said, "OK guess this card.", I said "Six of spades." just before the off camera dude said it! Calculate the odds of that. Mind totally blown.

Once. Random is random. If you impose rules it's no longer random. You're overthinking it.

Not regretting passing on Stanford at this point.

This was fascinating. As someone who enjoys playing M:tG I’ll be shuffling the middle way from now on…

So no more drawing 50 million cards in uno due to bad shuffles when you have nothing to play

AND IF U HAVE 2 DECKS SMOOSHED TOGETHER!

Just Faro shuffle

I guess having a random amount of the original order in would realistically increase the randomness. Because then there is a sequence that you know, that might or might not be there, and if it's there you don't know how much of it is there, and besides that the rest of the cards are still sort of random.

But then it's possible to "mathematically" shuffle cards into a specific order at will.

So what I took from this is, smooshing for 30 seconds is the best and simplest method for card games at home.

I knew that overhand shuffle was BS!! 😄

I just zarrow my deck. And everyone thinks its fair

Can you bring your degree to the pub on poker night so I can hit the overhanders about the head with it, please?

And that is how you stay virgin for 60 years

Can we request a version of this video using Magic: the Gathering cards? I'm pretty sure I know people who need this video.

Ok George Washington

There seems to be a reasonable error between the results of 52/1+52/2….+52/52 and 52log52. What am I missing?

"Keep going, like an idiot"

-induction in a nutshell

about picking the top and putting it randomly under.

1. the last one is not exactly random since the king of hearts cannot be at the top

2. the method is too visually predictable to know where approximately those cards are placed.

——-

honestly, I don't think you can create random easily using only overhand & riffle.

overhand is basically making blocks in reverse order

riffle is, multiplying by 2 (or 2 and plus 1)

those are not completely random (8 perfect riffle created the same order)

it's sad, but something random like wash (which is very tiresome to do…) should be included….

Whats the definition of a suffled deck?

you know this guy is cheap because he calculated the math to someone gaining a 0.7 cent edge on you. jk.

This looks like original footage of waking life before they rotoscope the scene

what about the "deck shuffle" where ou deal out the deck into a bunch(7+) piles than stack those togethe?

the bob ross for cards

As a magic player this roughly the most interesting topic

The problem I have with the typical riffle shuffle is the cards on the bottom. For simplicity, let's just take that King of Hearts from his example. With seven shuffles, it feels very unlikely to me that that King is going to be able to move "too far up" the deck. In fact, it seems there's even a 1/128 (2^7) chance that the King remains on the bottom the whole time. It's always felt to me that in order to be most effective at randomizing, the riffle shuffle would require a 1/4 deck cut (top quarter goes to the bottom), and then cut the deck in half and shuffle. This way, there is a more effective mechanism for those cards on the bottom to reach a random position.

I'm not calling this clearly brilliant man wrong; I'm asking asking what I'm missing!

he didn’t do the faro shuffle smfh

Thanks for this recomended video, Youtube <3 u da best

Doc from "Back to the Future" plays card games?

He looks like old Arthur Fleck

Next game I’m using the poke shuffle

its important to cut after each riffle shuffle or the top card is always on top