Deck The Cards

I'm in a maths mood today (Note the proper British spelling) and I can't remember if I wrote much about the maths of playing cards. Did you know that the odds are slim to none that any deck of cards ever since the conception of the modern design has ever been in the same order after a deck's first shuffle. That's because there are more than 8 * 10^67. That is, for lack of any appreciable comparison, an astronomical number of permutations.

Well, you want to know how many ways a deck of cards can be arranged? Let's start with three cards to make this easy. Say we have Ace, 2, and 3 (suits are unimportant, but if you think they matter, then they're all diamonds). How many different ways can Ace, 2, and 3 be arranged.

A 2 3, A 3 2, 2 A 3, 2 3 A, 3 A 2, 3 2 A

It looks like there are six ways to arrange them. Great, now do the same thing for all 52 cards. List out every possible permutation and you'll find you answers. There you have it.

What? Listing 8 * 10^67 permutations of 52 cards would take a little bit too much time? OK, fine, maybe we can find a mathematical formula that will work for any number of cards.

How do we arrive at that massive number? Rather simply, the formula is 52!. No, you don't scream 52 really loudly. It's 52 Factorial. But what does that mean?

Let's go back to the three card example. You have three cards in you hand and three spots to place them. How many possible cards can go into the first spot? Three.

__ __ __
3 __ __

There are two spots left. How many possible cards of the remaining can go into that spot?

3 2 __

There, now naturally, there is one spot left and only one card left. Guess what? You have only one choice for the final spot.

3 2 1

Now, just multiply those numbers together and you get 3 x 2 x 1 = 6. The same can be done with all 52 cards. 52 x 51 x 50 x 49 x 48... x 2 x 1 = 8.06 * 10^67. That's a lot of arrangements for one deck of cards.