0
$\begingroup$

This is a question from Zybooks Exercise 5.7.2: Counting $5$-card hands from a deck of standard playing cards. I just can't wrap my head around the answer. If there is anyone that can explain this in English, that would be greatly appreciated.

How many $5$-card hands have at least two cards with the same rank? Apparently the answer to this is $\binom{52}{5} - \binom{13}{5}4^5$.

I see that we are using the complement rule here. I get $\binom{52}{5}$ denotes all the $5$-card hands in a $52$-card deck, but I don't see why we are subtracting $\binom{13}{5}4^5$.

$\endgroup$
1

2 Answers 2

1
$\begingroup$

A five-card hand contains at least a pair unless it contains five cards of different ranks. There are $13$ ranks in the deck. The number of ways of selecting five different ranks is $\binom{13}{5}$. For each rank, we must select one of the four suits, which can be done in $\binom{4}{1}$ ways. Hence, there are $$\binom{13}{5}\binom{4}{1}^5$$ ways to select five cards from different ranks.

Subtracting this quantity from the total number of ways of selecting five cards from the $52$ cards in the deck yields the number of five-card hands which do not contain a pair. $$\binom{52}{5} - \binom{13}{5}\binom{4}{1}^5$$

$\endgroup$
1
  • 1
    $\begingroup$ Thanks all for the assistance seeing it spelled out in english has helped. Was worried that i'll be too formulaic and not see the reason why the answer was what it was. $\endgroup$
    – fortuno
    Commented Aug 26, 2021 at 1:48
1
$\begingroup$

There are $13$ ranks and if all cards are of different ranks, there are ${13 \choose 5}$ ways to choose $5$ ranks and for each rank there is ${4 \choose 1}$ ways to choose a card. So there are ${13 \choose 5} \cdot 4^5 \ $ ways of choosing $5$ cards, all of different ranks.

Now as you said, ${52 \choose 5}$ is the total number of hands with $5$ cards. So subtracting $ {13 \choose 5} \cdot 4^5$ from $ {52 \choose 5}$ gives number of hands of $5$ cards where at least two cards are of the same rank.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .