How many ways are there to distribute 5 distinguishable balls between 3 kids such that each of them gets at least one ball?
My approach is $ \binom{5}{3} 3! $ + $ \binom{2}{2} \binom{3}{2}2!$ which is equal to $66$?
How many ways are there to distribute 5 distinguishable balls between 3 kids such that each of them gets at least one ball?
My approach is $ \binom{5}{3} 3! $ + $ \binom{2}{2} \binom{3}{2}2!$ which is equal to $66$?
It’s not the quickest or most elegant approach, but this problem is straightforwardly done by considering cases. If each kid gets at least one ball, the balls must be distributed either $3$-$1$-$1$ or $2$-$2$-$1$.
$3$-$1$-$1$: There are $\binom31=3$ ways to choose which kid gets $3$ balls, and $\binom53=10$ ways to choose $3$ balls for that kid. There are then $2$ ways to distribute the remaining $2$ balls to the other $2$ kids. This case therefore accounts for $3\cdot10\cdot2=60$ possible distributions.
$2$-$2$-$1$: There are $3$ ways to choose which kid gets only $1$ ball, and $5$ ways to pick the ball for that kid. There are then $\binom42=6$ ways to choose which $2$ balls go to the next kid in line, and the remaining kid gets the remaining $2$ balls. This case accounts for another $3\cdot5\cdot6=90$ possible distributions.
The correct total, therefore, is $60+90=150$.
Added: It appears to me that you reasoned something like this: First we choose $3$ of the $5$ balls and distribute one of them to each kid; that can be done in $\binom533!$ ways. Then we take both of the remaining $2$ balls, pick $2$ of the $3$ kids, and distribute the last $2$ balls in one of the $2$ possible ways to the $2$ lucky kids. There are several problems with this approach.
You’ve considered only the second of my two cases.
You’re combining the results of successive choices, not the counts of disjoint cases, so you should be multiplying, not adding: $\binom533!\cdot\binom22\binom322!=60\cdot6=360$.
You’re overcounting. Suppose that the balls are labelled A, B, C, D, and E. Then you’ve counted the distribution AD | BE | C four times:
There is a reasonably nice Inclusion/Exclusion way of counting. Forget temporarily about the at least one ball restriction. For each ball, there are $3$ choices for who will get it, for a total of $3^5$.
Now let's count the bad distributions, where one or more kid is left out. We can choose who gets left out in $\binom{3}{1}$ ways. For each choice, there are $2^5$ ways to distribute the balls, for a total of $\binom{3}{1}2^5$.
However, we have double counted the distributions in which a kid gets all the balls, so we must subtract $3$.
It follows that there are $93$ bad distributions. Subtract this from the $3^5=243$.
Remark: The idea generalizes.
otal
.)
– Lord_Farin
Jun 13 '13 at 07:27
$$\sum_{r_1+r_2+r_3=5,r_i\geq1}\binom{5}{r_1}\binom{5-r_1}{r_2}\binom{5-r_1-r_2}{r_3}=$$
$$=\sum_{r_1+r_2+r_3=5,r_i\geq1}\frac{5!}{r_1!r_2!r_3!}=\frac{5!}{1!1!3!}+\frac{5!}{1!3!1!}+\frac{5!}{3!1!1!}+\frac{5!}{1!2!2!}+\frac{5!}{2!1!2!}+\frac{5!}{2!2!1!}=$$ $$=3(20+30)=150$$
This is similar as total Number of onto functions from $m$ elements to $n$ elements:
$$\sum_{k=0}^n(-1)^k\binom{n}k(n-k)^m\;$$
Given that $m=5$ and $n=3$.
So, total number of ways such that each of them gets at least one ball
$=3^5-^3C_1(3-1)^5+^3C_2(3-2)^5-^3C_3(3-3)^5$
$=150$
Given the variety of methods applied in the previous answers, I can't resist demonstrating one more: an exponential generating function. Readers not familiar with generating functions can find many resources in the answers to this question: How can I learn about generating functions?
More generally, we might ask the question of how many ways we can distribute $r$ distinguishable balls among three kids, with each kid getting at least one ball. Let's say the answer is $a_r$, and define the exponential generating function of $a_r$ as $$f(x) = \sum_{r=0}^{\infty} \frac{1}{r!} a_r x^r$$
The exponential generating function of the number of ways to distribute $r$ balls to a single kid is $$x + \frac{1}{2!} x^2 + \frac{1}{3!} x^3 + \dots = e^x -1 $$ and the number of ways to distribute $r$ balls to three kids is the "star product" of three such sequences, so $$f(x) = (e^x-1)^3 = e^{3x} - 3 e^{2x} + 3 e^x -1$$ The answer to the general problem, $a_r$, is $r![x^r]f(x)$, i.e. $r!$ times the coefficient of $x^r$ when $f(x)$ is expanded as an infinite series. Recalling the infinite series for $e^x$, we see that $$a_r = 3^r - 3 \cdot 2^r + 3$$ for $r >0$. In the particular case $r=5$, this yields $a_5 = 150$.