# 52 Factorial

## 52 Factorial *by Scott Czepiel*

*Just how many combinations of playing cards are there? Scott Czepiel tells us a story to help us imagine the number!*

## It Starts with a Simple Deck of Playing Cards

They seem harmless enough, 52 thin slices of laminated cardboard with colorful designs printed on their sides. Yet, as another illustration of the mantra that complexity begins from the most simple systems, the number of variations that these 52 cards can produce is virtually endless. The richness of most playing card games owes itself to this fact.

## Permute this!

The number of possible permutations of 52 cards is 52!. I think the exclamation mark was chosen as the symbol for the factorial operator to highlight the fact that this function produces surprisingly large numbers in a very short time. If you have an old school pocket calculator, the kind that maxes out at 99,999,999, an attempt to calculate the factorial of any number greater than 11 results only in the none too helpful value of “Error”. So if 12! will break a typical calculator, how large is 52!?

52! is the number of different ways you can arrange a single deck of cards. You can visualize this by constructing a randomly generated shuffle of the deck. Start with all the cards in one pile. Randomly select one of the 52 cards to be in position 1. Next, randomly select one of the remaining 51 cards for position 2, then one of the remaining 50 for position 3, and so on. Hence, the total number of ways you could arrange the cards is 52 * 51 * 50 * … * 3 * 2 * 1, or 52!. Here’s what that looks like:

80658175170943878571660636856403766975289505440883277824000000000000

This number is beyond astronomically large. I say beyond astronomically large because most numbers that we already consider to be astronomically large are mere infinitesmal fractions of this number. So, just how large is it? Let’s try to wrap our puny human brains around the magnitude of this number with a fun little theoretical exercise. Start a timer that will count down the number of seconds from 52! to 0. We’re going to see how much fun we can have before the timer counts down all the way.

## Shall we play a game?

Start by picking your favorite spot on the equator. You’re going to walk around the world along the equator, but take a very leisurely pace of one step every billion years. The equatorial circumference of the Earth is 40,075,017 meters. Make sure to pack a deck of playing cards, so you can get in a few trillion hands of solitaire between steps. After you complete your round the world trip, remove one drop of water from the Pacific Ocean. Now do the same thing again: walk around the world at one billion years per step, removing one drop of water from the Pacific Ocean each time you circle the globe. The Pacific Ocean contains 707.6 million cubic kilometers of water. Continue until the ocean is empty. When it is, take one sheet of paper and place it flat on the ground. Now, fill the ocean back up and start the entire process all over again, adding a sheet of paper to the stack each time you’ve emptied the ocean.

Do this until the stack of paper reaches from the Earth to the Sun. Take a glance at the timer, you will see that the three left-most digits haven’t even changed. You still have 8.063e67 more seconds to go. 1 Astronomical Unit, the distance from the Earth to the Sun, is defined as 149,597,870.691 kilometers. So, take the stack of papers down and do it all over again. One thousand times more. Unfortunately, that still won’t do it. There are still more than 5.385e67 seconds remaining. You’re just about a third of the way done.

## And you thought Sunday afternoons were boring

To pass the remaining time, start shuffling your deck of cards. Every billion years deal yourself a 5-card poker hand. Each time you get a royal flush, buy yourself a lottery ticket. A royal flush occurs in one out of every 649,740 hands. If that ticket wins the jackpot, throw a grain of sand into the Grand Canyon. Keep going and when you’ve filled up the canyon with sand, remove one ounce of rock from Mt. Everest. Now empty the canyon and start all over again. When you’ve levelled Mt. Everest, look at the timer, you still have 5.364e67 seconds remaining. Mt. Everest weighs about 357 trillion pounds. You barely made a dent. If you were to repeat this 255 times, you would still be looking at 3.024e64 seconds. The timer would finally reach zero sometime during your 256th attempt. *Exercise for the reader: at what point exactly would the timer reach zero?*

## Back here on the ranch

Of course, in reality none of this could ever happen. Sorry to break it to you. The truth is, the Pacific Ocean will boil off as the Sun becomes a red giant before you could even take your fifth step in your first trek around the world. Somewhat more of an obstacle, however, is the fact that all the stars in the universe will eventually burn out leaving space a dark, ever-expanding void inhabited by a few scattered elementary particles drifting a tiny fraction of a degree above absolute zero. The exact details are still a bit fuzzy, but according to some reckonings of The Reckoning, all this could happen before you would’ve had a chance to reduce the vast Pacific by the amount of a few backyard swimming pools.

## The Details

Please be advised that rounding and measurement error combined are many orders of magnitude greater than the current age of the universe, 4.323e17 seconds.

- 52! is approximately 8.0658e67. For an exact representation, view a factorial table or try a “new-school” calculator, one that understands long integers.
- A billion years currently equals 3.155692608e16 seconds; however, the addition of leap seconds due to the deceleration of Earth’s orbit introduces some variation.
- The equatorial circumference of the Earth is 40,075,017 meters, according to WGS84.
- One trip around the globe will require a bit more than 1.264e24 seconds, assuming 1 meter per step, which is actually quite a stretch for most people. This is almost 3 million times the current age of the universe, and we still have 2 levels of recursion to go (ocean, stack of papers).
- There are 20 drops of water per milliliter, and the Pacific Ocean contains 707.6 million cubic kilometers of water, which equals about 1.4152e25 drops.
- 1 Astronomical Unit, the distance from the Earth to the Sun, is defined as 149,597,870.691 kilometers.
- A royal flush occurs in one out of every 649,740 hands.
- The odds of winning a lotto jackpot after matching 6 numbers chosen without replacement from the range 1 to 59 are 1 in 45,057,474.
- The Grand Canyon has an estimated volume of 40 billion cubic meters. 1 grain of sand occupies approximately 1 cubic milimeter. Thus, the Grand Canyon could hold roughly 4e19 grains of sand.
- This article estimates that Mt. Everest weighs about 357 trillion pounds.
- Here you can read all about The End.

I understand that the chances of an identical deal for all four players are as remote as he says. But in bridge aren’t the odds somewhat shorter (though still huge!) as it does not matter the order in which each player receives the 13 cards in his hand?

I often wonder about the chances of even one player getting the same hand again, even if the other three receive completely different deals. Huge odds again, but considerably shorter than all players getting the same deal?

I suspect sometimes we don’t recognise previous hands if they do happen to occur, because the order of bidding could change with the change of dealer. The beauty of bridge is that even the same deal might be bid or played differently according to who opens, or a partnership’s vulnerability.

Hi Diana, the odds of being dealt the same hand in bridge twice in your lifetime are so huge as to be virtually impossible. I reckon that the chances of being dealt the same 13 cards out of a pack of 52 is 1:395424643911240600000. If you were dealt 3 hands a day, every day of every year, if my maths is correct it would be 3 trillion years before you would expect to be dealt the same hand twice! However, that’s only the probability so there’s nothing to stop you being dealt the same hand twice in two consecutive games, especially if the cards haven’t been shuffled!

As you said, if you were dealt the same hand twice, which is the principle behind duplicate bridge, you’d play it differently each time anyway because it depends on so many factors. What would be interesting to know is what is the probability in duplicate bridge of the same set of hands being played in exactly the same way. That’s beyond my level of maths I’m afraid…can anyone else work it out?