WOLFRAM NOTEBOOK

Counting Class Problem Set

We will find out the number of times that certain poker hands appear.Recall that a normal hand consists of 5 cards out of a set of 52 cards. The 52 cards are composed of 4 different suits (clubs),(spades),(hearts),(diamonds). Each suit carries 13 cards. An ace, cards numbered 2 through 10, a jack, a queen, and a king. Thus in total there are
52
5
=2598960
different hands.

1. How many hands with only one set of two of a kind are there?

An example of a hand with two of a kind is 3,3,4,6,A
First Choosing the number to be repeated. C(13,1)
Choosing the suits for the number that is repeated C(4,2)
Choosing the number of the other 3 cards C(12,3)
Choose the suit of the remaining cards 4 for each of them.
3
4
In[]:=
Binomial[13,1]Binomial[4,2]Binomial[12,3]
3
4
Out[]=
1098240

2. How many hands with two sets of two of a kind are there?

An example of a hand with two sets of two of a kind is 3,3,4,4,A
Choose the two numbers that will be repeated C(13,2)
Choose the suits for each of the numbers that are repeated. C(4,2) C(4,2)
Choose the remaining number C(11,1)
Choose the suit for that number 4
In[]:=
Binomial[13,2]
2
Binomial[4,2]
114
Out[]=
123552

3. How many hands with three of a kind are there?

An example of a hand with three of a kind is 3,3,3,4,A
First Choosing the number to be repeated. C(13,1)
Choosing the suits for the number that is repeated C(4,3)
Choosing the number of the other 2 cards C(12,2)
Choose the suit of the remaining cards 4 for each of them.
2
4
In[]:=
Binomial[13,1]Binomial[4,3]Binomial[12,2]
2
4
Out[]=
54912

4. How many hands with a straight are there?

For example {A,2,3,4,5}, {10,J,Q,K,A}
Choose the starting number 10.
For each number I have 4 possible suits but I do not want the same suit for all cards
(
5
4
-4)
In[]:=
10(
5
4
-4)
Out[]=
10200

5. How many flush(all of the same suit) hands are there?

For example {5,3,4,6,A}
Choose the suit 4.
Choose the 5 cards from the suit you are taking C(13,5)-10
In[]:=
4(Binomial[13,5]-10)
Out[]=
5108

6. How many full house (three of a kind and two of a kind) hands are there?

For example{3,3,3,4,4}
Choose the two of a kind number C(13,1)=13
Choose the three of a kind C(12,1)=12
Choose the suits for the two of a kind C(4,2)
Choose the suits for the three of a kind C(4,3) =4
In[]:=
13*12*Binomial[4,2]*4
Out[]=
3744

7. How many poker(four of a kind) hands are there?

For example {3,3,3,3,4}
Choose the number repeated C(13,1)=13
Choose the suits C(4,4) = 1
Choose the 5th card number C(12,1) = 12
Choose the suit for the last card C(4,1)=4
In[]:=
131124
Out[]=
624

8. How many straight flushes are there?

For example{10 , J, Q, K, A}
Choose the suit C(4,1) = 4
Choose the starting number C(10,1)= 10
In[]:=
410
Out[]=
40
Wolfram Cloud

You are using a browser not supported by the Wolfram Cloud

Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.


I understand and wish to continue anyway »

You are using a browser not supported by the Wolfram Cloud. Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.