5

You have 10 different types balls to choose from. How many different ways are there to choose 5 balls such that no type of ball appears more than twice.

My attempt:

Case 1 (selecting different types): analogues to choosing 5 elements from a set of 10 - 10C5 = 252

Case 2 (1 element repeats twice) - 10C4 to select 4 objects and 4 to select which appears twice - 10C4*4 = 840

Case 3 (2 elements repeat) - 10C3 to select 3 objects and 3 to select which appears once - 10C3*3 = 360

Total : 252 + 210 + 360 = 1452

Thanks,

O L
  • 293
  • if all the balls are different then no matter which 5 balls you choose, they all will always be different. – Vikram Jan 30 '15 at 16:47
  • Looks good. To be rigorous, it may be helpful to mention that there are no ways that you can have 3 or more elements repeat (since that would require at least 6 balls), but in an informal setting like in homework or on a test this looks just fine. – JMoravitz Jan 30 '15 at 16:49
  • 1
    @Vikram you didn't read the question correctly. He is allowed more than one of the same type of ball (presumably). I expect it is a typo at the beginning. "10 different (types of) balls to choose from", in which case his answer is correct. If indeed there is exactly one of each type of ball available to grab, then there is no way to grab 2 or more of the same type, so it would just be $\binom{10}{5}$ as you say. – JMoravitz Jan 30 '15 at 16:50
  • Vikram; indeed it is supposed to be different types. edited. thanks for the comments – O L Jan 30 '15 at 17:14

1 Answers1

1

Suppose you have $k$ different balls and you want to count how many ways you can choose $n$ balls with replacement such that each ball is chosen less than $\mu$ times. Let $x_i$ be the number of times you pick up ball $i$. Then we are counting the number of non-negative integer solutions to

$$ x_1 + x_2 + ... + x_k = n $$

where we have the constraint $x_i < \mu$ for each ball. We can solve this using inclusion exclusion. If $S$ is the set of unconstrained solutions and $P_i$ is the subset with $x_i \geq \mu$, then we have

$$ \begin{array} (| S - (P_1 \cup P_2 \cup ... \cup P_k )| &= & |S| \;\;-\;\; \sum_i |P_i| \;\;+ \;\;\sum_{i,j} |P_i \cap P_j| \;\; - \;\; ... \\ \; &= & {n+k-1 \choose k-1} \;-\; k {n+k-1-\mu \choose k-1} \;+\; {k \choose 2} {n+k-1-2\mu \choose k-1} \;\;-\;\; ... \\ && \\ \; &= &\sum_{i=0}^\gamma \; (-1)^i {k \choose i} {n+k-1-i\mu \choose k-1} \end{array} $$

Where $\gamma = \min \{k, \lfloor \tfrac{n}{\mu} \rfloor \}$. Plugging in the values $k=10, n=5, \mu=3$ solves the question you posed.

$$ \begin{array} ( \sum_{i=0}^{1} \; (-1)^i {10 \choose i} {14-3i \choose 9} = 1452 \end{array} $$


I explained everything in a recent post solving a similar problem.