# 指数生成函数

指数生成函数（EGF）将一个计数序列 \((a_n)\) 对应到形式幂级数（类似多项式的无限和，按代数方式而非数值方式处理） \(\sum a_n x^n/n!\)，其定义与 \(e^x\) 的幂级数平行，并与普通生成函数 \(\sum a_n x^n\) 形成对照。<sup>[1](https://www.appliedcombinatorics.org/book/s_genfunction_exponential.html)</sup> 当被计数的对象位于一个*带标号*的 n 元集上时——例如排列、集合划分或带标号树——EGF 是枚举组合学的标准工具，而定义 \(F(x) = \sum f(n) x^n/n!\) 的构造方式使得级数的代数与带标号构造的代数相互对应。<sup>[2](https://enumeration.ca/extensions/labelled-constructions/)</sup><sup> • </sup><sup>[3](https://math.berkeley.edu/%7Emhaiman/math172-spring10/exponential.pdf)</sup>

| 关键事实 | 陈述 |
|---|---|
| 定义 | \((a_n)\) 的 EGF 是 \(\sum a_n x^n/n!\)；系数按 \(n!\) 缩放<sup>[2](https://enumeration.ca/extensions/labelled-constructions/)</sup> |
| 系数提取 | \(a_n = n! \, [x^n] F(x)\)，因此，定义中除以 \(n!\) 的操作在提取时通过乘以 \(n!\) 抵消<sup>[2](https://enumeration.ca/extensions/labelled-constructions/)</sup> |
| 乘积 | 将 EGF 相乘会执行二项型卷积，计数互补标号子集上的一对结构<sup>[4](https://math.mit.edu/~fgotti/docs/Courses/Combinatorial%20Analysis/18.%20Exponential%20Generating%20Functions%20I/Exponential%20Generating%20Functions%20I.pdf)</sup> |
| SET 构造 | 若 \(C = \mathrm{SET}(A)\)，则 \(C(z) = \exp(A(z))\)<sup>[2](https://enumeration.ca/extensions/labelled-constructions/)</sup> |
| 指数公式 | 整体结构 EGF = 连通分量 EGF 的指数，\(C(x) = e^{B(x)}\)<sup>[5](https://fardila.com/Articles/methods.pdf)</sup> |
| 排列 | \(\mathrm{SET}(\mathrm{CYC}(\mathcal{Z}))\) 给出 EGF \(1/(1-z) = \sum n! z^n/n!\)<sup>[2](https://enumeration.ca/extensions/labelled-constructions/)</sup> |
| 集合划分 | \(\mathrm{SET}(\mathrm{SET}_{\geq 1}(\mathcal{Z}))\) 给出 EGF \(e^{e^z - 1}\)，即贝尔数 EGF<sup>[2](https://enumeration.ca/extensions/labelled-constructions/)</sup> |

## 定义与标号的作用

序列 \((c_n)\) 的 EGF 是 \(C(z) = \sum_{n\geq 0} (c_n/n!) z^n\)，即系数按 \(n!\) 缩放的那个幂级数。<sup>[2](https://enumeration.ca/extensions/labelled-constructions/)</sup> 这种缩放并非为了方便而设的约定；正是它使代数与带标号组合学相匹配。瓦格纳（Wagner）的滑铁卢课程讲义将其呈现为将这类组合数学转化为代数的恰当方式，并由二项型卷积完成编码。<sup>[6](https://www.math.uwaterloo.ca/~dgwagner/co430II.pdf)</sup>

要看清 \(n!\) 带来了什么，可比较序列类 \(\mathrm{SEQ}(\mathcal{Z})\)，即带标号原子的一个线性顺序。在无标号情形下，每个大小恰有一个序列，所以 OGF 是 \(1/(1-z)\)。在带标号情形下，大小为 n 的序列有 n! 个，因为标号可以任意排序。除以 \(n!\) 之后，带标号原子序列的指数生成函数为 \(1/(1-z)\)，而无标号原子序列的普通生成函数为 \(1/(1-z)\)、指数生成函数为 \(e^z\)：\(n!\)<sup>[11](https://www.ic.unicamp.br/~celio/peer2peer/math/bitmap-algorithms/flajolet-sedgewick-analytic-combinatorics.pdf)</sup> 修正抵消了带标号序列的重标号重数，但并不会使它们的 EGF 等于无标号序列的 EGF。<sup>[2](https://enumeration.ca/extensions/labelled-constructions/)</sup> 这就是为什么伯克利（Berkeley）的讲义将 EGF 描述为专为如下问题设计：结构被指定在一个 n 元集的元素上，而我们计数的是将该集合安排进该结构的各种方式。<sup>[3](https://math.berkeley.edu/%7Emhaiman/math172-spring10/exponential.pdf)</sup>

恢复系数是相反的操作：从 EGF \(F(z)\) 出发，计数为 \(a_n = n!\) 乘以 \(F(z)\) 中 \(z^n\) 的系数。

## 运算及其组合意义

与普通生成函数一样，EGF 可以相加、相乘和求导，而每个解析运算都对应一个组合构造。<sup>[4](https://math.mit.edu/~fgotti/docs/Courses/Combinatorial%20Analysis/18.%20Exponential%20Generating%20Functions%20I/Exponential%20Generating%20Functions%20I.pdf)</sup>

**和** 对应于不交并：若一个类分裂为两个不交的子类，则其 EGF 是二者 EGF 之和。

**乘积** 是带来阶乘缩放的那个运算。假设在一个 n 元集上放置 α 结构有 \(a_n\) 种方式，放置 β 结构有 \(b_n\) 种方式。一个组合结构由标号的一个子集上的 α 结构与互补子集上的 β 结构组成。选择哪 k 个标号进入 α 部分有 \(\binom{n}{k}\) 种方式，所得系数是卷积和 \(\binom{n}{k} a_k b_{n-k}\)，恰好是两个 EGF 乘积的系数。<sup>[4](https://math.mit.edu/~fgotti/docs/Courses/Combinatorial%20Analysis/18.%20Exponential%20Generating%20Functions%20I/Exponential%20Generating%20Functions%20I.pdf)</sup>

**对标记变量求导** 计数带有标记分量的结构。在排列 EGF 中标记循环，得到双变量级数 \(S(u,z) = e^{u \log(1/(1-z))}\)；对 u 求导并令 u = 1，表明大小为 n 的排列中循环的平均个数是调和数 \(H_n = \sum_{k=1}^n 1/k\)。<sup>[2](https://enumeration.ca/extensions/labelled-constructions/)</sup>

**复合** 对应于替换：将一个带标号结构的每个原子替换为另一个类的整个带标号结构，就复合了 EGF。普林斯顿（Princeton）《解析组合学》习题集要求读者将 \(\tan(\tan z)\) 和 \(\tan(e^{z} - 1)\) 解释为组合类的 EGF，把每个复合读作将一个带标号类替换到另一个类的原子中。<sup>[7](https://ac.cs.princeton.edu/20egf/)</sup>

## 带标号结构的符号方法

带标号符号方法确定了一小部转换规则词典，将类上的构造转换为 EGF 上的运算。塞奇威克（Sedgewick）的《解析组合学》讲义将其列成表：不交并转换为 EGF 相加，带标号乘积转换为乘法，\(\mathrm{SEQ}(A)\) 转换为 \(1/(1 - A(z))\)，\(\mathrm{SET}(A)\) 转换为 \(\exp(A(z))\)，\(\mathrm{SET}_k(A)\) 转换为 \(A(z)^k/k!\)，循环转换为对数形式。<sup>[8](https://sedgewick.io/wp-content/uploads/2022/04/AC02-EGFs.pdf)</sup> 用这些构造子写出的规格说明成为 EGF 的函数方程，解出该方程就解决了枚举问题。

一个常用的技巧是用空结构分解基础类。所有集合构成的类有 EGF \(e^{x}\)，而仅含空集的类有 EGF \(1\)，所以非空集合构成的类有 EGF \(e^{x} - 1\)。<sup>[3](https://math.berkeley.edu/%7Emhaiman/math172-spring10/exponential.pdf)</sup> 只要一个构造必须由非空分量搭建，例如集合划分，这一点就很重要。

与无标号理论的对比十分鲜明。在无标号情形下，幂集（SET）构造的 OGF 是 \(\exp(\sum_{k\geq 1} (-1)^{k-1} A(z^k)/k)\)，明显比带标号情形的 \(\exp(A(z))\) 复杂；多出的项来自对称性，这些对称性使从有序元组到集合的过渡变得困难，而一旦加入标号，这些对称性就被打破了。<sup>[2](https://enumeration.ca/extensions/labelled-constructions/)</sup> 对称性也是带标号框架在另一个方向上需要小心的地方：当一个结构具有自同构时，不同的标号方式可能等价，因此朴素的集合构造会重复计数。处理这类情形需要能处理重标号的工具，例如循环指数方法，它们位于朴素 EGF 词典之外。

## 指数公式

SET 规则的一个被大量复用的推论是指数公式。斯坦利（Stanley）的表述是：若有限集 S 上的一个 C 结构通过将 S 无序划分为若干块并在每块上放置一个 B 结构而得到，则 \(C(x) = e^{B(x)}\)，其中 \(B(x)\) 是连通 B 结构的 EGF。<sup>[5](https://fardila.com/Articles/methods.pdf)</sup> 在多伦多（Toronto）讲义设定中，\(o_n\) 计数由块组装而成的复合对象，\(k_n\) 计数固定大小的块；于是 EGF \(O(x)\) 和 \(K(x)\) 满足指数关系。<sup>[9](https://www.math.toronto.edu/balazse/2019_Fall_MAT344/Lec_10.pdf)</sup>

该公式压缩了大量带标号枚举，因为许多类在结构上就是连通片段的集合：排列是循环的集合，集合划分是非空块的集合。若逐一证明每种情形，每次都要重新推导关于无序收集的同一个组合论证；指数公式只做一次。

两种改进扩展了它的适用范围。双变量版本跟踪分量个数：若 \(c_k(n)\) 是 n 元集上分解为 k 个分量的 C 结构数，则 \(\sum_{n,k\geq 0} c_k(n) x^n/n! y^k = e^{y B(x)}\)。<sup>[5](https://fardila.com/Articles/methods.pdf)</sup> 加权版本在复合结构的权重等于其各分量权重之积时成立。<sup>[5](https://fardila.com/Articles/methods.pdf)</sup> 同一恒等式在物理学中称为聚合物展开，它表达整体结构的生成函数等于其连通子结构生成函数的指数，应用于图上的统计和组合物理。<sup>[10](https://www-lipn.univ-paris13.fr/~duchamp/Conferences/Talks&Visits/09/ICCSA09/Proceedings/JNSA/Manus/expf12.pdf)</sup>

## 具体数值实例

**排列。** 规格说明 \(S = \mathrm{SET}(\mathrm{CYC}(\mathcal{Z}))\) 转换为 \(\exp(\log(1/(1-z))) = 1/(1-z)\)。由于 \(1/(1-z) = \sum n! z^n/n!\)，系数提取返回大小为 n 的 n! 个排列，这是通过生成函数对该恒等式的组合证明。<sup>[2](https://enumeration.ca/extensions/labelled-constructions/)</sup>

**集合划分与贝尔数。** 集合划分是非空带标号集合的集合，所以 \(S = \mathrm{SET}(\mathrm{SET}_{\geq 1}(\mathcal{Z}))\) 且 \(S(z) = e^{e^z - 1}\)，这是贝尔数的 EGF：n 元集的划分数为 \(n! [z^n] e^{e^z - 1}\)。<sup>[2](https://enumeration.ca/extensions/labelled-constructions/)</sup> 恰有 r 个块的划分将非空集 EGF 代入 \(\mathrm{SET}_r\)，得到 EGF \((e^z - 1)^r/r!\) 和斯特林数公式 \(\{n \choose r\} = (1/r!) \sum_{j=0}^r (-1)^{r-j} \binom{r,j} j^n\)。<sup>[2](https://enumeration.ca/extensions/labelled-constructions/)</sup> 用变量 u 标记块得到双变量 EGF \(e^{u(e^z-1)}\)，而 n 元集划分中块的平均个数算得为 \(B_{n+1}/B_n - 1\)，用鞍点法可知，这个量的增长渐近于 \(n/\log n\)。<sup>[2](https://enumeration.ca/extensions/labelled-constructions/)</sup>

此处汇编的资料来源没有包含通过树函数对带标号树所作的平行处理，因此该例超出本文范围。

## 与普通生成函数的比较

当对象建立在由不同标号组成的集合上，且重新排列标号会得到真正不同的对象时，选择 EGF；当大小是区分对象的唯一因素时，选择 OGF。<sup>[3](https://math.berkeley.edu/%7Emhaiman/math172-spring10/exponential.pdf)</sup> 那个诱人的捷径——计数大小为 n 的无标号结构再乘以 n!——一般会失败，因为结构的对称性使其某些标号方式等价，所以乘数不是 n!。<sup>[2](https://enumeration.ca/extensions/labelled-constructions/)</sup>

两种设定在转换规则的复杂程度上也不同。带标号的 SET 规则是 \(\exp(A(z))\)；其无标号对应物是 \(\exp(\sum_{k\geq 1} (-1)^{k-1} A(z^k)/k)\)，并对分量的每种对称性带有修正项。<sup>[2](https://enumeration.ca/extensions/labelled-constructions/)</sup>

## References

1. Exponential Generating Functions, Applied Combinatorics (open textbook). https://www.appliedcombinatorics.org/book/s_genfunction_exponential.html
2. Labelled Constructions, An Invitation to Enumeration. https://enumeration.ca/extensions/labelled-constructions/
3. Exponential Generating Functions, UC Berkeley Math 172 notes (M. Haiman). https://math.berkeley.edu/%7Emhaiman/math172-spring10/exponential.pdf
4. Exponential Generating Functions I, MIT 18.212 course notes. https://math.mit.edu/~fgotti/docs/Courses/Combinatorial%20Analysis/18.%20Exponential%20Generating%20Functions%20I/Exponential%20Generating%20Functions%20I.pdf
5. Algebraic and geometric methods in enumerative combinatorics, Richard Stanley. https://fardila.com/Articles/methods.pdf
6. Introduction to Exponential Generating Functions, University of Waterloo CO 430 (D. Wagner). https://www.math.uwaterloo.ca/~dgwagner/co430II.pdf
7. Labeled Structures and Exponential Generating Functions, Princeton Analytic Combinatorics exercises. https://ac.cs.princeton.edu/20egf/
8. Labelled Structures and Exponential Generating Functions, Sedgewick, Analytic Combinatorics lecture notes. https://sedgewick.io/wp-content/uploads/2022/04/AC02-EGFs.pdf
9. MAT344 Week 10 lecture notes, University of Toronto. https://www.math.toronto.edu/balazse/2019_Fall_MAT344/Lec_10.pdf
10. Statistics on graphs, exponential formula and combinatorial physics. https://www-lipn.univ-paris13.fr/~duchamp/Conferences/Talks&Visits/09/ICCSA09/Proceedings/JNSA/Manus/expf12.pdf
11. Flajolet Sedgewick Analytic Combinatorics.pdf, ic.unicamp.br, https://www.ic.unicamp.br/~celio/peer2peer/math/bitmap-algorithms/flajolet-sedgewick-analytic-combinatorics.pdf

---
*Initially written Sep 17, 2026 · Edited: Oct 11, 2026; Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 逻辑与离散数学 › General discrete mathematics and discrete structures › Combinatorics › Enumerative combinatorics › Generating functions and symbolic methods › Exponential generating functions

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/exponential-generating-functions

English original: https://www.edgepedia.org/exponential-generating-functions
