You are on page 1of 8

Mathematics and Poker

Brian Alspach

Let me begin by congratulating Randy Hewines and Dave Scharf for ini-
tiating a Canadian magazine devoted to poker. Why a Canadian magazine,
you may ask, given that in some sense the game of poker is unaffiliated with
any country, although there still are many places in which popular local games
are played with a reduced deck instead of the standard 52-card deck. I be-
lieve the existence of a Canadian poker magazine speaks to the strength of the
game in Canada, especially in the provinces of BC, Alberta and Saskatchewan.
There is now a respectable schedule of major annual tournaments in Alberta
and Saskatchewan.
The rules of the game are the same essentially everywhere, but there are
issues surrounding the game that arise in common for Canadian venues. So it
seems to me there are some compelling reasons for a Canadian poker magazine.
Of course, most of the articles will be of interest to people from many coun-
tries. I shall be writing a variety of articles about mathematics and poker. The
relationship between mathematics and poker is interesting and murky.
Frequently, I am asked about the perceived advantage a mathematician has
in poker. The people who ask me about this almost always are not poker players.
I assure them that mathematics plays a role, but there are many very successful
players who have almost no formal knowledge of mathematics.
On the other hand, another feature of the people who ask that question is
a lack of understanding of what mathematics is. I suspect most of the people
reading this article do not share my view of what mathematics is. A thumbnail
description of my view is the following: Mathematics is the attempt to discover
and classify patterns. The point of this is that there are many questions I see
as mathematics, whereas, most people would screw up their brows and query,
“That’s math?”
Pure curiosity drives one type of mathematical question that arises in poker
— answering these questions is interesting, but, in truth, will have little impact
upon how we play the game. This is the kind of question that a mathematician
finds much more interesting than does a poker player. The mathematician
will smile and think that problem sounds fun and then attempt to solve it.
Meanwhile, a typical poker player, upon hearing the question, will say, “Who
cares?”
Here is where my professional background comes into play because I find
such problems amusing. I shall write about a variety of problems falling into
that category. Hopefully, readers will find such questions fun too.
Another category of question, though much rarer than the curiosity driven
questions, consists of those that go to the core of how we think about playing
poker. Questions in this category are normally difficult and the subject of
debate. Accurate results sometimes surprise people and cause people to shift
their approaches to the game.
One last category of questions consists of those with direct applications but

1
no real impact on how we play the game. A typical question in this category
would be: What is the probability of a bad-beat jackpot occurring under the
following rules? A casino uses the answer to establish bad-beat jackpot rules
fulfilling certain criteria, but the answer to the question has little impact on
how an individual plays the game.
The above discussion provides an indication of the kinds of questions I shall
be addressing throughout this series of articles.
Now I’d like to discuss my approach. Most of the poker authors I have read
who provide numerical results give little or no information on how those results
are achieved. I stood in front of too many university students throughout a 33-
year teaching career to be satisfied with this approach. I am going to provide
some details on how I reach whatever conclusions are present. My hope in doing
so is to allow interested readers to derive all the results themselves. Normally,
I shall not carry out all the details, but will attempt to have complete details
at my website (www.math.sfu.ca/~alspach) under the folder entitled “Poker
Computations.”
Mathematicians receive training that turns them into arguably the most
notorious questioners of all. We always are asking why. I want to instill some
of that attitude in the reader.
In addition, I want to provide some general approaches to problem solving
employed by mathematicians. Let me now give a preview of coming attractions.
This is the problem I’ll solve in my next article. Some of you may want to take
a whack at it ahead of time or test your intuition. It is a perfect example of a
curiosity driven question.
A friend at Casino Regina, call him G, told me that two of them were
discussing the sum of the three cards, using the usual blackjack scheme in which
an ace counts 1 or 11, appearing in the flop in hold’em. They noticed, or thought
they noticed, that the cards frequently sum to 21. They made a small wager
based on intuitive guesses about the probability of the sum being 21.
Just to make certain you understand the question, I’ll give two examples. If
the flop is 4-J-A, the sum is either 15 or 25. If the flop is 2-9-K, the sum is 21.
The question then is: What is the probability the sum of the flop in hold’em is
21? If you don’t want to work out the exact value, make an intuitive guess.
By the way, we are going to work out the value under the assumption that
the observor knows none of the cards held by any of the players.
Let me finish by wishing Randy and Dave success with this magazine. I also
wish to thank them for asking me to play a part.

2
Flop Sums
Brian Alspach

In my last article, I mentioned a problem brought to me by a friend at


