[Math] How many $5$-card hands have at least two cards with the same rank

combinatoricsdiscrete mathematics

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$.

Best Answer

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$$

Related Question