Ordinary and Exponential Generating Functions
Generating functions transform combinatorial problems into algebraic ones by encoding sequences as formal power series. The choice between ordinary and exponential generating functions depends on the combinatorial structure being counted.
For a sequence , the ordinary generating function is:
OGFs are natural for counting unordered structures, such as:
- Partitions of integers
- Compositions (ordered partitions)
- Paths in graphs
- Solutions to linear recurrences
For a sequence , the exponential generating function is:
EGFs are natural for counting labeled structures where order matters, such as:
- Permutations with restricted patterns
- Labeled graphs and trees
- Set partitions
- Arrangements with symmetries
The key difference is that OGF multiplication gives convolution , while EGF multiplication gives , which counts ways to partition an -set and apply operations to each part.
-
Geometric series: (counts for all )
-
Binomial series: (finite) or (for )
-
Fibonacci numbers: If satisfies with , then:
-
Catalan numbers: satisfies
-
Exponential function: (counts all permutations, )
-
Permutations: The EGF for is
-
Derangements: gives:
-
Bell numbers: The EGF is , encoding all set partitions
The product principle differs between OGF and EGF:
- OGF: If and , then where .
- EGF: If and , then where .
The binomial coefficient in EGF multiplication counts ways to select which elements get the first operation vs. the second.
Key operations on generating functions:
- Addition: corresponds to disjoint union
- Multiplication: corresponds to Cartesian product (with appropriate interpretation)
- Differentiation: shifts indices
- Integration:
- Substitution: for composition of structures (requires for OGF)
Find a closed form for with .
Let . Multiply the recurrence by and sum:
This gives:
Thus:
Comparing coefficients: for and for .
Generating functions provide a unified framework connecting combinatorics, algebra, analysis, and number theory through the language of formal power series.