četvrtak, 19. srpnja 2012.

Poker hand possibilities

Here is a way to calculate how much of "different hands" can be made out of 1 deck of cards. Basically you are looking for how many 5 card hands you can make out of a 52 card deck. The combination function makes use of factorials. The factorial function is defined as: n! = n X (n - 1) X (n - 2) X ... X 1 For example: 6! = 6 X 5 X 4 X 3 X 2 X 1 = 720 The combination function which determines how many sets of r objects each (combinations) you can make from a defined number of n objects is defined as follows: C(n,r) = n! / r! (n - r)! So the number of 5 card hands which can be made from a single deck of 52 cards is as follows: C(52,5) = 52! / (5! X (52 - 5)!) = 52! / (120 X 47!) = (52 X 51 X 50 X 49 X 48 X 47!) / (120 X 47!) = (52 X 51 X 50 X 49 X 48) / 120 = 311875200 / 120 = 2598960 possible 5 card hands from a deck of 52 cards

Nema komentara:

Objavi komentar