In how many ways can we distribute $11$ oranges and $6$ pears to $3$ kids, such that each kid gets at least $3$ orange and a maximum of $2$ pears?
I guess the generating function for the distribution of oranges is $(x^3+x^4+x^5)^3$. It doesn't have $x^6$ because if one kid had six oranges, then $11-6=5$ and one kid would have less than $3$ oranges. Then eash kid must have at least $3$, with a total of $9$. Then we must find the value of the coefficients from $x^9,x^{10},x^{11}$ on $(x^3+x^4+x^5)^3$.
Writing it as:
$$(x^3+x^4+x^5)^3=x^9(1+x+x^2)^3$$
Then we have to find the coefficients of $x^{9-9},x^{10-9},x^{11-9}=x^{0},x^{1},x^{2}$ in $(1+x+x^2)^3$. Rewriting it:
$$(1+x+x^2)^3=\left[\frac{1-x^3}{1-x}\right]^3=(1-x^3)^3 \left[ \frac{1}{1-x}\right]^3$$
Then:
$$(1-x^3)^3=\sum_{i=0}^3(-1)^i{3\choose i}x^{3i}\tag{A}$$
And:
$$\left[\frac{1}{1-x}\right]^3=\sum_{i=0}^{\infty}{3+i-1 \choose i}x^i\tag{B}$$
Then the coefficients for this part of the problem should be:
$$A_0B_0+A_0B_1+A_0B_2={3\choose 0}{2\choose 0}+{3\choose 0}{3\choose 1}+{3\choose 0}{4\choose 2}=1+3+6=10$$
And this number is bigger than the actual answer. I was planning to multiply this number by the result of the generating function for the pears, but I guess it's going to be bigger and farther from the answer. I tried to combine both generating functions, but it seems to cause a big hurdle to computation: $(1+ax+a^2x^2)^3 (b^3 x^3 + b^4 x^4 + b^5 x^5)^3$
Perhaps I am mistaken, but I don't know how to proceed to calculate this with generating functions.
If each of the three children receives a maximum of two of the six pears, then each child must receive two pears. If each of the three children receives at least three oranges, then there are two remaining oranges to distribute among the three children. This is equivalent to solving the equation $x_1 + x_2 + x_3 = 2$ in the non-negative integers, which can be done in $\binom{4}{2} = 6$ ways since it is the number of ways we can place two addition signs in a list of two ones.