Home › Combinatorics › Lesson 6

Exponential Generating Functions and the Exponential Formula

Lesson 6 of 13

Key idea of this section

Â(x) = ∑ₙ aₙ xⁿ/n!   for labelled structures
labelled product ↔ ·B̂,   set of components ↔ exp(Ĉ),   cycles ↔ log 1/(1 − Â)

Labelled classes

In a labelled class, an object of size n carries the labels 1, …, n on its atoms (a permutation, a set partition, a graph on vertex set [n]). Its exponential generating function (EGF) is Â(x) = ∑ aₙ xⁿ/n!. The labelled product of two classes consists of pairs (α, β) together with a relabelling: if α has size k and β has size n − k, we choose which k of the labels [n] go to α, in C(n, k) ways, and relabel order-preservingly. Hence the number of labelled products of size n is ∑ₖ C(n, k) aₖ bₙ₋ₖ, which is exactly n! [xⁿ] Â(x)B̂(x). This binomial convolution is the reason for the factorials.

Sets, sequences and cycles

Taking a labelled product of k copies of 𝒞 and forgetting the order of the factors (which, since labels are distinct, produces each unordered set exactly k! times) shows that the class of sets of k components has EGF Ĉ(x)ᵏ/k!, and the class of all sets of components has EGF exp(Ĉ(x)), provided c₀ = 0. Similarly, sequences have EGF 1/(1 − Ĉ) and cycles (sequences up to rotation) have EGF log(1/(1 − Ĉ)), since a cycle of k components arises from exactly k sequences.

Theorem 6.1 (The exponential formula). If every object of a labelled class 𝒜 decomposes uniquely as a set of connected components belonging to a class 𝒞 (with c₀ = 0), then Â(x) = exp(Ĉ(x)).

Examples

A permutation is a set of disjoint cycles. There are (k − 1)! cyclic orders on a k-set, so the EGF of a single cycle is ∑ (k − 1)! xᵏ/k! = ∑ xᵏ/k = log 1/(1 − x), and the exponential formula returns exp(log 1/(1 − x)) = 1/(1 − x) = ∑ n! xⁿ/n!, as it must. Removing 1-cycles gives the derangements: exp(log 1/(1 − x) − x) = e⁻ˣ/(1 − x), whose coefficients are the partial sums found in Lesson 3. Allowing only cycles of length 1 and 2 gives the involutions, with EGF exp(x + x²/2); differentiating, I′(x) = (1 + x)I(x), which translates into the recurrence Iₙ = Iₙ₋₁ + (n − 1)Iₙ₋₂, so I₀, …, I₈ = 1, 1, 2, 4, 10, 26, 76, 232, 764.

A set partition is a set of nonempty blocks, and a block of size k is a single structure, so blocks have EGF eˣ − 1 and set partitions have EGF exp(eˣ − 1), the EGF of the Bell numbers (Lesson 7). Forbidding singleton blocks gives exp(eˣ − 1 − x), with coefficients 1, 0, 1, 1, 4, 11, 41, 162, …

Connected graphs

Let gₙ = 2C(n,2) be the number of labelled graphs on [n] and cₙ the number of connected ones. Every graph is a set of connected components, so ∑ gₙ xⁿ/n! = exp(∑ cₙ xⁿ/n!), and therefore Ĉ(x) = log Ĝ(x) as formal power series, although Ĝ has radius of convergence 0. Extracting coefficients is equivalent to the recurrence gₙ = ∑ₖ C(n − 1, k − 1) cₖ gₙ₋ₖ, obtained by classifying graphs according to the component containing vertex n. It gives c₁, …, c₅ = 1, 1, 4, 38, 728.

Lagrange inversion and Cayley's formula

Theorem 6.2 (Lagrange inversion). Let φ(t) be a formal power series with φ(0) ≠ 0, and let T(x) be the unique formal power series with T(0) = 0 satisfying T = x φ(T). Then for n ≥ 1, [xⁿ] T(x) = (1/n) [tⁿ⁻¹] φ(t)ⁿ.

A rooted labelled tree is a root together with a set of rooted subtrees attached to it, so the EGF T(x) of rooted labelled trees satisfies T = x exp(T). Lagrange inversion with φ = eᵗ gives [xⁿ] T = (1/n) nⁿ⁻¹/(n − 1)! = nⁿ⁻¹/n!. Hence there are nⁿ⁻¹ rooted labelled trees on [n], and, since each unrooted tree can be rooted in n ways, nⁿ⁻² labelled trees: Cayley's formula (1889), first found by Borchardt in 1860 and given a bijective proof by Prüfer in 1918 (Lesson 12). More generally, [xⁿ] H(T(x)) = (1/n) [tⁿ⁻¹] H′(t)φ(t)ⁿ; taking H(t) = tᵏ/k! shows that there are C(n − 1, k − 1) nⁿ⁻ᵏ forests of k rooted trees on [n].

Exercise

  • (a)
    How many partitions of [6] have all blocks of even size?
  • (b)
    How many permutations of [6] have only cycles of odd length?
  • (c)
    Use the recurrence for involutions to compute I₉ and I₁₀.
Show solution

Answers: (a) The EGF is exp(cosh x − 1); directly, block-size patterns {6}, {4, 2} and {2, 2, 2} give 1 + 15 + 15 = 31. (b) The EGF is exp(∑ over odd k of xᵏ/k) = √((1 + x)/(1 − x)); the count is 225 (the sequence is 1, 1, 1, 3, 9, 45, 225, …). (c) I₉ = 764 + 8·232 = 2620 and I₁₀ = 2620 + 9·764 = 9496.

V.3.1