Casino Regina. The problem arose out of a discussion he was having with
another player regarding the sum of the three cards comprising the flop in
hold’em. In determining the sum, we use the usual blackjack convention in
which an ace counts 1 or 11. They noticed, or thought they noticed, that the
cards frequently sum to 21. They made a small wager based on intuitive guesses
about the probability of the sum being 21.
Just to make certain you understand the question, I’ll give two examples.
If the flop is 4-J-A, the sum is either 15 or 25. If the flop is 2-9-K, the sum
is 21. The question then is: What is the probability the sum of the flop in
hold’em is 21? By the way, we are going to work out the value under the
assumption that there is an observor who knows none of the cards held by any
of the players. Thus, the question we consider is the number of three-card hands
from a standard 52-card deck that sum to 21. Since we are going to the trouble
of counting how many three-card hands sum to 21, let’s count the number of
three-card hands attaining any of the possible sums for three cards.
The computations here are straightforward and based on seven building
blocks. The building blocks arise because there are 16 cards that have value 10
and 4 cards of each of the ranks A, 2, . . . , 9. The notation we use to describe
the seven patterns for three-card hands is T for cards of value 10 and x, y, z for
other ranks.
For a hand of the form T-T-T, we are choosing three cards from 16 so that
there are C(16, 3) = 560 of them. There are 4C(16, 2) = 480 hands of the form
T-T-x because we are choosing two cards from 16, and one card from four.
There are 6 · 16 = 96 hands of the form T-x-x because we are choosing one
card from 16, and two cards from four cards of rank x. There are 4 · 4 · 16 = 256
hands of the form T-x-y because of choosing one card from four for each of the
ranks x and y, and one card from 16 for the 10-valued card. There are four
hands of the form x-x-x since we are choosing three cards from four cards of
rank x. There are 24 hands of the form x-x-y since we are choosing one card
from four cards of rank y, and choosing one of six pairs of rank x. Finally, there
are 64 hands of the form x-y-z because we have four choices for each rank.
The above building blocks are used in all the calculations. We must be
aware of the fact that aces can count as either 1 or 11 because this enhances
the possibility for errors. We shall show how to check the results.
Let’s illustrate the process by going through the details for one specific value.
Motivated by the source of the question, let’s consider how many three-card
hands sum to 21. One combination is A-A-9 of which there are 24 since this
has the form x-x-y. The combinations with a single ace are A-8-2, A-7-3, A-6-4,
A-5-5 and A-T-T. Three have the form x-y-z, one has the form x-x-y, and the
other has the form T-T-x. Thus, there are 696 of them. There are no additional

1
combinations with T-T. The combinations with a single T are T-9-2, T-8-3,
T-7-4 and T-6-5. There are 256 for each of them producing 1,024 hands with a
single T. The combinations with neither A nor T are 9-9-3, 8-8-5, 9-6-6, 7-7-7,
9-8-4, 9-7-5 and 8-7-6. There are 24 for each of the first three, four for the
fourth, and 64 for the last three. This gives 268 of them.
Adding all of the numbers gives 2,012 three-card hands whose sum is 21. The
maximum sum is 33, the minimum sum is 3 and all numbers between occur.
For each of the possible sums we go through what was done in the preceding
illustration. The table below contains all the information in the column headed
Number.
Sum Number Rough Probability
33 4 5,525
32 96 230
31 504 44
30 840 26
29 784 28
28 920 24
27 1,108 20
26 1,264 17.5
25 1,472 15
24 1,652 13.4
23 1,860 11.9
22 1,896 11.7
21 2,012 11
20 1,688 13.1
19 1,640 13.5
18 1,540 14.4
17 1,448 15.3
16 1,304 17
15 1,172 18.9
14 984 22.5
13 828 26.7
12 620 36
11 440 50
10 352 63
9 268 82
8 200 111
7 136 163
6 92 240
5 48 460
4 24 921
3 4 5,525
To obtain the probability of a certain sum occurring, we simply divide the
number of hands with that sum by 22,100. Instead of displaying the exact prob-
ability in the column headed Rough Probability, we round off the probability

2
to the form 1 divided by the value displayed in the column. For example, the
entry in the column corresponding to the sum 21 is 11. This means the probabil-
ity of having a sum of 21 is about 1/11 (the exact value is 503/5525). Similarly,
the probability of having a sum of 19 is about 1/13.5 which is 2/27. This way
of expressing the probability is convenient for setting the odds against it hap-
pening. Referring to the same two examples above, the odds against a sum of
21 is about 10-to-1, and the odds against a sum of 19 is about 12.5-to-1.
As far as checking our results is concerned, summing all of the numbers in the
column headed Numbers yields 27,200. There are only C(52, 3) = 22, 100 3-
card hands leading us to ask, “What is going on here?” Now we have to account
for the effect of aces counting as 1 or 11. The hand A-A-A, of which there are 4,
sums to either 33, 23, 13 or 3. Thus, these 4 hands actually contribute 16 to the
table. So these hands are over-counted 12 times. Any hand with two aces has
three different sums so that they are overcounted twice. There are 6 · 48 = 288
3-card hands with two aces. Thus, we have a further 576 over-counted hands.
Finally, any hand with a single ace has two sums. There are 4C(48, 2) =
4, 512 three-card hands with one ace. So this contributes 4,512 to the over-
count. The total over-count is 12 + 576 + 4, 512 = 5, 100. Subtracting 5,100
from 27,200 yields 22,100 as the actual number of distinct hands contributing to
the table. Thus, everything checks. Poker players love proposition bets. They
are not usually as complex as this one, however.

3
Counting Starting Poker Hands
Brian Alspach

