\problemdata      
        {counting-1} % latex-friendly label for the prob.
        {Counting} % The topic(s) of the problem content.
        {?} % Source (if known)
        {S02 PS8} % Usage (list ones you are aware of).
        {Christos Kapoutsis, S02} % Last revision info (author, date).


\begin{problem}
Theory Pig recently lost a lot of money playing poker with the 6.042
staff. So he decided to spend a week studying gambling. One of the TAs
told him that a full house (three-of-a-kind and one pair) is much more
valuable than two pairs. Theory pig is not so sure so he decides to
count the number of hands with two pairs, but no three- or
four-of-a-kind.\footnote{In other words 9$\clubsuit$, 9$\diamondsuit$,
8$\clubsuit$, 8$\heartsuit$, 7$\spadesuit$ is considered two pair, but
9$\clubsuit$, 9$\diamondsuit$, 8$\clubsuit$, 8$\heartsuit$,
9$\heartsuit$ or 9$\clubsuit$, 9$\diamondsuit$, 9$\heartsuit$,
9$\spadesuit$, 7$\clubsuit$ are not.}

He reasons that, there are 13 choices for the value of the cards in
the first pair. Then there are $\binom{4}{2} = 6$ ways
to choose two of the four cards in the deck that have this value.
That leaves 12 choices for the value of the cards in the second pair,
and $\binom{4}{2} = 6$ ways to choose two of the four
cards with this value. Finally, the fifth card can be any one of the
44 cards remaining in the deck, because the fifth card can not have
the same value as the first two pairs leaving $48-4$
possibilities. Altogether there are $13 \cdot 6 \cdot 12 \cdot 6 \cdot
44$ hand with just two pairs.

Is this argument correct? If it is not, explain why and how to fix
it. If it is correct, prove it by arguing that everything has been
counted exactly once.

\solution{Also in the Course Notes. The argument is incorrect. The bug
is that every hand has been counted twice!  For example, a pair of
kings and a pair of queens is counted once with the kings as the
first pair and a second time with the queens as the first pair.  The
references in the argument to a ``first pair'' and a ``second pair''
signal danger; these terms imply an ordering that is not part of the
problem. There is a 2-to-1 mapping from the set of hands we counted to
the set of hands with two pairs.  Therefore, the set of hands with two
pairs is half as large as our initial count:
\begin{eqnarray*}
\mbox{hands with two pairs}
        & = & \frac{13 \cdot 6 \cdot 12 \cdot 6 \cdot 44}{2} \\
        & = & 123,552.
\end{eqnarray*}
The course notes show an alternate way of counting two pair hands, and
one can verify by comparing the two answers. But it is important in
any counting argument to keep track of whether order is important or
not and make sure that things are counted only once.

Two pairs turn out to be 33 times more likely than a full house.
}
\end{problem}

