# 组合

组合是从若干项目中选出一些项目，并且不考虑所选项目的顺序；从 \( n \) 个可能项中选出 \( k \) 个无序结果的方法数写作 \( \binom{n}{k} \) 或 \( _nC_k \)，读作“\( n \) 选 \( k \)”，也称为二项式系数或选择数<sup>[1](https://mathworld.wolfram.com/Combination.html)</sup>。选出的项目构成数学家所说的这 \( n \) 个项目的一个 \( k \)-子集<sup>[1](https://mathworld.wolfram.com/Combination.html)</sup>。组合与排列形成对照，排列计数的是顺序重要的安排<sup>[2](https://math.libretexts.org/Bookshelves/Combinatorics_and_Discrete_Mathematics/A_Cool_Brisk_Walk_Through_Discrete_Mathematics_%28Davies%29/06%253A_Structures/6.3%253A_Combinations)</sup>。

| 关键事实 | 细节 |
|---|---|
| 定义 | 从 \( n \) 个可能项中选出 \( k \) 个无序结果的方法数，读作“\( n \) 选 \( k \)”<sup>[1](https://mathworld.wolfram.com/Combination.html)</sup> |
| 公式 | 对满足 \( 0 \le k \le n \) 的非负整数，\( \binom{n}{k} = \dfrac{n!}{k!(n-k)!} \)<sup>[1](https://mathworld.wolfram.com/Combination.html)</sup> |
| 与排列的关系 | \( \binom{n}{k} = \dfrac{P(n,k)}{k!} \)；分母中的 \( k! \) 去掉了组合所忽略的那些排序<sup>[3](https://math.libretexts.org/Bookshelves/Combinatorics_and_Discrete_Mathematics/Applied_Discrete_Structures_%28Doerr_and_Levasseur%29/02%3A_Combinatorics/2.04%3A_Combinations_and_the_Binomial_Theorem)</sup><sup> • </sup><sup>[4](https://math.libretexts.org/Courses/Prince_Georges_Community_College/MAT_1160%3A_Data_and_Chance/07%3A_Counting_Techniques/7.02%3A_Permutations_and_Combinations)</sup> |
| 实例 | \( \binom{4}{2} = 6 \)：从 \( \{1,2,3,4\} \) 中取出的六对 \( \{1,2\}, \{1,3\}, \{1,4\}, \{2,3\}, \{2,4\}, \{3,4\} \)<sup>[1](https://mathworld.wolfram.com/Combination.html)</sup> |
| 帕斯卡三角形 | 对递增的 \( n \)，按行填入 \( k = 0, 1, \ldots, n \) 时的值，就得到帕斯卡三角形<sup>[5](https://mathworld.wolfram.com/BinomialCoefficient.html)</sup> |
| 格路 | 从 \( (0,0) \) 到 \( (a,b) \) 的向东/向北格路数为 \( \binom{a+b}{a} \)<sup>[6](https://mathworld.wolfram.com/LatticePath.html)</sup> |
| 二项式定理 | \( \binom{n}{k} \) 是 \( (1+x)^n \) 的多项式展开中第 \( k \) 项的系数<sup>[7](https://docs.python.org/3/library/math.html?highlight=log)</sup> |

## 定义与公式

对满足 \( 0 \le k \le n \) 的非负整数 \( n \) 和 \( k \)，组合数为<sup>[1](https://mathworld.wolfram.com/Combination.html)</sup>

\[ \binom{n}{k} = \frac{n!}{k!\,(n-k)!}, \]

其中 \( n! \) 表示阶乘<sup>[1](https://mathworld.wolfram.com/Combination.html)</sup>。这个公式来自先计数有序选择：从 \( n \) 个对象中选取 \( k \) 个并排序，共有 \( P(n,k) \) 种排列，而每个 \( k \) 元子集恰好有 \( k! \) 种排序，所以除以 \( k! \) 就把每一组排序合并成一个组合<sup>[3](https://math.libretexts.org/Bookshelves/Combinatorics_and_Discrete_Mathematics/Applied_Discrete_Structures_%28Doerr_and_Levasseur%29/02%3A_Combinatorics/2.04%3A_Combinations_and_the_Binomial_Theorem)</sup>。作为一个具体例子，从 \( A = \{a, b, c, d\} \) 中选三个字母得到 \( \binom{4}{3} = \frac{4!}{1! \cdot 3!} = 4 \)，即 \( \{a,b,c\} \)、\( \{a,b,d\} \)、\( \{a,c,d\} \) 和 \( \{b,c,d\} \)<sup>[3](https://math.libretexts.org/Bookshelves/Combinatorics_and_Discrete_Mathematics/Applied_Discrete_Structures_%28Doerr_and_Levasseur%29/02%3A_Combinatorics/2.04%3A_Combinations_and_the_Binomial_Theorem)</sup>。

顺序是组合与排列之间的分界线。从可供选择的 \( n \) 个对象中取 \( k \) 个对象的组合，是不考虑顺序地选择其中任意 \( k \) 个对象组成一个集合；而排列计数则把第一名和第二名视为不同结果<sup>[2](https://math.libretexts.org/Bookshelves/Combinatorics_and_Discrete_Mathematics/A_Cool_Brisk_Walk_Through_Discrete_Mathematics_%28Davies%29/06%253A_Structures/6.3%253A_Combinations)</sup>。组合公式分母中多出的 \( r! \) 因子，对应的是所选 \( r \) 个项目排序的方式数，而组合有意忽略这种顺序<sup>[4](https://math.libretexts.org/Courses/Prince_Georges_Community_College/MAT_1160%3A_Data_and_Chance/07%3A_Counting_Techniques/7.02%3A_Permutations_and_Combinations)</sup>。

## 解释与示例

同一个数可以回答若干看似不同的计数问题。\( \binom{n}{k} \) 计数的是含 \( n \) 个不同项目的集合的 \( k \)-子集个数、长度为 \( n \) 且含 \( k \) 个 1 的位串个数，以及从原点 \( (0,0) \) 到点 \( (a,b) \) 且只使用向东和向北步骤的格路数，即 \( \binom{a+b}{a} \)<sup>[5](https://mathworld.wolfram.com/BinomialCoefficient.html)</sup><sup> • </sup><sup>[6](https://mathworld.wolfram.com/LatticePath.html)</sup>。在格路的解读中，一条长度为 \( a+b \) 的路径由其中哪 \( a \) 步向东决定，因此这些路径对应于组合<sup>[6](https://mathworld.wolfram.com/LatticePath.html)</sup>。

组合也出现在概率中。如果抛掷一枚均匀硬币五次，得到三次正面的方式数就是一个组合问题，因为正面出现的顺序无关紧要<sup>[3](https://math.libretexts.org/Bookshelves/Combinatorics_and_Discrete_Mathematics/Applied_Discrete_Structures_%28Doerr_and_Levasseur%29/02%3A_Combinatorics/2.04%3A_Combinations_and_the_Binomial_Theorem)</sup>。二项式系数总是整数，正如组合数必定是整数一样<sup>[8](https://math.libretexts.org/Bookshelves/Algebra/Algebra_and_Trigonometry_1e_%28OpenStax%29/13%3A_Sequences_Probability_and_Counting_Theory/13.06%3A_Binomial_Theorem)</sup>。

## 帕斯卡三角形与恒等式

对递增的 \( n \)，按行排列 \( k = 0, 1, \ldots, n \) 时的值 \( \binom{n}{k} \)，就产生帕斯卡三角形<sup>[5](https://mathworld.wolfram.com/BinomialCoefficient.html)</sup>。每个条目都是它正上方一对条目之和，基本递推关系为<sup>[9](https://dlmf.nist.gov/26.3)</sup>

\[ \binom{m}{n} = \binom{m-1}{n} + \binom{m-1}{n-1}, \qquad m \ge n \ge 1. \]

其他标准恒等式包括 \( \binom{n}{0} = \binom{n}{n} = 1 \)，以及中心系数形式 \( \binom{2n}{n} = \frac{2^n (2n-1)(2n-3) \cdots 3 \cdot 1}{n!} \)<sup>[9](https://dlmf.nist.gov/26.3)</sup>。二项式定理把这个三角形与代数联系起来：\( \sum_{n=0}^{m} \binom{m}{n} x^n = (1+x)^m \)，因此三角形的每一行列出一个二项式幂的系数<sup>[9](https://dlmf.nist.gov/26.3)</sup>。

当 \( n \) 很大时，中心系数按如下方式增长<sup>[9](https://dlmf.nist.gov/26.3)</sup>

\[ \binom{2n}{n} \sim \frac{4^n}{\sqrt{\pi n}}, \qquad n \to \infty. \]

## 历史

二项式系数构成的三角形阵列远远早于布莱兹·帕斯卡（Blaise Pascal）。在印度（India），一个始于约公元前200年的平伽拉（Pingala）的传统研究了组合数，而6世纪的天文学家伐罗诃密希拉（Varahamihira）在一张通过相邻两项相加构造的表中计算了 \( _nC_r \) 值，这就是从另一个角度看的帕斯卡三角形<sup>[10](https://mathshistory.st-andrews.ac.uk/Miller/mathword/p/)</sup><sup> • </sup><sup>[11](https://mathshistory.st-andrews.ac.uk/Biographies/Varahamihira/)</sup>。这个图形在中世纪出现在纳西尔丁·图西（Nasir al-Din al-Tusi，1265）和朱世杰（Chu Shih-chieh，1303）的著作中，并在16世纪和17世纪的欧洲（Europe）重新出现在阿皮安（Apian）、施蒂费尔（Stifel）、舍伊贝尔（Scheubel）、塔尔塔利亚（Tartaglia）、邦贝利（Bombelli）、佩尔捷（Peletier）、特伦尚（Trenchant）和奥特雷德（Oughtred）的著作中<sup>[12](https://mathshistory.st-andrews.ac.uk/DSB/Pascal.pdf)</sup>。在意大利（Italy），这个三角形至今仍被称为塔尔塔利亚三角形，得名于尼科洛·塔尔塔利亚（Niccolo Tartaglia），他在1556年发表了前几行<sup>[10](https://mathshistory.st-andrews.ac.uk/Miller/mathword/p/)</sup>。

帕斯卡并非第一个研究这个三角形的人，但他的《算术三角形论》（*Traité du triangle arithmétique*，1654）是有关这一主题的最重要著作；他是第一个对它进行系统研究的人，并将其与算术和组合分析问题联系起来，还使用数学归纳法证明系数的性质<sup>[13](https://mathshistory.st-andrews.ac.uk//Biographies/Pascal/)</sup><sup> • </sup><sup>[12](https://mathshistory.st-andrews.ac.uk/DSB/Pascal.pdf)</sup><sup> • </sup><sup>[14](https://mathshistory.st-andrews.ac.uk/Strick/pascal.pdf)</sup>。通过沃利斯（Wallis）的工作，帕斯卡的结果引导牛顿（Newton）得到了适用于分数幂和负幂的一般二项式定理<sup>[13](https://mathshistory.st-andrews.ac.uk//Biographies/Pascal/)</sup>。蒙莫尔（Montmort）在其1708年的《赌博游戏分析随笔》（*Essay d'analyse sur les jeux de hazard*）中，首次把这个三角形与帕斯卡的名字联系起来，称之为“帕斯卡先生的组合表”（Table de M. Pascal pour les combinaisons）<sup>[10](https://mathshistory.st-andrews.ac.uk/Miller/mathword/p/)</sup>。

## 计算

软件库直接提供组合计数。沃尔弗拉姆语言（Wolfram Language）用 `Binomial[n, k]` 计算 \( \binom{n}{k} \)，并用 `Subsets[Range[n], {k}]` 枚举组合本身<sup>[1](https://mathworld.wolfram.com/Combination.html)</sup>。Python 的 `math.comb(n, k)` 于3.8版本加入，当 \( k \le n \) 时返回 \( n! / (k! \cdot (n-k)!) \)，当 \( k > n \) 时返回零<sup>[7](https://docs.python.org/3/library/math.html?highlight=log)</sup>。

在算法上，\( C(n,k) \) 可以通过递归计算，通常借助帕斯卡三角形递推关系，也可以通过迭代计算；递归程序写起来更简单，但由于函数调用和栈管理的额外时间开销，效率低于迭代程序，因此在时间要求严格时更倾向于迭代<sup>[15](https://datalab-old.csd.auth.gr/wp-content/uploads/publications/SBI02m.pdf)</sup>。

## 推广

把阶乘写成伽马函数，\( z! = \Gamma(z+1) \)，就可以把二项式系数推广到非整数参数，包括复数值，从而得到广义二项式系数 \( \binom{x}{y} = \frac{(x)_y}{y!} \)，其中 \( (x)_y \) 是波赫哈默符号（Pochhammer symbol）<sup>[5](https://mathworld.wolfram.com/BinomialCoefficient.html)</sup>。对于整数 \( a \)、\( b \) 和复数 \( s \)，该定义可以延拓到负整数参数，并且在所有整数参数处以及在除“负整数 \( x \) 与非整数 \( y \)”之外的所有复参数处保持连续；在那些例外处它为无穷大<sup>[5](https://mathworld.wolfram.com/BinomialCoefficient.html)</sup>。相关的计数对象包括多项式系数、多重选择（可重复组合）以及 \( q \)-二项式系数或高斯二项式系数<sup>[1](https://mathworld.wolfram.com/Combination.html)</sup>。

## References

1. [Combination -- from Wolfram MathWorld](https://mathworld.wolfram.com/Combination.html)
2. [6.3: Combinations, A Cool Brisk Walk Through Discrete Mathematics (Davies), Mathematics LibreTexts](https://math.libretexts.org/Bookshelves/Combinatorics_and_Discrete_Mathematics/A_Cool_Brisk_Walk_Through_Discrete_Mathematics_%28Davies%29/06%253A_Structures/6.3%253A_Combinations)
3. [2.4: Combinations and the Binomial Theorem, Applied Discrete Structures (Doerr and Levasseur), Mathematics LibreTexts](https://math.libretexts.org/Bookshelves/Combinatorics_and_Discrete_Mathematics/Applied_Discrete_Structures_%28Doerr_and_Levasseur%29/02%3A_Combinatorics/2.04%3A_Combinations_and_the_Binomial_Theorem)
4. [7.2: Permutations and Combinations, Mathematics LibreTexts](https://math.libretexts.org/Courses/Prince_Georges_Community_College/MAT_1160%3A_Data_and_Chance/07%3A_Counting_Techniques/7.02%3A_Permutations_and_Combinations)
5. [Binomial Coefficient -- from Wolfram MathWorld](https://mathworld.wolfram.com/BinomialCoefficient.html)
6. [Lattice Path -- from Wolfram MathWorld](https://mathworld.wolfram.com/LatticePath.html)
7. [math -- Mathematical functions, Python 3 documentation](https://docs.python.org/3/library/math.html?highlight=log)
8. [13.6: Binomial Theorem, Algebra and Trigonometry 1e (OpenStax), Mathematics LibreTexts](https://math.libretexts.org/Bookshelves/Algebra/Algebra_and_Trigonometry_1e_%28OpenStax%29/13%3A_Sequences_Probability_and_Counting_Theory/13.06%3A_Binomial_Theorem)
9. [DLMF: §26.3 Lattice Paths: Binomial Coefficients, NIST Digital Library of Mathematical Functions](https://dlmf.nist.gov/26.3)
10. [Earliest Known Uses of Some of the Words of Mathematics (P), MacTutor History of Mathematics](https://mathshistory.st-andrews.ac.uk/Miller/mathword/p/)
11. [Varahamihira (505 - 587), MacTutor History of Mathematics](https://mathshistory.st-andrews.ac.uk/Biographies/Varahamihira/)
12. [Pascal, Dictionary of Scientific Biography, MacTutor](https://mathshistory.st-andrews.ac.uk/DSB/Pascal.pdf)
13. [Blaise Pascal (1623 - 1662), MacTutor History of Mathematics](https://mathshistory.st-andrews.ac.uk//Biographies/Pascal/)
14. [Blaise Pascal, MacTutor](https://mathshistory.st-andrews.ac.uk/Strick/pascal.pdf)
15. [Binomial Coefficient Computation: Recursion or Iteration? (Manolopoulos), Aristotle University of Thessaloniki](https://datalab-old.csd.auth.gr/wp-content/uploads/publications/SBI02m.pdf)

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

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

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/combination

English original: https://www.edgepedia.org/combination
