# 第二类斯特林数

**第二类斯特林数**，记作 \( S(n,k) \) 或 \( \left\{ {n \atop k} \right\} \)，计数的是将一个含 \( n \) 个带标号元素的集合恰好划分为 \( k \) 个非空无标号子集的方法数。等价地说，\( S(n,k) \) 是将 \( n \) 个不同的小球放入 \( k \) 个相同的非空盒子中的方法数，属于计数问题十二重道中的一种情形。<sup>[1](https://mathworld.wolfram.com/StirlingNumberoftheSecondKind.html)</sup> 例如，集合 \( \{1,2,3\} \) 可以用三种方式划分为两个子集：\( \{\{1,2\},\{3\}\} \)、\( \{\{1,3\},\{2\}\} \) 和 \( \{\{1\},\{2,3\}\} \)，因此 \( S(3,2)=3 \)。<sup>[1](https://mathworld.wolfram.com/StirlingNumberoftheSecondKind.html)</sup>

| 关键事实 | 细节 |
|---|---|
| 定义 | \( S(n,k) \) 是将 \( \{1,2,\dots,n\} \) 恰好划分为 \( k \) 个非空子集的方法数<sup>[2](https://dlmf.nist.gov/26.8)</sup> |
| 递推式 | \( S(n,k)=k\,S(n-1,k)+S(n-1,k-1) \)，其中 \( S(0,0)=1 \)<sup>[2](https://dlmf.nist.gov/26.8)</sup> |
| 显式公式 | \( S(n,k)=\frac{1}{k!}\sum_{j=0}^{k}(-1)^{k-j}\binom{k}{j}j^{n} \)<sup>[2](https://dlmf.nist.gov/26.8)</sup> |
| 指数生成函数 | \( \sum_{n=0}^{\infty}S(n,k)\frac{x^n}{n!}=\frac{(e^x-1)^k}{k!} \)；二元形式为 \( \exp\left(y(e^x-1)\right) \)<sup>[2](https://dlmf.nist.gov/26.8)</sup> |
| 特殊值 | \( S(n,1)=S(n,n)=1 \)，\( S(n,2)=2^{n-1}-1 \)，\( S(n,n-1)=\binom{n}{2} \)<sup>[2](https://dlmf.nist.gov/26.8)</sup> |
| 与贝尔数的关系 | \( B_n=\sum_{k=0}^{n}S(n,k) \)，即 \( n \) 元集合的全部划分数<sup>[3](https://mathworld.wolfram.com/ComplementaryBellNumber.html)</sup> |
| 与伯努利数的关系 | \( B_n=\sum_{k=0}^{n}(-1)^k\frac{k!\,S(n,k)}{k+1} \)<sup>[4](https://dlmf.nist.gov/24.15)</sup> |
| 行的最大值 | 对固定的 \( n \)，当 \( n \) 很大时 \( S(n,r) \) 在 \( r=n/\log n \) 附近取最大值<sup>[5](https://www.sciencedirect.com/science/article/pii/S0021980069800451)</sup> |

## 定义与最初若干值

集合的一个划分是一族非空、两两不交的子集，称为块，它们的并是整个集合；块之间既无顺序也无标号。\( S(n,k) \) 计数的是将 \( \{1,2,\dots,n\} \) 恰好划分为 \( k \) 个这样的块的方法数。<sup>[2](https://dlmf.nist.gov/26.8)</sup><sup> • </sup><sup>[6](https://link.springer.com/article/10.1007/s00009-023-02488-x)</sup> 按约定，\( S(0,0)=1 \)；当 \( n>0 \) 时 \( S(n,0)=0 \)；当 \( k>n \) 时 \( S(n,k)=0 \)。<sup>[7](https://doi.org/10.1016%2Fj.jnt.2014.01.005)</sup>

数值三角形的最初几行为：<sup>[2](https://dlmf.nist.gov/26.8)</sup>

| \( n \) \ \( k \) | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| 1 | 1 | | | | |
| 2 | 1 | 1 | | | |
| 3 | 1 | 3 | 1 | | |
| 4 | 1 | 7 | 6 | 1 | |
| 5 | 1 | 15 | 25 | 10 | 1 |

边缘上的值直接由定义得出：一个集合划分为一个块只有一种方式，划分为 \( n \) 个单元素块也只有一种方式，因此 \( S(n,1)=S(n,n)=1 \)。<sup>[1](https://mathworld.wolfram.com/StirlingNumberoftheSecondKind.html)</sup> 划分为 \( n-1 \) 个块时，其中有一个二元块和 \( n-2 \) 个单元素块，故 \( S(n,n-1)=\binom{n}{2} \)。<sup>[2](https://dlmf.nist.gov/26.8)</sup>

## 递推式与显式公式

基本递推式按元素 \( n \) 所在的块对划分进行分类：要么 \( n \) 自成一个单元素块，此时可将它附加到 \( \{1,\dots,n-1\} \) 的任一划分为 \( k-1 \) 个块的划分上；要么 \( n \) 加入某个划分为 \( k \) 个块的划分中已有的 \( k \) 个块之一。由此得到 \( S(n,k)=k\,S(n-1,k)+S(n-1,k-1) \)。<sup>[2](https://dlmf.nist.gov/26.8)</sup> 结合 \( S(0,0)=1 \)，这个递推式是计算整个三角形的常用方法。<sup>[7](https://doi.org/10.1016%2Fj.jnt.2014.01.005)</sup>

容斥论证给出一个闭式。先选定每个元素落入 \( k \) 个带标号盒子中的哪一个，再减去那些使某个盒子为空的分配：<sup>[2](https://dlmf.nist.gov/26.8)</sup>

\[ S(n,k)=\frac{1}{k!}\sum_{j=0}^{k}(-1)^{k-j}\binom{k}{j}j^{n}. \]

因子 \( 1/k! \) 消去了块上的标号。一个相关的差分算子形式为 \( S(n,k)=\Delta^k y^n(0)/k! \)，其中 \( \Delta \) 是前向差分算子。<sup>[8](https://openresearch-repository.anu.edu.au/bitstreams/610d9f53-b304-4205-9c2e-98fbb1a46f1a/download)</sup>

## 生成函数与代数中的作用

对固定的 \( k \)，关于 \( n \) 的指数生成函数为 \( (e^x-1)^k/k! \)，二元生成函数为 \( \sum_{n,k\ge0}S(n,k)\frac{x^n}{n!}y^k=\exp\left(y(e^x-1)\right) \)。<sup>[2](https://dlmf.nist.gov/26.8)</sup> 对固定的 \( k \)，普通生成函数为 \( \sum_{n\ge0}S(n,k)x^n=\frac{x^k}{(1-x)(1-2x)\cdots(1-kx)} \)，其中 \( |x|<1/k \)。<sup>[2](https://dlmf.nist.gov/26.8)</sup>

这些数在幂与降阶乘之间起转换作用：\( x^n=\sum_{k=0}^{n}S(n,k)(x)_k \)，其中 \( (x)_k=x(x-1)\cdots(x-k+1) \)。<sup>[6](https://link.springer.com/article/10.1007/s00009-023-02488-x)</sup> 在这一角色中，它们是 \( n \) 次多项式的两个标准基之间的连接系数，并借助多项式定理用降阶乘表示单项式 \( r^n \)。<sup>[9](https://ircommons.uwf.edu/esploro/outputs/journalArticle/The-Stirling-Numbers-of-the-Second/99381464573206600)</sup> 矩阵 \( (s(n,k)) \) 与 \( (S(n,k)) \) 互为逆矩阵，其中 \( s(n,k) \) 表示第一类斯特林数。<sup>[1](https://mathworld.wolfram.com/StirlingNumberoftheSecondKind.html)</sup>

对 \( k \) 求和得到贝尔数 \( B_n=\sum_{k=0}^{n}S(n,k) \)，它计数 \( n \) 元集合的全部划分；第 \( n \) 个贝尔多项式 \( B_n(x)=\sum_{k=0}^{n}S(n,k)x^k \) 的系数构成三角形的第 \( n \) 行。<sup>[3](https://mathworld.wolfram.com/ComplementaryBellNumber.html)</sup><sup> • </sup><sup>[1](https://mathworld.wolfram.com/StirlingNumberoftheSecondKind.html)</sup> 伯努利数也可通过它们表示：\( B_n=\sum_{k=0}^{n}(-1)^k\frac{k!\,S(n,k)}{k+1} \)。<sup>[4](https://dlmf.nist.gov/24.15)</sup>

## 历史与记号

詹姆斯·斯特林（James Stirling）在其 1730 年的《微分方法》（*Methodus Differentialis*）中，首次提请人们注意这些系数的用途，并给出了它们最初若干值的小表；两类斯特林数都以他的名字命名。<sup>[10](https://www.cambridge.org/core/journals/proceedings-of-the-edinburgh-mathematical-society/article/stirling-numbers-and-polynomials/EDE9521EA5639E159282DD11AB394D69)</sup> 分析学学者赫里斯托·N·博亚吉耶夫（Khristo N. Boyadzhiev）的一篇历史综述，追溯了它们从斯特林的书，经约翰·格鲁纳特（Johann Grunert）1843 年的工作，到与伯努利数、欧拉多项式和幂和之间联系的发展历程。<sup>[11](https://arxiv.org/abs/1806.09468)</sup>

记号历来五花八门。除 \( S(n,k) \) 外，文献中还使用 \( S_n^{(k)} \)（Fort 1948；Abramowitz 与 Stegun）、\( \mathfrak{S}_n^k \)（Jordan 1939）、\( \sigma_n^k \)（Moser 与 Wyman 1958）以及 \( S_2(k,n-k) \)（Carlitz 1960，Gould 1960）；唐纳德·克努特（Donald Knuth）于 1992 年引入了花括号记号 \( \left\{ {n \atop k} \right\} \)，为格雷厄姆、克努特与帕塔什尼克合著的《具体数学》（*Concrete Mathematics*）所采用。<sup>[12](https://dlmf.nist.gov/26.1)</sup> Wolfram 语言将其实现为 `StirlingS2[n, m]`。<sup>[1](https://mathworld.wolfram.com/StirlingNumberoftheSecondKind.html)</sup>

## 渐近性质与行的最大值

对固定的 \( n \)，当 \( k \) 从 1 变到 \( n \) 时，\( S(n,k) \) 先增后减，确定最大项的位置是一个古老的问题，在 20 世纪 60 年代末和 70 年代得到了深入研究。坎菲尔德（Canfield）1969 年发表于《组合理论杂志》（*Journal of Combinatorial Theory*）的论文，建立了固定 \( n \) 时各 \( S(n,r) \) 之间的不等式，并得到了 \( S(n,r) \) 取最大值的位置 \( r \) 的渐近值 \( n/\log n \)。<sup>[5](https://www.sciencedirect.com/science/article/pii/S0021980069800451)</sup> 从事概率论研究的数学家俞亚明（Yaming Yu）用非渐近的界将其精细化：记 \( K_n \) 为第 \( n \) 行的较小众数，\( w(n) \) 为兰伯特 W 函数，则对所有 \( n\ge2 \) 有 \( \lfloor e^{w(n)}\rfloor-2 \le K_n \le \lfloor e^{w(n)}\rfloor+1 \)。<sup>[13](https://arxiv.org/abs/0902.2964)</sup> 文中提到的一个长期猜想认为，不存在 \( n>2 \) 使 \( S(n,K_n)=S(n,K_n+1) \)，也就是说最大值在单个 \( k \) 值处取得。<sup>[13](https://arxiv.org/abs/0902.2964)</sup>

完整的双参数渐近性质由阿姆斯特丹数学与计算机科学中心（Centrum Wiskunde & Informatica）的研究员 N. M. Temme 处理，他于 1993 年利用生成函数上的鞍点方法，导出了两类斯特林数的渐近估计，这些估计当 \( n \to\infty \) 时对第二个参数一致有效。<sup>[14](https://onlinelibrary.wiley.com/doi/abs/10.1002/sapm1993893233)</sup> 后来的工作将此类公式推广到广义斯特林数以及 \( (n,k) \) 平面的中心区域与非中心区域。<sup>[15](https://pefmath.etf.bg.ac.rs/vol7num2/AADM-Vol7-No2-193-210.pdf)</sup>

各行作为序列也有良好的性质：当时在麻省理工学院数学系的埃利奥特·H·利布（Elliott H. Lieb）于 1968 年证明，对固定的 \( n \)，两类斯特林数作为 \( k \) 的函数都是强对数凹的，这一结果强于哈珀（Harper）此前对第二类斯特林数证明的单峰性猜想。<sup>[16](https://collaborate.princeton.edu/en/publications/concavity-properties-and-a-generating-function-for-stirling-numbe/)</sup>

## 应用

在概率论与统计学中，\( S(n,k) \) 出现在经典占位分布中，其概率质量函数含有这些数；也出现在矩公式中：独立随机变量之和的原矩可用斯特林数表示，而概率变体 \( S_Z(n,k) \) 计数的是将 \( 2n \) 划分为 \( k \) 个各含偶数个元素的块的方法数。<sup>[8](https://openresearch-repository.anu.edu.au/bitstreams/610d9f53-b304-4205-9c2e-98fbb1a46f1a/download)</sup><sup> • </sup><sup>[17](https://link.springer.com/article/10.1007/s00010-024-01073-1)</sup> 西佛罗里达大学统计学教授苏巴什·C·巴古伊（Subhash C. Bagui）与 K. L. Mehra 于 2024 年发表的一篇讲解性论文，利用这些数导出了二项分布、泊松分布、几何分布和负二项分布第 \( n \) 阶原矩的闭式，同时还给出了通过将 \( r^n \) 按降阶乘展开得到的幂和恒等式 \( \sum_{j=1}^{r}j^n \)。<sup>[9](https://ircommons.uwf.edu/esploro/outputs/journalArticle/The-Stirling-Numbers-of-the-Second/99381464573206600)</sup>

在分析学中，这些数出现在微分公式以及外尔代数中的正规序化中，其中 \( S(n,k) \) 作为排序系数出现。<sup>[11](https://arxiv.org/abs/1806.09468)</sup><sup> • </sup><sup>[18](https://www.tandfonline.com/doi/abs/10.2989/16073606.2026.2636855)</sup> 存在许多推广，包括 \( q \)-斯特林数、\( r \)-斯特林数、\( m \)-斯特林数和高阶斯特林数，它们在参数取基本值时化为经典的 \( S(n,k) \)。<sup>[19](https://combinatorialpress.com/article/ars/Volume%20134/volume-134-paper-18.pdf)</sup><sup> • </sup><sup>[6](https://link.springer.com/article/10.1007/s00009-023-02488-x)</sup>

## References

1. [Stirling Number of the Second Kind, Wolfram MathWorld](https://mathworld.wolfram.com/StirlingNumberoftheSecondKind.html)
2. [DLMF §26.8 Set Partitions: Stirling Numbers, NIST Digital Library of Mathematical Functions](https://dlmf.nist.gov/26.8)
3. [Complementary Bell Number, Wolfram MathWorld](https://mathworld.wolfram.com/ComplementaryBellNumber.html)
4. [DLMF §24.15(iii) Stirling Numbers, NIST Digital Library of Mathematical Functions](https://dlmf.nist.gov/24.15)
5. [E. R. Canfield (1969). On Stirling numbers of the second kind. Journal of Combinatorial Theory 7(2), 116–121.](https://www.sciencedirect.com/science/article/pii/S0021980069800451)
6. [Some Positivities in Stirling Arrays with Higher Level, Mediterranean Journal of Mathematics (2023)](https://link.springer.com/article/10.1007/s00009-023-02488-x)
7. [Divisibility by 2 of Stirling numbers of the second kind and their differences, Journal of Number Theory (2014)](https://doi.org/10.1016%2Fj.jnt.2014.01.005)
8. [Classical occupancy distribution notes, Australian National University open research repository](https://openresearch-repository.anu.edu.au/bitstreams/610d9f53-b304-4205-9c2e-98fbb1a46f1a/download)
9. [S. C. Bagui and K. L. Mehra (2024). The Stirling Numbers of the Second Kind and Their Applications. Alabama Journal of Mathematics 47(1).](https://ircommons.uwf.edu/esploro/outputs/journalArticle/The-Stirling-Numbers-of-the-Second/99381464573206600)
10. [The Stirling Numbers and Polynomials, Proceedings of the Edinburgh Mathematical Society](https://www.cambridge.org/core/journals/proceedings-of-the-edinburgh-mathematical-society/article/stirling-numbers-and-polynomials/EDE9521EA5639E159282DD11AB394D69)
11. [Khristo N. Boyadzhiev (2018). Close encounters with the Stirling numbers of the second kind. arXiv:1806.09468.](https://arxiv.org/abs/1806.09468)
12. [DLMF §26.1 Special Notation, NIST Digital Library of Mathematical Functions](https://dlmf.nist.gov/26.1)
13. [Yaming Yu (2009). Bounds on the Location of the Maximum Stirling Numbers of the Second Kind. arXiv:0902.2964.](https://arxiv.org/abs/0902.2964)
14. [N. M. Temme (1993). Asymptotic Estimates of Stirling Numbers. Studies in Applied Mathematics 89, 233–243.](https://onlinelibrary.wiley.com/doi/abs/10.1002/sapm1993893233)
15. [Asymptotics of the Stirling Numbers of the Second Kind Revisited, Advances in Decision Sciences](https://pefmath.etf.bg.ac.rs/vol7num2/AADM-Vol7-No2-193-210.pdf)
16. [Elliott H. Lieb (1968). Concavity properties and a generating function for Stirling numbers. Journal of Combinatorial Theory 5(2), 203–206.](https://collaborate.princeton.edu/en/publications/concavity-properties-and-a-generating-function-for-stirling-numbe/)
17. [Probabilistic Stirling numbers and applications, Aequationes mathematicae 98 (2024), 1627–1646.](https://link.springer.com/article/10.1007/s00010-024-01073-1)
18. [The unimodality of Stirling numbers defined by normal ordering in the generalized Weyl algebra, Quaestiones Mathematicae](https://www.tandfonline.com/doi/abs/10.2989/16073606.2026.2636855)
19. [Two Kinds of m-Stirling Numbers, Ars Combinatoria 134](https://combinatorialpress.com/article/ars/Volume%20134/volume-134-paper-18.pdf)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 17, 2026; Sep 30, 2026; Oct 15, 2026 · Edited: Sep 17, 2026; Sep 30, 2026; Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 逻辑与离散数学 › General discrete mathematics and discrete structures › Combinatorics › Enumerative combinatorics › Counting techniques and recurrences › Stirling numbers

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/stirling-numbers-of-the-second-kind

English original: https://www.edgepedia.org/stirling-numbers-of-the-second-kind
