Generating Functions - Core Definitions
Generating functions provide a powerful algebraic tool for encoding sequences as formal power series. This transformation allows us to apply techniques from analysis and algebra to solve discrete problems, bridging the gap between combinatorics and continuous mathematics.
The ordinary generating function (OGF) for a sequence is the formal power series:
We treat this as a formal object without worrying about convergence, though analytic properties become relevant in many applications.
The term "formal" means we manipulate these series algebraically without concern for convergence. The variable serves as a placeholder marking position in the sequence.
Several fundamental sequences have simple generating functions:
-
Constant sequence :
-
Natural numbers :
-
Powers of 2 :
-
Binomial coefficients for fixed : The -th coefficient of is .
The exponential generating function (EGF) for a sequence is:
EGFs are particularly useful for counting labeled structures where order matters.
The factorial denominators in EGFs naturally account for the number of ways to arrange labeled objects, making them ideal for permutation problems.
Given sequences and with generating functions and :
- Addition: generates
- Multiplication: generates (convolution)
- Scalar multiplication: generates
- Shifting: generates with zeros
- Differentiation: generates
The convolution property is particularly powerful: the product of generating functions corresponds to the convolution of sequences. This transforms summations into algebraic operations. For instance, to count the number of ways to select objects from two different collections, we multiply their generating functions. This principle underlies the use of generating functions in partition theory, where we encode the ways to write integers as sums.
Generating functions transform sequence problems into problems about functions, where we can leverage our intuition and tools from calculus and algebra to obtain results that would be difficult to derive directly.