Use generating functions to determine the number of different ways $12$ identical action figures can be given to $5$ children so that each child receives at most $3$ action figures
So far I have come up with the generating function of: $$(1 + x + x^2 + x^3)^5$$ To correspond to each child having either $0, 1, 2, $ or $3$ action figures with each child representing a factor. But, I am confused as to how to expand this. Any help is appreciated, thanks!
You're correct in forming the generating function
$$ F = (1 + x + x^2 + x^3)^5 $$
Now, you're looking for the coefficient of $x^{12}$ (Since each $x$ represents a figure, you want 12 of them. The coeffieint will tell you the number of ways $G$ produced the $12$ - which to us gives the number of ways to distribute $12$)
However, expanding it out makes us lose the advantage of using generating functions in the first place. Rather, we can notice that
$$ 1 + x + x^2 + x^3$$ is a geometric series starting from the term $1$, with common ratio $x$, and 4 total terms.
The formula for any geometric series with $n$ terms that has starting term $a$ and common difference $r$ is
$$ G = a + ar + ar^2 + \ldots + ar^n = a\times \frac{r^n - 1}{r - 1} $$
Hence, for us,
$$ a = 1 \\r = x \\ n = 3 $$
Hence,
$$F = \left (1 \times \frac{x^4 - 1}{x - 1}\right)^5 = \left (\frac{x^4 - 1}{x - 1}\right)^5 $$
Simplify $F$ using the binomal theorem and take the coefficient of $x^{12}$ to arrive at the answer