Saturday, December 01, 2007

No two poker hands are the same (non-grumpy content)

For some odd reason, I have lately been wondering whether any two poker hands will ever be exactly the same (assuming a random shuffle; i.e., barring the use of a deck set up deliberately in some way). Once you do the math, it turns out that it isn't even a close question.

Let's just focus on Texas hold'em poker, and assume a ten-handed game. Because we don't care about the order in which the two down cards are dealt, the number of possible starting hands for the first player is given by C(52,2), which is 1326. (For an explanation of this notation, see http://en.wikipedia.org/wiki/Combinations.) Then there are 50 cards left, so for each of those 1326 possibilities we have C(50,2) starting hands for the second player, which is 1225. Continuing in that fashion, we find that there are 2.99 x 10^29 ways of dealing two cards to each of ten players.

Then we have a flop of three cards out of the remaining 32, and C(32,3)=4960. Finally we multiply by 29 for the number of different turn cards and by another 28 for the number of different river cards, for a grand total of 1.21 x 10^36. (For you math geeks, that's 1.21 undecillion.)

Suppose that we set all six billion people on earth to doing nothing but playing poker. That would be 600,000,000 games going. (We'll let the players deal their own cards, so nobody is left out having to be the full-time dealer.) Suppose we can knock out one hand a minute, because we're all extremely quick. We could get through 3.15 x 10^14 hands per year. In 200 years (approximately the amount of time that poker has existed), we could play 6.31 x 10^16 hands. In 20,000 years (about the amount of time since the last Ice Age), we could have done 6.31 x 10^18 hands. That's a pretty good approximation of the number of grains of sand on the world's beaches (see http://www.hawaii.edu/suremath/jsand.html). But it's only a miniscule fraction of the number of possible hold'em hands. In fact, it would amount to way less than one one-millionth of one one-billionth of the number of possible hands.

And we haven't even considered all of the other forms of poker (Omaha, in which every player is given four cards to begin with, obviously has vastly more potential), or all the extra variations that come by playing with fewer than ten players at a time. And, of course, no two players use identical strategies, so if you combine all of the possible choices that each player has at each point in the hand with the number of hands, I think we might get up to a number comparable to the number of atoms in the universe (which is on the order of 10^80).

In short, it is virtually certain that there have never been two identical hands of poker played in the entire history of the game.

The chess nerds will boast that their game is vastly more complex, because the estimated number of possible chess games is something like 10^120 or maybe 10^123 (see http://en.wikipedia.org/wiki/Shannon_number). But if they're so smart, why aren't any of them getting rich from their game, huh?

4 comments:

Anonymous said...

Ouch...math makes my head hurt!!!

Willrr said...

I disagree with your conclusions, I would argue that they mean that it is unlikely that EVERY hand has been played, but it is very likely that the same hand has been played more than once.
FWIW.

Rakewell said...

We can't calculate the probability of two identical hands having been played without first making an estimate of the total number of hands that has been played. I don't feel like attempting that. But it's very safe to say that the total number of poker hands ever played must be less than 10^15. This is an infinitesimal fraction of the number of possible hands. It is virtually certain that no two identical hands have been dealt (i.e., just considering what cards are in play), let alone having had two play out identically (i.e., given the range of options the players have at each stage of the hand).

But I'm always willing to be convinced that I'm wrong. If you can whip up some estimate of the total number of hands played and run the calculation as to the probability that any two of them were dealt identically, I'd be very interested. Offhand I'd put the probability at way less than 1%.

Cardgrrl said...

I think it's highly likely, however, that many functionally equivalent hands have been played. By "functionally equivalent" I mean hands in which the values are the same but the suits happen to be different (i.e., where there were hearts there are diamonds, etc.). The card deck has a four-fold symmetry ~ there's probably a more accurate technical term for it, but I don't know it ~ which means that many non-IDENTICAL situations are strategically the same.