Generating function: Collecting dollars from children and adults.

45 Views Asked by At

Here is the problem:

In how many ways can I collect a total of $20$ dollars from $4$ different children and $3$ different adults, if each child can contribute up to $6$ dollars, each adult can give up to $10$ dollars, and each individual gives a nonnegative whole number of dollars?


What I have tried:

So the generating function for the children is $(1+x+x^2+\dots+x^6)$ and for the adults $(1+x+x^2+\dots+x^{10})$. So the total generating function is $(1+x+x^2+\dots+x^6)^4(1+x+x^2+\dots+x^{10})^3$. This can be re-written as $\frac{(1-x^6)^4(1-x^{10})^3}{(1-x)^7}$. This is equivalent to $\frac{1-4x^6-3x^{10}+6x^{12}+12x^{16}-4x^{18}+3x^{20}}{(1-x)^7}$(We ignore all terms in the numerator with denominator greater than 20). This means the final answer is $\binom{26}{6}-4\binom{20}{6}-3\binom{16}{6}+6\binom{14}{6}+12\binom{10}{6}-4\binom{8}{6}+3\binom{6}{6}$, which is equivalent to $71595$.

But sadly, this is not the right answer. Where am I wrong, and how can I fix the part where I messed up? ONLY hints please!

Thanks,

Max0815

1

There are 1 best solutions below

1
On BEST ANSWER

You have made two mistakes in summing the geometric series.

$$1 + x + x^2 + \dots + x^6 = \frac{1-x^\color{red}{7}}{1-x}$$

and

$$1 + x + x^2 + \dots + x^{10} = \frac{1-x^\color{red}{11}}{1-x}$$