View Full Version : Straight/Flush Probability Question

08-01-2005, 03:17 AM
Just had a random thought the other night, and I'm now curious to know the answer.

Standard deck of cards has 13 values and 4 suits. Flushes are rarer than straights given 5 cards.

If we had a deck of cards with N values and S suits... what would N and S have to be such that the probability of getting a flush is equal to that of getting a straight given 5 cards.

Anyone know the method to solve this? Are there multiple answers?


08-01-2005, 06:10 PM
If we keep the rules the same as Poker, so there is an Ace that can be high or low but you cannot go around the corner, there are N - 3 possible ranks of straights. Any card but 2, 3 or 4 can be the top of the straight. Each of the N - 3 straights can be formed 5^S - S ways. So that's (N - 3)*(5^S - S) for straights.

The flushes can be formed S*(C(N,5) - N + 3) ways.

These will be near equal when N = 3*(S + 1). The only exact case I know of is the trivial one, 1 suit, 5 ranks, every hand a straight flush.

4 suits 15 ranks is pretty close, there are 12,288 straights and 12,012 flushes. Even better is 7 suits 25 ranks, with 369,754 straights and 371,910 flushes. Those numbers include straight flushes in both counts.

08-01-2005, 08:57 PM
As long as N>5, there are N-3 ways a straight can be formed
but for the case N=5, there is only one.

Also, the number of straights that can be formed should be
(N-3) * (S^5 - S)
and the number for flushes as you state is correct (the
straight flushes are ignored). Actually, you may as well
consider ALL straights and flushes when you want the number
of flushes and straights to be the same (you simply will
have a term S*(N-3) for the number of straight flushes).

If N=5, the only solution is S=1 as you mentioned.

If N>5, the equality of straights and flushes implies

(N-3)*S^5 = S*C(N,5)
= S*N*(N-1)*(N-2)*(N-3)*(N-4)/120

Both sides of the above equality can be divided by (N-3)*S
and the equality is the same as

S^4 = N*(N-1)*(N-2)*(N-4)/120

I am not an expert on eliptic curves and their application
to solve these type of number-theoretic Diophantine
equations, so I'll step back and let the professional
mathematician take over! /images/graemlins/smile.gif

08-03-2005, 04:47 AM
Thanks for the responses... so, I ran some numbers using what you both described, and I found some that are very close to equal, but not exact. But, I only ran up to 10,000 ranks.

For up to 10,000 ranks, the closest one to equal likelihood (I think) was for 3990 ranks and 1205 suits. Also, now that I look at the results of my plot, I'm not sure if I did something wrong. If you plot # of Ranks against the "dividing" # of suits, it's basically linear. Is that "obvious"?


Top 6 for up to 65K Ranks... (Rank, Suits)
64714 19552
52223 15778
39732 12004
16481 4979
27241 8230
3990 1205

This was probably a totally useless exercise, but I learned a bit, so that was cool. I still would be interested to know if there are an infinite number of solutions, multiple solutions, or just a single solution that would produce exact number of flushes and straights.

Thanks, again.