[Math] In how many can $2$ apples, $3$ oranges, and $4$ mangoes be distributed to $3$ children if each child receives at least one fruit

combinatorics

In how many ways $2$ alike apple, $3$ alike orange and $4$ alike mango can be given to $3$ children if each child can have $1$ or more than $1$ fruits?

solution this is what I did.
total number of ways without any restriction $= 900$.
we have to subtract the case when at least one child doesn't get any fruit.
let that be $C_1 \cup C_2 \cup C_3$
and we use the principle of mutual inclusion and exclusion to find that.
$C_1 \cup C_2 \cup C_3 = C_1+C_2+C_3 – (\text{all two intersections}) + 3~\text{intersections}$ (no one gets a fruit case)
$= 3 \cdot 60 – 3+1 = 178$
so case where each child gets at least one fruit $= 900-178 = 722$.

Is this right, someone saying answer $= 49$

Can this be solved by generating functions?

Best Answer

As N. F. Taussig notes you are off by $1$. Denote by $C_i$ the set of distributions where child${}_{\,i}\>$ receives no fruit. Then $$|C_1\cup C_2\cup C_3|=\sum_i |C_i|-\sum_{i<j} |C_i\cap C_j|+|C_1\cap C_2\cap C_3|\ .\tag{1}$$ You correctly computed $|C_i|=60$ and $|C_i\cap C_j|=1$ when $i\ne j$, but $|C_1\cap C_2\cap C_3|=0$. The threefold intersection consists of all distributions where none of the children receives a fruit. But since in fact $9$ pieces are handed out at least one of the kids has to obtain one.

From $(1)$ we obtain $$|C_1\cup C_2\cup C_3|=3\cdot 60-3\cdot 1=177\ ,$$ so that the number of admissible distributions comes to $900-177=723$.

A generating function approach would not pay out: The allowed allocations for one child are encoded in the function $$p(x,y,z):={1\over (1-x)(1-y)(1-z)}-1={x+y+z-xy-xz-yz+xyz\over(1-x)(1-y)(1-z)}\ .$$ You would then have to determine the coefficient of $x^2y^3z^4$ in the power series for $\bigl(p(x,y,z)\bigr)^3$.