I would like to generate all the possible combinations of 7 cards I can make within a deck of 52 cards. I made a function on python but after 10min it's still not finished, do you have any ideas ?
Thank you to always be so helpfull
Well, the number of combinations of 7 cards selected from 52 is 133,784,560, so you have to be patient.
"52 choose 7" is equal to 52!/((52-7)!*7!), or (52*51*50*49*48*47*46)/(7*6*5*4*3*2*1).
Hope this helps!
Dog Hand
Quote: 123xyzHello everyone,
I would like to generate all the possible combinations of 7 cards I can make within a deck of 52 cards. I made a function on python but after 10min it's still not finished, do you have any ideas ?
Thank you to always be so helpfull
Do you want just the number of possibilities, or the number of 7 card hands that contain a particular poker hand or each type of hands?
I think the raw number is just COMBIN(52,7) in excel. which is 133,784,560 hands.
If you go to
this page, and look at the two 7 card stud tables, the Wizard breaks the hands down into values that fit a poker hand of various strengths.
These tables show the BEST possible hand. For example, hands with a straight include those with a straight flush. But since a straight flush is a distinct, more valuable hand, they are listed separately, and subtracted from those that contain just a straight.
If neither of these address your question, please be more specific.
my Excel returns for COMBIN(7,52)#NUM!Quote: beachbumbabsI think the raw number is just COMBIN(7,52) in excel. which is 133,784,560 hands.
in pari/gp calculator: binomial (7,52) returns 0
133,784,560 is the number of combinations of 52 choose 7.
OP"I would like to generate all the possible combinations of 7 cards I can make within a deck of 52 cards."
52 choose 5 = 2,598,960
52C7 is about 51.5 times LARGER than 52C5
a program I have takes 7 minutes to create a delimited text file for 52C5 at 68 MB in size.
good luck on the 52C7 created file!
imo,such a waste of effort and time.
what IS the OP actually after?
Oh, I see, could be more specific
Quote: 7crapsmy Excel returns for COMBIN(7,52)#NUM!
Swap the 7 and 52
Also a semi-related question. In Wizard of Odds pay out tables there is usually a “total combinations” that is not simply the total 5 card combos.
For example in crazy 4 poker, the payout tables use a total combination number of 3,986,646,103,440 but this is much larger than the total number of 5 card combos.
Is this larger number the total number of 2 hand faceoffs?
Quote: GBAMSwap the 7 and 52
Also a semi-related question. In Wizard of Odds pay out tables there is usually a “total combinations” that is not simply the total 5 card combos.
For example in crazy 4 poker, the payout tables use a total combination number of 3,986,646,103,440 but this is much larger than the total number of 5 card combos.
Is this larger number the total number of 2 hand faceoffs?
Yes. Every player hand has to be compared to every possible dealer hand in turn, to calculate results for the table.
Thanks for catching the transposition error, both you and 7craps.
Quote: beachbumbabsYes. Every player hand has to be compared to every possible dealer hand in turn, to calculate results for the table.
Why/how is this number different than combin(52,10)?
Quote: GBAMWhy/how is this number different than combin(52,10)?
Combin(52,10) is the total number of 10 card hands, where the order dealt doesn’t matter. But, there are combin(10,5) ways to pick which of those 10 are the player’s cards.
I would calculate the total hands as combin(52,5)*combin(47,5), which is equivalent to combin(52,10)*combin(10,5).
Player: A2346 vs dealer: A2345, A2346...... etc and count the wins vs losses?
Quote: GBAMSo to make those tables on WoO where the use simulations to learn the EV of each hand do those simulations just tally up the wins like:
Player: A2346 vs dealer: A2345, A2346...... etc and count the wins vs losses?
Yes, although I wouldn't call it a simulation. If you cover every possibility, then it is a full combinatorial analysis, even if you don't use "math" to determine the results.
Quote: GBAMIn a simulation do they just run a loop comparing thousands and thousands of random pairings to estimate a house edge?
Yes, random selections is a simulation. In the Wizards analysis of Crazy4, it covers all combinations.