# Counting Card hands with various restrictions

I would like to know if my solutions are correct for the following three combinatorial card questions. In each question, assume we have a standard deck of cards (13 ranks, and 4 suits).

1. How many ways are there to select $7$ cards so that we have at least $2$ distinct suits?

${\bf Solution:}$ Count the total number of ways to select $7$ cards from $52$ and subtract the number of ways to select only one suit. This is: \begin{align} {52 \choose 7} - {13 \choose 7} \end{align}

1. Count the number of ways to select $7$ cards so that no $2$ cards have the same rank?

${\bf Solution:}$ By definition of ${n\choose k}$ this is just $13 \choose 7$

1. How many ways are there to select $7$ cards so that two distinct ranks occur twice, and three distinct ranks occur once?

${\bf Solution:}$ First we choose $5$ distinct ranks which is ${13 \choose 5}$. Then choose the $2$ suits for one rank, $2$ suits for the other rank, and then three remaining suits. This is: \begin{align} {13 \choose 5}\cdot{4 \choose 2}\cdot{4 \choose 2}\cdot4\cdot4\cdot4 \end{align}

-

For the first question, there are $4\dbinom{13}{7}$ "bad" (one suit) hands, so the answer needs to be changed somewhat.

For the second question, there are $\dbinom{13}{7}$ ways to select the ranks that will be represented. For each rank, there are $4$ ways to choose the actual card, for a total of $\dbinom{13}{7}4^7$.

The last question is trickier. There are $\dbinom{13}{2}$ ways to choose which two ranks we will have $2$ cards in, and for each choice there are $\dbinom{11}{3}$ ways to choose the ranks we will have singles of.

For each "double" rank selected, there are $\dbinom{4}{2}$ ways to choose the actual cards. For each "single" ranks selected, there are $\dbinom{4}{1}$ (that is, $4$) ways to choose the actual card, for a total of $$\binom{13}{2}\binom{11}{3}\binom{4}{2}^2\binom{4}{1}^3.$$

Your calculation for the last question almost works. If, as you did, we first select $5$ ranks, we must then choose from these $5$ the $2$ that we will have doubletons in. If we replace your $\dbinom{13}{5}$ by $\dbinom{13}{5}\dbinom{5}{2}$, we get an expression which is equal to my $\dbinom{13}{2}\dbinom{11}{3}$.

-
I see where I went wrong in the first two questions... I forgot to count the suits. However, where exactly did I go wrong in the last question? I see that I am off of your answer by a factor of $10$. To be more clear, what did I not count that you do count? –  CodeKingPlusPlus Jan 28 '13 at 2:23
@CodeKingPlusPlus: I added something that may help answer your question. –  André Nicolas Jan 28 '13 at 2:28
Thanks! How did you think of this ${5 \choose 2}$? My issue I am having in combinatorics is knowing whether I am correct or not. –  CodeKingPlusPlus Jan 28 '13 at 2:31
Well, as you can see the approach I described in the main post used $\binom{13}{2}\binom{11}{3}$, which feels more natural to me. I mentioned the alternative way because it shows that what you did can be modified to give the right answer. How one thinks of it is very difficult to answer. Mainly a whole lot of experience. –  André Nicolas Jan 28 '13 at 2:39