Exponential Generating Functions
Definition and Basic Properties
An exponential generating function (EGF) encodes a sequence by attaching a factorial denominator to each term. Where an ordinary generating function (OGF) stores the sequence as , an EGF stores it as:
That in the denominator is the whole point. It's what makes EGFs naturally suited to labeled objects, where the order in which you assign labels matters. Dividing by bakes in the bookkeeping for all possible labelings, so when you multiply two EGFs together, the algebra automatically handles the combinatorics of merging labeled sets.
A few foundational EGFs to know:
- is the EGF for the constant sequence , since every coefficient .
- is the EGF for the sequence , since the coefficient of is .
- is the EGF for , which drops the constant term. This is useful when you need "at least one" of something.
As with OGFs, EGFs are treated as formal power series. You don't worry about whether the series converges; you just manipulate coefficients algebraically.
Why EGFs Instead of OGFs?
The choice between OGF and EGF comes down to whether your objects are unlabeled or labeled.
- OGFs count combinations of unlabeled objects (e.g., how many ways to choose 5 identical balls from 3 bins).
- EGFs count arrangements of labeled objects (e.g., how many ways to assign 5 distinct people to 3 committees).
The product of two EGFs automatically performs a binomial convolution: if is the EGF for and is the EGF for , then the coefficient of in is:
That binomial coefficient is exactly what you need when you're splitting a set of labeled objects into a subset of size and a subset of size . This is why multiplication of EGFs corresponds to partitioning labeled objects into two independent structures.
Constructing Exponential Generating Functions

Basic Construction Techniques
To build an EGF for a counting problem:
- Define the sequence. Let be the number of labeled structures on elements that you want to count.
- Write the series. Form .
- Recognize or simplify. Try to express in closed form using known functions.
Some standard EGFs worth memorizing:
| Sequence | EGF | Notes |
|---|---|---|
| Every | ||
| Nonempty sets | ||
| Odd-size sets only | ||
| Even-size sets only | ||
| Counts all permutations | ||
| Operations on EGFs: |
- Addition: adds sequences term by term. Use this for unions of disjoint classes of structures.
- Multiplication: performs binomial convolution. Use this when you independently build a structure on one labeled subset and another structure on the remaining labels.
Advanced Construction Methods
- Differentiation of an EGF shifts the sequence: if is the EGF for , then is the EGF for . Combinatorially, differentiating often corresponds to marking a distinguished element (choosing one labeled object to treat specially).
- Integration reverses this. Integrating (with constant of integration 0) gives the EGF for , shifted the other way. This can represent "unmarking" or accumulating a sum.
- Composition is where EGFs get really powerful. The compositional formula (also called the exponential formula) says: if is the EGF for connected structures with , then
is the EGF for structures that are sets of those connected components. For example, since the EGF for a single connected cycle on vertices is , the EGF for permutations (which are sets of cycles) is , confirming that there are permutations of elements.
More generally, if is the EGF for structures placed on each block and is the EGF for the "outer" partitioning structure, then the composition counts the combined labeled structure.
Interpreting Coefficients of EGFs

Basic Interpretation
To extract a count from an EGF:
- Find the coefficient of in (call it ).
- Multiply by to recover .
Equivalently, , which is the same as reading off the coefficient of .
Why the factorial matters: The in the denominator accounts for all possible ways to assign distinct labels. When you multiply two EGFs, the binomial convolution automatically counts how to split labels between two substructures. So the coefficient you extract already reflects labeled counting.
Interpreting products: If , then for the product counts the number of ways to choose a subset of , build an -structure on , and build a -structure on the complement.
Advanced Interpretation Techniques
- Alternating signs in the coefficients often signal an inclusion-exclusion argument. For instance, the EGF for derangements involves , and expanding it gives the familiar alternating sum .
- Composed EGFs like have coefficients that count partitions of into blocks, with each block carrying a -structure. The Bell numbers arise from , where each block is simply a nonempty set.
- Asymptotic analysis of EGF coefficients uses tools from analytic combinatorics (singularity analysis, saddle-point method). For this course, the key idea is that the dominant singularity of controls the growth rate of . For example, has a singularity at , consistent with growing factorially.
Counting Labeled Objects with EGFs
Problem-Solving Approach
Here's a general strategy for EGF-based counting problems:
- Model the structure. Decide what a "labeled structure on elements" looks like for your problem.
- Decompose. Break the structure into independent parts (e.g., "partition into blocks, then arrange within each block").
- Translate to EGFs. Write the EGF for each component. Use multiplication for independent labeled parts, composition for nested structures, and the exponential formula for "sets of connected pieces."
- Simplify. Use algebra, known series, or differential equations to get a closed form.
- Extract coefficients. Read off from the result to get your answer.
Common Problem Types and Techniques
Derangements: A derangement is a permutation with no fixed points. The EGF is:
This comes from the product of the EGF for "all permutations" () with an inclusion-exclusion correction (). Extracting coefficients gives .
Set partitions and Bell numbers: The number of ways to partition into nonempty subsets is the Bell number . Since a set partition is a "set of nonempty sets," the exponential formula gives:
Surjections: The number of surjective functions from an -set onto a -set can be extracted from the EGF , since each of the target elements must have a nonempty preimage.
Labeled trees: By Cayley's formula, there are labeled trees on vertices. The EGF for labeled rooted trees satisfies , and the EGF for unrooted labeled trees is .
Labeled graphs: The EGF for labeled connected graphs can be obtained from the EGF for all labeled graphs (which is ) via the logarithm of the exponential formula: if is the EGF for all labeled graphs, then is the EGF for connected labeled graphs.