Calculating combinations of a straight in Texas Hold ‘Em

card-gamescombinationspoker

Similarly to a previous question that I've asked, I have now attempted to calculate the amount of all possible seven card combinations that would result in a straight (and nothing better).

The Wikipedia article about poker probabilities says, that the frequency of a straight in a 7-card poker game is $6180020$.

I've tried replicating the steps of calculating combinations of three of a kind except this time for a straight, but was unable to get $6180020$ as my final answer. This is what I've tried so far:

$$10 \cdot 4^{5}-10 \cdot 4=10200$$

$10 \cdot 4^{5}$ gets me all possible straights, minus $10 \cdot 4$ which gets rid of all straight flushes.

I then proceed to split $10200$ into two parts – $1020$ straights with the highest card being ace and $9180$ other combinations. Where ace is the highest card I would assume it doesn't matter what two cards I pick – resulting in:

$$1020 \cdot \binom{52-5}{2}=1102620$$

For other combinations I don't want to pick a cards with rank that could follow my straight meaning the formula will be:

$$9180 \cdot \binom{52-5-4}{2}=8289540$$

Adding them up:
$$1102620+8289540=9392160$$

I would assume the next step is to subtract all the flushes out of $9392160$ however I realize that some straights will be counted multiple times if one of two cards after the straight have the same rank like a card in the straight (for example straight 2♥,3♥,4♥,5♦,6♦ + 3♦,A♣ and straight 2♥,3♦,4♥,5♦,6♦ + 3♥,A♣ will be both counted as two different combinations even though the cards are identical). Even after subtracting all the flushes the amount of combinations will be too large.

How can I proceed from here to arrive at the correct amounut of combinations, namely $6180020$?

Best Answer

First, ignoring all flushes (we do not need to distinguish between flushes and straight flushes), we will consider each of the other hand ranks that can be concurrent with a straight:

  • No Pair
  • One Pair
  • Two Pair
  • Three-of-a-Kind

With no pair, we can have a $7$-card straight ($8$ possible), a $6$-card straight with disjoint rank for the $7$th card ($47$ possible), or a $5$-card straight with distinct disjoint ranks for the $6$th and $7$th card ($162$ possible). In total we have $8+47+162=\color{blue}{217}$ possible $7$-card hands that contain a straight and no pair. For each of these, there are $4^7=16384$ ways to choose the suits. Counting the number of flushes, we find $1$ way to have $7$ cards in suit, $\binom76\cdot3=21$ ways to have $6$ cards in suit, and $\binom75\cdot3^2=189$ ways to have $5$ cards in suit, for a total of $211\cdot4=844$ flushes. This leaves $16384-844=\color{blue}{15540}$ non-flushes.

$$15540\times217=3372180\text{ straights with no pair}$$

With one pair, we can have a $6$-card straight (9 possible) or a $5$-card straight with a disjoint rank for the $6$th card (62 possible). For each, there are $6$ choices for the paired card, for a total of $71\cdot6=\color{blue}{426}$ possible $7$-card hands that contain a straight and one pair. For each of these, there are $\binom42\cdot4^5=6144$ ways to choose the suits. Counting the number of flushes, we find $3$ ways to have $6$ cards in suit and $3+\binom54\cdot3^2=48$ ways to have $5$ cards in suit, for a total of $51\cdot4=204$ flushes. This leaves $6144-204=\color{blue}{5940}$ non-flushes.

$$5940\times426=2530440\text{ straights with one pair}$$

With two pairs, we can only have a $5$-card straight (10 possible) with $2$ of the cards paired. There are a total of $10\cdot\binom52=\color{blue}{100}$ possible $7$-card hands that contain a straight and two pairs. For each of these, there are $\binom42^2\cdot4^3=2304$ ways to choose the suits. Counting the flushes, there are $3^2=9$ ways to choose the second suits for the paired cards, for a total of $36$ flushes. This leaves $2304-36=\color{blue}{2268}$ non-flushes.

$$2268\times100=226800\text{ straights with two pairs}$$

With three-of-a-kind, we can only have a $5$-card straight (10 possible) with one of the ranks repeated on the $6$th and $7$th card. There are a total of $10\cdot5=\color{blue}{50}$ possible $7$-card hands that contain a straight and two pairs. For each of these, there are $4^5=1024$ ways to choose the suits. Counting the flushes, for each suit there are $3$ ways to choose the missing suit for the set, for a total of $12$ flushes. This leaves $1024-12=\color{blue}{1012}$ non-flushes.

$$1012\times50=50600\text{ straights with three-of-a-kind}$$

Finally, adding these together give the total:

$$\begin{array}{r}3372180\\2530440\\226800\\+\quad50600\\\hline6180020\end{array}$$

Related Question