Generating Functions
"A generating function is a clothesline on which we hang up a sequence of numbers for display." — Herbert Wilf. This tool transforms problems about sequences into problems about functions.
Definition
Definition (Ordinary Generating Function)
The ordinary generating function (OGF) for a sequence is the formal power series:
Common Series
- Geometric Series: (Sequence: )
- Binomial Theorem: .
- Negative Binomial: .
Applications
1. Solving Recurrences
To solve with :- Multiply by and sum over .
- Express in terms of itself.
- Solve for algebraically.
- Expand back into a series to find the coefficient .
2. Combinatorics (Partitions)
The number of ways to make change for cents using coins of value is the coefficient of in:Snake Oil Method
A technique for evaluating combinatorial sums by treating them as coefficients in a product of generating functions.Practice Problems
Exercise (Problem 1)
Find the generating function for the sequence .
Exercise (Problem 2)
Find the closed form for the Fibonacci numbers using the generating function .
Exercise (Problem 3)
Find the coefficient of in .