Join 3,501 readers in helping fund MetaFilter (Hide)


How many ways can you shuffle?
September 15, 2010 12:00 PM   Subscribe

How many ways can you shuffle? Here are some to get you started (along with how to manipulate them): the Overhand Shuffle, the Riffle Shuffle, the Hindu Shuffle, the Faro Shuffle, the Pile Shuffle, and the Mongean Shuffle. If you can't master one of those, I suggest the Wash Shuffle, a shuffling machine, or the ever-popular 52-Card Pickup.

More shuffling.

Bonus shuffles:


-shuffle.swf
-The Melbourne Shuffle
-The Truffle Shuffle
-Fred and Ginger shuffle
posted by phunniemee (45 comments total) 27 users marked this as a favorite

 
In theory, I can shuffle in 52! ways. Why, yes, I am a mathematician.

(In reality, I can shuffle in almost no ways, because I have very little dexterity. Although if someone told me that Persi Diaconis could shuffle cards into an arbitrary order, I'd almost believe it.)
posted by madcaptenor at 12:02 PM on September 15, 2010


How about the Truffle Shuffle?
posted by jivadravya at 12:11 PM on September 15, 2010


The wash shuffle is an excellent way to get beaten to death.
posted by Iridic at 12:12 PM on September 15, 2010 [1 favorite]


D'oh, missed in in the FPP. Damn my eyes.
posted by jivadravya at 12:12 PM on September 15, 2010


Don't forget The Super Bowl Shuffle!
posted by Fuzzy Monster at 12:13 PM on September 15, 2010


I love shuffling cards. The riffle shuffle is so nice and lends itself well to so many underhanded tricks...

Persi Diaconis could shuffle cards every which way. He wasn't just a mathematician, he was a skilled card handler as well. There's precious little footage to be found though, which is sad.

And as far as shuffling cards is concerned, the truffle shuffle was invented by Derek DelGaudio and is a thing of beauty.
posted by splice at 12:17 PM on September 15, 2010 [1 favorite]


Do the Harlem Shuffle.

I always got (mild and cheap, mind you) points doing the one handled shuffle.
posted by Burhanistan at 12:21 PM on September 15, 2010


Five knuckle.
posted by i_cola at 12:22 PM on September 15, 2010


Re: The Super Bowl Shuffle. "The song was nominated for a Grammy in 1985." That's all you need to know about the Grammys and the state of pop music in the 1980s.

More on topic: here's a video of a Lego robot shuffling cards
posted by Fuzzy Monster at 12:23 PM on September 15, 2010


And of course, for some serious chops, spend a few years perfecting a tabled faro. Sure to make you break down and cry.
posted by splice at 12:25 PM on September 15, 2010


I always end up shuffling too many times because I am a terrible shuffler. I suppose it is something I should work at a bit. It's a shame I cannot do this in real life:
import random

# Build ordered deck
deck = []
for rank in ['Ace', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'Jack', 'Queen', 'King']:
	for suit in ['Hearts', 'Diamonds', 'Clubs', 'Spades']:
		deck.append(rank + ' of ' + suit)
deck.append('Black Joker')
deck.append('Red Joker')

# Shuffle deck (LIKE MAGIC BABY)
random.shuffle(deck)

# Lay out cards
for card in deck:
	print card

posted by adipocere at 12:26 PM on September 15, 2010


Although if someone told me that Persi Diaconis could shuffle cards into an arbitrary order, I'd almost believe it.)

There's an old card trick by Martin Gardner that does this somewhat. I forget the exact details, but I used to be able to do this trick and it astonished everyone. IIRC, it starts out with you sorting the cards into red and black piles. Then you riffle shuffle them, supposedly randomizing them. Then you deal them out in pairs. Every pair will be red and black.
Damn I wish I remember where I read this, out of the gazillions of books by Martin Gardner. Maybe someone recognizes the trick and can direct me to it.

BTW, I noticed that video of the Wash Shuffle is misleading. He "shuffles" but the cards on the bottom of the pile don't really get mixed. Then he deals like the top ten cards to show they're random. I want to see the cards on the bottom of the deck.

I knew a few different shuffles since I read Tarot and I find a lot of people can't Riffle shuffle the cards. There is also another problem, you have to randomize all the cards' orientation, so many of the cards are reversed from their previous position. There is a simple way to do this with the Riffle, you just make sure that one half-deck is rotated before they're riffled together. There is another method for the less-dexterous. You cut the deck, rotate one half and put it back in the deck. Then you do the Overhand shuffle. Then you cut and rotate again, repeat shuffle. It is pretty good at randomizing card orientations, but not as good as a Riffle. Then, there are some decks that are never read by orientation. I once did my random rotation shuffle to someone's card deck, she freaked and insisted that she'd never allowed them to be disoriented like that. Then she sat down and dealt every card out and turned each one back upright. Ha.
posted by charlie don't surf at 12:40 PM on September 15, 2010


I don't know how casinos get away with using those shuffling machines. Especially since the Faro dealing boxes that early casinos featured were all rigged. The rules for just about every card game state that, "the cards may not be obscured from view." The same people who make shuffling machines make almost identical machines for use in the back office, that put the cards back in order. Professional gamblers? Cheating? Why I never!
posted by StickyCarpet at 12:41 PM on September 15, 2010


I doubt that the shuffling machines are used to control the outcome of the game, but along with their mysterious internal flash cards, and the ubiquitous "player's card" that IDs the player, the casino could retrospectively judge the abilities of a player, and use that to offer tailored incentives that are to their advantage.
posted by StickyCarpet at 12:47 PM on September 15, 2010


Fancy shuffling, put these guys need to work on their patter.
posted by ecurtz at 12:52 PM on September 15, 2010


Fat fingers. Can't shuffle.

I hope you leave comments like that through all your code, adipocere. Especially because I had to read it five times before I realized you weren't comparing your shuffling algorithm to a magic baby.
posted by doublehappy at 12:52 PM on September 15, 2010


No Octopede Shuffle? No Urkel Shuffle?
posted by mkb at 12:53 PM on September 15, 2010


charlie don't surf, I've come across a few routines similar to that. One that I quite like is Martin Nash's version of "Call to the Colors" (originally by Bill Simon). It's a skillfull demonstration of taking a shuffled deck and dealing alternating colors, then pairs (red-red, black-black), triplets and even quadruplets, and on request as well. It ends with the performer completely separating the deck into reds and blacks. Very impressive.

Unfortunately, I am not familiar with a similar offering from Martin Gardner. But I do know where you could ask and get an answer, if you're really interested...
posted by splice at 12:55 PM on September 15, 2010


Man, all I've been doing lately is the Cupid Shuffle
posted by djrock3k at 12:59 PM on September 15, 2010


If you stack a deck and riffle it enough times, it will revert to its original, non-randomized state.
posted by Dark Messiah at 1:08 PM on September 15, 2010


Why, yes, I am a mathematician.
We know you're a mathematician not because you used the correct counting technique to answer the question, but because you included the "trivial shuffle" in your count.
posted by Wolfdog at 1:10 PM on September 15, 2010


The wash shuffle is an excellent way to get beaten to death.

Actually, I think a well-done wash shuffle is a great way to randomize a deck.

If you stack a deck and riffle it enough times, it will revert to its original, non-randomized state.

If you can do a "perfect" riffle shuffle, then each shuffle is perfectly determined. I think the number of times it will take to get the original deck, if you always start with the same half on the bottom, is 7. I saw Persi Diaconis do this in a demonstration once, although he doesn't technically riffle shuffle.
posted by muddgirl at 1:14 PM on September 15, 2010


for rank in ['Ace', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'Jack', 'Queen', 'King']:

adipocere: you might want to check your deck-building code again.
posted by jedicus at 1:17 PM on September 15, 2010 [1 favorite]


Here's a little puzzle: what is the significance of the number 180,180 in this context?
posted by Wolfdog at 1:17 PM on September 15, 2010


Oh, and the YouTube video doesn't mention it - or anything, really - but one reason the Mongean shuffle is of interest is that it, together with a top-to-bottom reversal of the deck, generates the Mathieu Group M12, one of the sporadic simple groups (and one of the first ones discovered, albeit not originally via card shuffling.)
posted by Wolfdog at 1:25 PM on September 15, 2010


Whoops, 7 is the number of riffle shuffles it takes to randomize a deck.
posted by muddgirl at 1:25 PM on September 15, 2010


Ah, you're right. Never code while running a fever. You'll get results, but they won't make a lot of sense.
posted by adipocere at 1:29 PM on September 15, 2010


Yeah, but the look you get when you announce that you're holding a "full house, aces over 1's" will be totally worth it.
posted by Wolfdog at 1:30 PM on September 15, 2010 [1 favorite]


I've seen dealers during televised poker doing a wash shuffle and no one beats them. It's not the only shuffle done, they give it a few riffles after of course.

I remember reading that to truly randomize a deck (where any given card is equally likely to be in any position) it takes a full 7 riffle shuffles... which takes a while. So unless you have a machine or are leapfrogging decks (so you can shuffle one as a hand is being played), doing the wash is going to be the fastest way to keep the game going.


Seeing the overhand shuffle and how easily you can fix the top of the deck really makes me want to insist on cutting someone's deck the next time I play Magic with a stranger :)

To those of you who have trouble doing the riffle or what not... try it with a nice plastic deck, it's far easier.
posted by utsutsu at 2:28 PM on September 15, 2010


I remember reading that to truly randomize a deck (where any given card is equally likely to be in any position) it takes a full 7 riffle shuffles... which takes a while. So unless you have a machine or are leapfrogging decks (so you can shuffle one as a hand is being played), doing the wash is going to be the fastest way to keep the game going.

1. As I read it, it takes 7 shuffles to make the deck sufficiently random, depending on your definition of sufficient. After 7 shuffles, the deck's increase in randomness after each shuffle drops dramatically, so more than 7 shuffles are diminishing returns.

2. You'd still need to do 7 wash shuffles.
posted by charlie don't surf at 4:14 PM on September 15, 2010


Persi Diaconis was the one who came up with the 7 shuffle rule, and there was a MacArthur "genius" grant for his efforts. He admitted that some people think six is good enough, and that it might be. His metric for proper shuffling is, "breaking the Markov chain."
posted by StickyCarpet at 4:44 PM on September 15, 2010


To the person who said something about "Persi was": i'm pretty sure he's still alive.
posted by madcaptenor at 6:01 PM on September 15, 2010


If i recall correctly, eight perfect riffle shuffles will get a deck back to its original state. It's a coincidence that this is seven plus one. The shuffles in the usual models of shuffling are assumed to not be "perfect" - if they were there would be no randomness! Also, the "eight" there comes from some weird-looking number theoretical function applied to 52 -you'd get much different results with a 51 or 53 card deck - but the "seven" changes smoothly, iirc, as a function of the number of cards.
posted by madcaptenor at 6:17 PM on September 15, 2010


Curly Shuffle.
posted by SPrintF at 8:35 PM on September 15, 2010


When counting "sufficient numbers of shuffles," it's actually necessary for the shuffles to be imperfect. If you have a known sequence, then a perfect shuffle just changes it to a different, but known, sequence. Only with the addition of "error" can the sequence become unknown.
posted by explosion at 8:37 PM on September 15, 2010


Hey, charlie don't surf, I owe you an email!

The trick is Paul Diamond's Out Of This World and is a staple of magicians for over 50 years...

mudgirl: If you do a perfect Faro shuffle eight times, you get back to the original order!

I don't have the reference handy, but in a Martin Garden book (I think) he revealed a way to make a card go to any location you like in the deck from the top with 6 Faro shuffles - by computing the desired location as a binary value and then doing "In shuffles" where the top card goes under if the binary digit is one, and "Out shuffles" where the top card stays on top when the digit is 0...

So if you wanted to get your card to position 23, that's 101111 in binary, so you'd go IOIIII shuffles. Fun fun!

I have a deck of cards around at all times to practice my shuffles and palming... :-D
posted by lupus_yonderboy at 9:49 PM on September 15, 2010


Oh, and the overhand shuffle is so easy to fake and I've practiced it so often that I sometimes find myself doing the fake shuffle in a real card game - for nothing, as I have no idea of what the cards are... no one has ever caught me but myself though.

Fun fact - a standard deck of Bicycle poker playing cards in the cellophane weighs almost exactly 100 grams.
posted by lupus_yonderboy at 10:01 PM on September 15, 2010


Ricky Jay shuffles.
posted by erniepan at 11:13 PM on September 15, 2010


The trick is Paul Diamond's Out Of This World and is a staple of magicians for over 50 years...

Sorry lupus, I think that's a different trick. It is hard to tell, that description is rather hard to follow. But I don't see any of the distinctive features I remember from this trick.

The trick starts with the deck sorted into red and black half-decks. Then there is a sequence riffle shuffles and cuts that I've forgotten. The shuffles don't have any special properties, you can let the viewer do them, and they can do them sloppily too. Then each pair you pull off the top of the shuffled deck is red and black. But they alternate randomly between red/black and black/red. Part of the trick is that you slap down both of the cards, *then* say "red, black," pointing to them to misdirect the viewer away from them being inconsistently ordered as red/black black/red. That makes it look even more miraculous.

But now that Faro shuffle trick, that sounds familiar. It might be in the same Martin Gardner book as the trick I'm looking for.
posted by charlie don't surf at 2:04 AM on September 16, 2010


Charlie don't surf: oh, it's definitely the same trick - just a different presentation. The classic one (in the article) works better than yours because the audience member is appearing to do the sorting and you don't reveal the cards till later...

Try it with a deck of cards and you'll realize that it's the same idea - even though the window dressing is different.
posted by lupus_yonderboy at 10:14 AM on September 16, 2010


I remember reading that to truly randomize a deck (where any given card is equally likely to be in any position) it takes a full 7 riffle shuffles... which takes a while. So unless you have a machine or are leapfrogging decks (so you can shuffle one as a hand is being played), doing the wash is going to be the fastest way to keep the game going.

See, the thing is, this sufficient randomness is only calculated based on riffle shuffles only. Throw in a strip in there, a box, and the problem is now completely different.

And to the person who said you'd still required 7 washes for sufficient randomness, that is in no way supported by any evidence I've ever seen.

lupus, from the description charlie provides, I'm 110$ positive that it's not out of this world. One dead giveaway is the pairs of alternating colours, each pair being either red-black or black-red. This is a very straightforward indication of the use of the Gilbreath principle, which is not used in any OOTW routine that I know of.

charlie, I'm sending you a link through MeMail. Let me know if it's what you recalled.
posted by splice at 10:54 AM on September 16, 2010


And obviously that was "110% positive"...
posted by splice at 10:55 AM on September 16, 2010


You guys are probably right, you know more about card tricks than I do. I've probably misremembered it, but I don't recall this starting out with a presorted interleaved deck. I recall it starting with two halves of the deck sorted into all black and all red. But I've probably misremembered it. Judging from the math, it seems like there isn't any other way to get the result without a presorted interleaved deck.

And that was my conjecture that you need 7 washes to achieve the level of randomness achieved with 7 riffles. I have discovered a truly marvelous proof of this conjecture. But this margin is too narrow to contain it.

(j/k)
posted by charlie don't surf at 1:16 PM on September 16, 2010


Well, perhaps I'm wrong!

The way I always did OOTW was to start with the deck divided into red and black (perhaps even a fresh deck) and then give it one good riffle shuffle, so perhaps I'm conflating two things...
posted by lupus_yonderboy at 2:56 PM on September 16, 2010


The way I always did OOTW was to start with the deck divided into red and black (perhaps even a fresh deck) and then give it one good riffle shuffle, so perhaps I'm conflating two things...

I tried that and got nothing close to red/black pairs. Maybe I'm remembering the split decks because that's the fastest way to start interleaving a deck. I did the regular trick you described with the interleaved deck, it gives the desired result.

If you figure out how to shuffle a red and a black deck to make pairs, let me know.
posted by charlie don't surf at 4:35 PM on September 16, 2010


« Older She’s an Iron Chef. The Executive Chef of Bon App...  |  Eileen Nearne was found dead i... Newer »


This thread has been archived and is closed to new comments