200 identical candies are to be sent to 5 families (A, B, C, D, E). If each family must get at least 3 candies and the family “A” cannot have more than 30 candies, how many different ways are there to distribute the candies?
-
Welcome to MSE. Please include your own thoughts and the effort made thus far, so that people can work with you accordingly. (Please add those in the body of the question instead of commenting.) – Lee David Chung Lin Feb 19 '20 at 12:48
3 Answers
Let $a_n$ be the number of ways to distribute $n$ candies to $4$ families. Then the answer is \begin{equation} \newcommand{\choose}[2]{\left(\begin{array}{c}#1\\#2\end{array}\right)} a_{170} + a_{171} + a_{197}. \end{equation} It can be shown that \begin{equation} a_n = \choose{n-9}{3}, \end{equation} hence the answer is \begin{equation} a_{12} + a_{13} + \cdots + a_{170} = \choose{161}{3} + \choose{162}{3} \cdots + \choose{188}{3}. \end{equation}
Combining my result and Iris's gives the following equation! :) \begin{equation} \choose{161}{3} + \choose{162}{3} \cdots + \choose{188}{3} = \choose{189}{4} - \choose{161}{4}. \end{equation}
- 904
We can give each family three candies first, so we have $200-3\times 5=185$ candies left to distribute.
Now we have total $\frac{189\times188\times187\times186}{4\times3\times2\times1}=51,494,751$ ways.
Since $A$ can’t get more than $30$ candies, we can minus the ways that $A$ get at least $31$ candies,which is:
First give $A$ $31$ candies, also $B,C,D,E$ get $3$ candies first, so we have $200-31-3\times4=157$ to distribute. So there are $\frac{161\times160\times159\times158}{4\times3\times2\times1}=26,964,280$ ways.
Hence there are $51494751-26964280=24530471$ ways.
By the way, in coming my previous result and Iris's result, I found the following equality!
\begin{equation} \newcommand{\choose}[2]{\left(\begin{array}{c}#1\\#2\end{array}\right)} \choose{n}{p} + \choose{n+1}{p} + \cdots + \choose{m}{p} = \choose{m+1}{p+1} - \choose{n}{p+1} \end{equation} where $m$, $n$, and $p$ are natural numbers satisfying $m\geq n\geq p$.
- 904