Poker is played with 52 cards. In poker, a full house consists of 3 cards of one rank and 2 cards of another rank. How many possible full houses are there?
We need to select 2 ordered values from 13, which gives $13 \times 12$ choices. Then, choose 3 cards from 4 of the first value, and 2 cards from 4 of the second value.

The total number of full houses is therefore equal to $13 \times 12 \times \binom{4}{3} \times \binom{4}{2} = 13 \times 12 \times 4 \times 6 = 3744$.

Notation. If $X$ is a finite set, we denote $|X|$ as the number of elements in $X$.

Principle for counting in two ways. Suppose $A$ and $B$ are two finite sets, and $\mathscr{R}$ is a relation between the elements of $A$ and the elements of $B$.

Let $X$ be the set of pairs $(a, b)$ such that $a \in A$, $b \in B$, and $a \mathscr{R} b$.

For every $a \in A$, we denote $X_{a}$ as the set of $b \in B$ such that $a \mathscr{R} b$. Similarly, for every $b \in B$, we denote $X^{b}$ as the set of $a \in A$ such that $a \mathscr{R} b$. Then we have

$$
\sum_{a} |X_{a}| = \sum_{b} |X^{b}|.
$$

This equality can be visualized as follows. We form a table where each element of $A$ corresponds to a row and each element of $B$ corresponds to a column.

We place a black dot at the intersection of row $a$ and column $b$ if $a$ and $b$ are in relation.

![](https://cdn.mathpix.com/cropped/2024_05_10_831e903be1b8a1180f82g-68.jpg?height=455&width=356&top_left_y=331&top_left_x=887)

Then $|X_{a}|$ is the number of black dots in row $a$, $|X^{b}|$ is the number of black dots in column $b$, and $\sum_{a} |X_{a}| = \sum_{b} |X^{b}|$ is the total number of dots in the table.

Example: Let $A$ be the set of humans, and $B$ be the set of languages \{French, English\}. Each person speaks either one of the two languages, both, or neither.

Let $F$ be the number of people who speak French and $E$ be the number of people who speak English.

For every person $a$, let $n_{a}$ be the number of languages spoken by $a$ among French and English.

Then $\sum_{a} n_{a} = F + E$.

## Exercises.