Generating functions turn counting problems into polynomial multiplication. Pack a die’s outcomes into a polynomial $g(x) = x + x^2 + \ldots + x^6$. Then the chance of rolling a total of $T$ with $k$ dice is just the coefficient of $x^T$ in $g(x)^k$. Counting becomes multiplying — and computers (or factoring tricks) do the heavy lifting.
β Intro Β· expand
Try first (productive failure)
Before the worked example: spend 60 seconds taking your best shot at this.
A guess is fine β being briefly wrong about a problem makes the explanation
land harder when you read it. This appears once per tutorial; skip
if you already know the trick.
60s
β Try first Β· expand
Worked example
Three fair six-sided dice are rolled. How many of the $6^3 = 216$ outcomes give a total of 10?
β Worked example Β· expand
Practice 1 of 3Type a fraction, decimal, or expression β mathjs parses it.
β Practice Β· expand
Reflection
Why does multiplying two generating functions give the convolution of their coefficient sequences — and what is it about “sum of $k$ independent things” that makes raising one gf to the $k$-th power the natural move? When would you reach for gfs instead of stars-and-bars or a direct recursion?