Help with Combinatorics Math Question, Please

Barthanatos

Barthanatos

Rising Star
Bronze Level
Joined
Apr 21, 2009
Total posts
8
Chips
0
Assume 5 cards for the following discussion.

I would like to know the method used to calculate the following, to an exact value:

How many ways are there to make a hand of 7-high?

I would like to use this method to calculate how many ways there are to make each possible high-card hand. In other words, I would like to know and understand how to use the method to calculate how many ways there are of making A-high, K-high, etcetera.

Thanks for any help.
 
zachvac

zachvac

Legend
Silver Level
Joined
Sep 14, 2007
Total posts
7,832
Chips
0
7-high as in no straights, pairs, or flushes? Just look at the number of combos:

For 7 high:

4 combos (2-3-4-5-7, 2-3-4-6-7, 2-3-5-6-7, 2-4-5-6-7)

In each combo each of the 5 can be any suit so 4*4^5

Then we have to take out flushes, 4 for each combo, so 4*4^5 - 4*4 = 4080

I just did this right now so I could have missed something, but I think that's right.

The other ones are tougher, biggest thing is just finding how many combos there can be for like K high without making a straight. Or maybe you could just find total combos and subtract out straights like I did with flushes.
 
Barthanatos

Barthanatos

Rising Star
Bronze Level
Joined
Apr 21, 2009
Total posts
8
Chips
0
7-high as in no straights, pairs, or flushes?

Yes.


Just look at the number of combos:

Easy enough for 7-low. 8-low has 14 combos if I count them right and works out to 55,296. I lost track trying to count how many combinations for 9-low when I got up to 27, and it just gets worse.

I'm looking for something that makes more use of math and less of labor.
 
zachvac

zachvac

Legend
Silver Level
Joined
Sep 14, 2007
Total posts
7,832
Chips
0
ok let's say for A-high since it should be toughest. First can be one of 52 cards. Next can be one of 48, 44, 40, 36.

Multiply those together, than we have to remove straights and flushes. We can remove the straight to 5/6/7/8/9/T/J/Q/K/A so 10*4^5 combos.

Flushes there can be 13 choose 5 combos times 4 = 4*(13!/(5!*8!))

Then we have to add back in the straight flushes because we double counted them but that's only 4*10 = 40

Let's try this method for 7 high.

24*20*16*12*8 - 2*4^5 - 4*(6!/5!) + 4*2 = 735,216 = I did something wrong lol. Even if we divide initial product by 5 so order doesn't matter we're still way way way too big. wtf did I do wrong?

edit: found it should divide by 5! because there are that many ways to arrange 5 numbers duh. That comes up with the right answer of 4080.
 
zachvac

zachvac

Legend
Silver Level
Joined
Sep 14, 2007
Total posts
7,832
Chips
0
So let's come up with a formula for it. It won't work with A high just because of the weird way straights can use A for high or low, but my previous post basically did that. Let's say for x high and J=11, Q=12, K=13

((x-1) choose 5)*4^5 - (x-5)*4^5 - 4*((x - 1) choose 5) + 4*(x-5)

seems to work.
 
Barthanatos

Barthanatos

Rising Star
Bronze Level
Joined
Apr 21, 2009
Total posts
8
Chips
0
Let me see if I can summarize, because it's hard to follow what you're saying (maybe it's just the scotch):

WaysToMakeHand = (PossibleCardsInEachOfFivePositions) - (StraightTerm) -(FlushTerm) + (StraightFlushTerm)

Ways = ((4(x-1)*(4(x-1)-4)*(4(x-1)-8)*(4(x-1)-12)*(4(x-1)-16))/5! - (x-5)*4^5 - (4*((x-1)!))/5! + 4*(x-5)

That seems to match what you're saying in post #4. I'm having trouble reconciling the formula you gave in post #5.

Thanks very much for the assistance.
 
Top