0%

Texas Hold'em: Probability of Straights and Flushes

Introduction

This was brought up by accident when I was playing poker with friends last year. A friend thought that the probability of a flush is greater than a straight, so I calculated it for him.

At that time, I thought it was very interesting to come up with a formula.

Write it down now.

This is a purely mathematical problem and does not involve game theory. You will learn some useless knowledge after reading it, but it will not improve your poker level.

There is something wrong with the LATEX of the blog now… all the curly braces and percent signs can’t be used, so I just make up for it…

Notation

Let:

  • denote the set of ranks in a deck: {} (or {} for short deck poker). (We can think that .)
  • denote the set of suits in a deck: {}.
  • denote the set of cards in a deck: . (Here, the multiplication operation represents the Cartesian product of the sets and ).

Problem 1. The probability of Flushes

Describe

Find the probability of obtaining a flush when considering a player’s hole cards and the community cards (a total of seven cards).

Mathematical description

For a set , we consider as a flush if and only: {}.

Let:

  • denote the set of all subsets of with a cardinality of .

  • denote the set of flushes among subsets of with a cardinality of .

The probability we require is .

Solving process

First, we need to determine , which represents the cardinality (number of elements) of the set . This cardinality corresponds to the total number of ways to select a subset of size from a set of elements. Mathematically, we can express this as:

And calculate , because there are only cards, so {}{} will not appear, because the suits are symmetrical, so we only need to consider one suit and finally multiply the number of schemes by .

For suit , we calculate the number of subsets C that satisfy the condition {}, {} and {}. We then sum up these counts.

For {}, We choose elements from {}, and then select elements from {} :

For {}, We choose elements from {}, and then select elements from {} :

For {}, We choose elements from {}:

so :

Problem 2. The probability of Straights

Describe

Find the probability of obtaining a straight when considering a player’s hole cards and the community cards (a total of seven cards).

Mathematical description

Let {}

For a set , we consider as a straight if:

or {}

Let:

  • denote the set of all subsets of with a cardinality of .

  • denote the set of Straights among subsets of with a cardinality of .

The probability we require is .

Solving process

First, we need to determine , which represents the cardinality (number of elements) of the set . This cardinality corresponds to the total number of ways to select a subset of size from a set of elements. Mathematically, we can express this as:

And calculate now. (Ctrl+C and Ctrl+V)

Difficulty

OK. A straight is not as easy to find as a flush. For a flush, there is only one suit, so we can enumerate the suits. If we enumerate , it will appear like {} In this way, it is counted twice in {} and {} respectively. Similarly, if there are two or more different suits for the same rank, it will be counted multiple times. If we want to use the enumeration method, we need to consider too many situations.

Minimal Representation

For each straight E, we count the solution with E as the minimum straight to avoid redundant calculations. Here, ‘minimum’ refers not only to the card rank, but for the convenience of computation, we can define the hierarchy of suits.

For example, if {}, will only be calculated when {}, not when {} and {}.

We call {} is the Minimal Representation of {}.

(assume )

So we only need to calculate

and {}
separately.

Generating Function

https://en.wikipedia.org/wiki/Generating_function

Ok. If I have a chance later, I would like to talk about Generating Function and combination counting.

(Cujus rei demonstrationem mirabilem sane detexi. Hanc marginis exiguitas non caperet.)

In situation .

We first assign a suit to each of the ranks, and then select cards from the remaining cards (of course, depending on the suit you choose, the number of optional cards you have left is also different).

For example, we want to count {}.

We consider which cards cannot be selected:
First of all, we cannot choose all cards with . In this example we cannot select all 4 cards with , because they have already been counted in {}.

Secondly, according to the different suits assigned, for example, if we calculate that the of is , we can choose among the remaining two cards, but when we calculate that the of , we cannot choose . For example, if you choose the , there are three left to choose, and if you choose the , there are no other to choose. In this case, the generating function is . For these ranks, the generating function is .

Excluding a total of cards of , the remaining cards are optional , so there are schemes in total. Multiplying the number of schemes for assigning suits (exactly more cards are optional) is the total number of schemes, so the total The generator function looks like this: (The expression “” is referred to as the coefficient of the term of the polynomial .)

In situation , for {}:

We don’t need to consider the smaller straights on the Rank than this straight, so there will be more optional cards in each case:

There are kinds of straights in situation : ().

So:




Conclusion

So it is reasonable for a flush to be greater than a straight.