If you ask poker players how many starting hold’em hands there are, you
will find that a majority of the players say there are 169. Not only is this the
correct number, but you would discover that most of them can tell you how to
derive the number. The typical argument goes something like this. Any two
pairs of the same rank are really the same hand as far as analyzing their values,
and there are 13 possible ranks. This gives us 13 starting hands that are pairs.
There are 78 ways to choose two distinct ranks from 13. Two cards of different
ranks come in two flavours: suited and offsuit. Other than this distinction, they
really are the same hand. Thus, there are 78 + 78 + 13 = 169 different starting
hold’em hands.
The preceding verification is perfectly correct and easily understood, but
it has one weakness. It is what is known as an ad hoc argument. That is, if
you were to ask the same poker players how many starting Omaha hands there
are, they would quickly realize the limitations in trying to extend the argument
for starting hold’em hands to starting Omaha hands. They would soon find
themselves bogged down in messy cases and subcases.
This suggests an obvious question. Is there a universal method for count-
ing the number of starting hands for different poker games? The answer is a
resounding “yes”.
There are several aspects of this general method that appeal to me a great
deal. First, the method works for all situations. Second, the method is efficient
and fast. Third, the method arises in a beautiful subject of mathematics called
group theory, and this is the only application of group theory to poker that I
have seen.
I now am going to describe the method followed by applications to hold’em
(the method better produce 169 as its answer), pineapple, seven-card stud, and
Omaha. The method depends on a careful analysis of what it means for two
hands to be equivalent.
Let’s look at the hold’em situation. There actually are 1,326 ways of forming
two-card hands. (There are 52 choices for the first card, 51 choices for the second
card, and then we divide by two because any given hand can come in either of
two orders.) However, we agree that many of those hands are equivalent to
each other because we ignore suits. For example, the seven of clubs and eight
of diamonds behave similarly to the seven of hearts and eight of clubs. To be
specific, we agree that two hands are equivalent if you can tranform one hand
into the other by performing some permutation of the suits.
In total, there are 24 possible permutations of the four suits. The complete
collection of all 24 possible permutations is called a permutation group. (For
those who wish to show off, it is called the symmetric group of degree 4.)
We are going to use a nifty way to describe all the permutations. I believe
an example will make it clear. Look at the notation (C H S)(D). This is

1
the permutation that changes clubs to hearts, hearts to spades, spades back to
clubs, and leaves diamonds alone. So for an expression inside parentheses, we
change the first to the second, the second to the third, and so on until reaching
the last element which gets changed into the first. If there is just one symbol
in the parentheses, it is left unchanged. This description is called the cyclic
structure of the permutation.
Even though there are 24 permutations, many of them have similar cyclic
structure and that is all we need to do the counting. Here are the distinct
types of cyclic structures. The permutation leaving all suits unchanged is called
the identity permutation. There are six permutations with cyclic structure
(x y)(z)(w) and we call them Type 1. There are three permutations with cyclic
structure (x y)(z w) and we call them Type 2. There are eight permutations
with cyclic structure (x y z)(w) and we call them Type 3. Finally, there are six
permutations with cyclic structure (x y z w) and we call them Type 4.
We illustrate the remaining ingredients we need by considering hold’em. As
mentioned above, there are 1,326 two-card hands. Each of the 24 permutations
of the four suits induces a permutation of the 1,326 two-card hands. For exam-
ple, the permutation (C H)(D S) changes the hand 3♣ − 6♦ to 3♥ − 6♠. The
same permutation changes the hand 4♣ − 4♥ to itself. The latter is called a
fixed point. There is then a famous counting theorem for permutation groups
that tells us that the number of different starting hands is obtained by counting
all the fixed points over the 24 permutations and then dividing by 24.
The reason the computation is fast is that two permutations with the same
cyclic structure have the same number of fixed points, and counting the number
of fixed points is easy. We look at two examples to show you how easy it is to
count fixed points.
The permutation (C D)(H)(S) is a typical Type 1 permutation. How many
two-card hands does it fix? If both cards are chosen from hearts and spades,
then the permutation fixes it because those two suits are left unchanged. That
gives us C(26, 2) = 325 fixed hands. If the hand has a club of rank x and
it is fixed, then it must have a diamond of rank x, and vice versa. So there
are 13 hands like this. The permutation then fixes 338 hands. There are six
permutations of Type 1 so that altogether they fix 2,028 two-card hands (see
the entry in the table below).
Consider a Type 2 permutation with a three-card hand. You should see that
the permutation can fix no three-card hands.
The table below contains the information for the four games (so that you
can see if you get the same answers for each case). Note that the identity per-
mutation fixes all hands because it changes no suits. An entry in the table gives
the number of hands fixed by all the permutations of a given cyclic structure
for the game indicated at the head of the column. The last line is obtained by
dividing the preceding line by 24.

2
Cyclic Types Hold’Em Pineapple Seven-Card Stud Omaha
Identity 1,326 22,100 66,300 270,725
Type 1 2,028 17,628 48,828 115,518
Type 2 78 0 0 975
Type 3 624 2,392 6,864 7,072
Type 4 0 0 0 78
Number Fixed 4,056 42,120 121,992 394,368
Starting Hands 169 1,755 5,083 16,432

You might also like