# Number of ways to distribute ice cream to children.

A certain school of 10 children is visiting the local ice-cream factory to see how ice-cream is made. After the demonstration, the factory has 15 scoops of vanilla ice-cream and 2 scoops of chocolate ice-cream to distribute to the kids. How many ways can the ice-cream be distributed if each child must receive at least one scoop of ice-cream?

My solution to this is by partitioning the set of ways by the number of chocolate scoop a child will get. Let $$C$$ be the set of ways to distribute all the ice cream and let $$C_1,C_2 \subset C$$, where $$C_i$$ is the set where a child gets $$i$$ scoops of chocolate ice cream. $$C_1 = \ {10}\choose{2}\cdot{8}\choose{8}\cdot{10}\choose{7}=5,400\ ways$$, where we must first distribute the 2 scoops of chocolate ice cream to the 10 children ($${10}\choose{2}$$), then give those who are not given a scoop of chocolate ice cream a scoop of vanilla ice cream ($${8}\choose{8}$$), and lastly I distribute the remaining 7 vanilla ice cream to all 10 children ($${10}\choose{7}$$). In the same manner, $$C_2 = {10}\choose{1}\cdot{9}\choose{9}\cdot{10}\choose{6}$$ $$=2,100$$ ways. Hence $$C = C_1 + C_2 = 7,500 \$$ ways.

Is this correct?

• Why don't you allow the same kid to get two scoops of chocolate?
– YJT
Commented Jul 15, 2020 at 9:22
• Not correct. What about the case when no one gets choco scoop?
– Koro
Commented Jul 15, 2020 at 9:29
• @YJT You're right, I'll edit that. Commented Jul 15, 2020 at 9:30
• @Koro I think that's not possible since all ice cream must be distributed. Commented Jul 15, 2020 at 9:30
• I don’t see anywhere in the question the requirement that all scoops must be distributed. Commented Jul 15, 2020 at 9:41

There are two options (assuming all scoops must be distributed):

One kid gets both scoops of chocolate You need to choose the lucky one ($$10$$) options, then give one vanilla to the rest. You are left with 6 vanilla scoops to give the 10 children. It is equivalent to the number of solutions to $$x_1+\ldots+x_{10}=6$$ with $$x_i\geq 0$$, which is $${10+6-1 \choose 10}$$.

Two kids get chocolate You need to choose the two ($${10 \choose 2}$$) then give the 8 kids a scope of vanilla. You are left with 7 vanilla to give the 10 children, so the same as above with different numbers.

Total $$10 {15 \choose 10} + {10 \choose 2}{16 \choose 10}$$

• There are 10 children. Commented Jul 15, 2020 at 9:46
• Yes, got confused. Edited.
– YJT
Commented Jul 15, 2020 at 9:48
• I see my mistake, I did not consider if a child gets more than one vanilla ice cream. Commented Jul 15, 2020 at 9:52

Total ways to distribute $$15V+2C$$ among $$10$$ kids: $$\binom{10-1+15}{15}\binom{10-1+2}{2}$$ subtract the number of ways one kid gets nothing: $$10\times\binom{9-1+15}{15}\binom{9-1+2}{2}$$ add the number of ways two kids get nothing: $$\binom{10}{2}\times\binom{8-1+15}{15}\binom{8-1+2}{2}$$ and so on. In total: $$\binom{10-1+15}{15}\binom{10-1+2}{2}-\sum_{k=1}^{9}(-1)^{k-1}\binom{10-k-1+15}{15}\binom{10-k-1+2}{2}$$

First notice that there are two cases for the distribution of $$2$$ chocolate scoops. Either $$2$$ of them go to the same child, or they go to $$2$$ different child.

$$2$$ chocolate scoops go to the same child
There are 10 ways of giving 2 chocolate scoops to the same child. Every child must get one scoop of ice-cream. There are 10 ways of doing it. Therefore, we give every child a scoop of vanilla ice-cream except the one having two chocolate scoops. After this we have $$6$$ scoops of vanilla ice cream remained. We can distribute it randomly to the $$10$$ students. Using the combination with repetition formula, $$10{n+k-1\choose k}=10{10+6-1\choose10}=30030$$

$$2$$ chocolate scoops go to the $$2$$ different child
In this case, there are $${10\choose2}$$ way to distribute the chocolate scoops. Then give every student a scoop of ice-cream except the $$2$$ students with chocolate scoops, We have $$7$$ scoops of ice-cream remained. Again with the combination with repetition formula, we have $${10\choose2}\cdot{10+7-1\choose10} = 8008$$

The answer is thus $$30030 +8008 = 38038$$.