# 优惠券收集问题

优惠券收集问题是概率论中的一个经典问题，它问的是：从一个包含 n 种等概率优惠券的集合中，有放回地独立抽取，平均需要抽多少次才能每种至少得到一张。答案是 \( n H_n \)，其中 \( H_n = 1 + \tfrac{1}{2} + \cdots + \tfrac{1}{n} \) 是第 n 个调和数，其增长速度约为 \( n \log n \)。<sup>[1](https://mat.uab.es/~matmat/ebook2014/V2014n02-ebook.pdf)</sup> 该问题是随机算法分析中的标准范例，自十八世纪以来一直受到概率学家的研究。<sup>[1](https://mat.uab.es/~matmat/ebook2014/V2014n02-ebook.pdf)</sup>

| 关键事实 | 细节 |
|---|---|
| 期望抽取次数（等概率情形） | \( \mathbb{E}[T] = n H_n \approx n \ln n + 0.5772\,n \)，其中 \( H_n \) 为第 n 个调和数<sup>[1](https://mat.uab.es/~matmat/ebook2014/V2014n02-ebook.pdf)</sup> |
| 尾部界 | 需要超过 \( n \log n + cn \) 次抽取的概率至多为 \( e^{-c} \)<sup>[2](https://www.cl.cam.ac.uk/teaching/2122/RandAlgthm/lec1_intro.pdf)</sup> |
| 极限分布 | 归一化后的完成时间收敛到耿贝尔分布<sup>[3](https://link.springer.com/article/10.1007/s10959-025-01417-w)</sup> |
| m 套完整集合 | 当 m 固定、n 很大时，需要 \( n(\log n + (m-1)\log\log n + o(1)) \) 次抽取；第一套花费 \( n \log n \)，之后所有套加起来只花费 \( n \log\log n \)<sup>[4](https://faculty.wharton.upenn.edu/wp-content/uploads/2012/04/Double-dixie-cup-problem.pdf)</sup> |
| 非等概率 | 期望没有简单的闭式表达；最稀有的优惠券主导等待时间<sup>[5](https://quantmemo.com/concepts/coupon-collector-unequal-probabilities)</sup> |
| 多次抽取变体 | 每轮抽取 d 张不同优惠券，收集 m 套平均需要 \( \tfrac{n\log n}{d} + \tfrac{n}{d}(m-1)\log\log n + O(mn) \) 轮<sup>[6](https://arxiv.org/abs/1010.5608)</sup> |
| 历史 | 首次出现于棣莫弗的《抽签的度量》（1708）；非等概率情形最早由 H. von Schelling（1954）处理<sup>[1](https://mat.uab.es/~matmat/ebook2014/V2014n02-ebook.pdf)</sup> |

## 问题陈述

优惠券从包含 n 种不同种类的总体中逐张收集，每次抽取独立同分布，即有放回抽取。当所有 n 种都被收集到时过程停止，记录总抽取次数 Y。<sup>[7](https://www.cambridge.org/core/journals/journal-of-applied-probability/article/generalised-coupon-collector-problem/4D5F06A32A7C98F87277BC33E49CE5AE)</sup> 在经典版本中每种等概率，每次抽取的概率为 \( 1/n \)。<sup>[7](https://www.cambridge.org/core/journals/journal-of-applied-probability/article/generalised-coupon-collector-problem/4D5F06A32A7C98F87277BC33E49CE5AE)</sup>

该问题等价于将球均匀且独立地投入 n 个箱子，问需要多少个球才能使没有箱子为空。<sup>[8](https://tcs.nju.edu.cn/wiki/index.php/Randomized_Algorithms_%28Spring_2010%29/Balls_and_bins)</sup> 文献中也以捕获–再捕获、委员会问题、矩阵占位和随机分配等名称记载同一过程。<sup>[9](https://www.sciencedirect.com/science/article/pii/S0378375818300363)</sup>

## 期望等待时间

**阶段分解。** 将总数写为 \( T = X_1 + X_2 + \cdots + X_n \)，其中 \( X_i \) 是从 \( i-1 \) 种不同优惠券增加到 i 种所需的抽取次数。第一次抽取总是得到新种类，所以 \( X_1 = 1 \)。一旦持有 i 种不同优惠券，一次抽取为新种类的概率是 \( (n-i+1)/n \)，因此 \( X_i \) 服从以该成功概率为参数的几何分布，期望为 \( n/(n-i+1) \)。<sup>[1](https://mat.uab.es/~matmat/ebook2014/V2014n02-ebook.pdf)</sup> 各阶段变量相互独立，故由期望的线性性<sup>[10](https://www.cs.utexas.edu/~ecprice/courses/randomized/fa21/scribe/lec5.pdf)</sup>

\[ \mathbb{E}[T] = \sum_{i=1}^{n} \frac{n}{n-i+1} = n \sum_{k=1}^{n} \frac{1}{k} = n H_n. \]

由于 \( H_n \approx \ln n + \gamma \)，其中 \( \gamma \approx 0.5772 \) 为欧拉–马歇罗尼常数，期望约为 \( n \ln n \)。<sup>[1](https://mat.uab.es/~matmat/ebook2014/V2014n02-ebook.pdf)</sup>

**集中性。** 完成时间紧密集中在其均值附近。一个联合界论证表明，需要超过 \( n \log n + cn \) 次抽取的概率至多为 \( e^{-c} \)，因此在 \( n \log n \) 之上再加 n 的常数倍即以高概率足够。<sup>[2](https://www.cl.cam.ac.uk/teaching/2122/RandAlgthm/lec1_intro.pdf)</sup> 同样的 \( n \ln n \) 尺度贯穿算法分析，例如完全图上随机游走的覆盖时间，以及图稀疏化所需的边数。<sup>[11](https://cs.uwaterloo.ca/~r5olivei/courses/2023-spring-cs466/lecture-notes/lecture4/)</sup>

**极限分布。** 经过适当的归一化后，收集全部优惠券的时间依分布收敛到一个缩放后的耿贝尔随机变量，即同样支配独立样本最大值的极值分布。<sup>[3](https://link.springer.com/article/10.1007/s10959-025-01417-w)</sup> 这一耿贝尔极限在该问题的许多变体中反复出现。<sup>[3](https://link.springer.com/article/10.1007/s10959-025-01417-w)</sup>

## 历史

该问题最早出现于 1708 年亚伯拉罕·棣莫弗的《抽签的度量》中，等概率情形下的进一步早期结果归功于拉普拉斯和欧拉。<sup>[1](https://mat.uab.es/~matmat/ebook2014/V2014n02-ebook.pdf)</sup> 1954 年 H. von Schelling 首次得到了优惠券概率不等时完成收集的等待时间，1960 年唐纳德·J. 纽曼和劳伦斯·谢普计算了等概率情形下完成两套收集的等待时间。<sup>[1](https://mat.uab.es/~matmat/ebook2014/V2014n02-ebook.pdf)</sup> 纽曼和谢普的“双迪克西杯”论文回答了 W. Weissblum 提出的一个问题：两个合作收集的孩子需要多长时间才能获得两套完整的 n 张图片。<sup>[4](https://faculty.wharton.upenn.edu/wp-content/uploads/2012/04/Double-dixie-cup-problem.pdf)</sup> 埃尔代什和雷尼在 1961 年匈牙利科学院数学研究所出版物上的一篇论文中处理了一个相关的经典问题。<sup>[12](https://real.mtak.hu/201134/)</sup>

## 收集 m 套完整集合

纽曼和谢普证明了，当 m 固定、n 很大时，完成 m 套完整集合的期望购买次数为

\[ \mathbb{E}[T_m] = n\bigl(\log n + (m-1)\log\log n + o(1)\bigr). \]

虽然第一套花费 \( n \log n \)，但之后所有套加起来只花费 \( n \log\log n \)。<sup>[4](https://faculty.wharton.upenn.edu/wp-content/uploads/2012/04/Double-dixie-cup-problem.pdf)</sup> 后来杜马斯和帕帕尼科拉乌的工作将 \( T_m(N) \) 及其方差的渐近性推广到了优惠券概率不等的一般情形，包括广义齐夫定律等分布。<sup>[13](https://www.researchgate.net/publication/241681078_The_Coupon_Collector%27s_Problem_Revisited_Asymptotics_of_the_Variance)</sup>

## 非等概率

当优惠券种类以不等概率 \( p_k \) 出现时，问题虽然更贴近现实，却变得更加困难。<sup>[1](https://mat.uab.es/~matmat/ebook2014/V2014n02-ebook.pdf)</sup> 完成收集的期望时间没有简单的闭式表达，且不成比例地由最稀有的优惠券驱动；一张极稀有的优惠券可以将期望购买次数推向无穷。<sup>[5](https://quantmemo.com/concepts/coupon-collector-unequal-probabilities)</sup><sup> • </sup><sup>[1](https://mat.uab.es/~matmat/ebook2014/V2014n02-ebook.pdf)</sup> 精确公式存在，但对大规模收集计算量很大，因此实践中使用近似公式。<sup>[1](https://mat.uab.es/~matmat/ebook2014/V2014n02-ebook.pdf)</sup>

优化结果刻画了哪些分布最容易、哪些最困难。几乎均匀分布——即所有非空优惠券具有相同抽取概率——在随机意义下最小化收集固定数量不同优惠券的期望时间，而在一个闭分布集中，除一项外其余所有项都取最小可能值的分布在随机意义下最大化该时间。<sup>[14](https://arxiv.org/abs/1504.03878)</sup><sup> • </sup><sup>[15](https://arxiv.org/abs/1402.5245)</sup> 任意优惠券概率的一般渐近估计在 1990 年代得到发展。<sup>[16](https://www.sciencedirect.com/science/article/pii/0377042795000208)</sup>

## 推广

**多次抽取模型。** 在一个推广版本中，收集者每轮获得 d 张不同优惠券，并保留她目前持有最少的那种；徐伟宇和唐敖庆证明了当 \( n \to \infty \) 时收集 m 套平均需要 \( \tfrac{n\log n}{d} + \tfrac{n}{d}(m-1)\log\log n + O(mn) \) 轮，并给出了任意有限情形的精确算法。<sup>[6](https://arxiv.org/abs/1010.5608)</sup> 后来关于两种具有不同保留规则的多抽取模型——保留所有新优惠券与保留收集最少的优惠券——的工作推导了完整的渐近展开，证明两种模型中方差均表现为 \( \tfrac{\pi^2}{6}\tfrac{N^2}{d^2} \)，并确认极限律为标准耿贝尔分布，两种规则有不同的归一化。<sup>[17](https://arxiv.org/abs/2607.01463)</sup>

**超级优惠券。** 在另一个推广中，每轮从 n 中抽取 r 张优惠券并将其所有 s-子集（“超级优惠券”）标记为已收集；收集全部 \( \binom{n}{s} \) 张超级优惠券的时间满足

\[ \mathbb{E}T^{(r,s)} = \frac{\binom{n}{s}\log\binom{n}{s}}{\binom{r}{s}}(1+o(1)), \]

在相应的归一化下具有耿贝尔极限。<sup>[3](https://link.springer.com/article/10.1007/s10959-025-01417-w)</sup> 当 \( s = 1 \) 时退化为经典问题，时间按因子 r 缩放。<sup>[3](https://link.springer.com/article/10.1007/s10959-025-01417-w)</sup>

**配额与分组抽取。** 该问题推广到在非均匀分布下收集优惠券 i 的 \( m_i \) 份，上下界给出了随机配额的极限渐近性。<sup>[18](https://www.combinatorics.org/ojs/index.php/eljc/article/view/v20i2p33)</sup> 优惠券成批到达的分组抽取以及随机样本量也得到了研究。<sup>[1](https://mat.uab.es/~matmat/ebook2014/V2014n02-ebook.pdf)</sup><sup> • </sup><sup>[19](https://www.researchgate.net/publication/225402602_A_Survey_of_the_Coupon_Collector%27s_Problem_with_Random_Sample_Sizes)</sup>

## 应用

**稳定婚姻。** 稳定婚姻问题的随机求婚算法在每个女性都收到一次求婚时终止，而所需的随机求婚次数恰好是一个优惠券收集问题：大约 \( n \ln n \) 次求婚后每个女性都已收到过求婚，从而产生一个稳定婚姻。<sup>[20](https://people.eecs.berkeley.edu/~jfc/cs174lecs/lec8/lec8.html)</sup>

**缓存与监控。** 该问题与电气工程中的缓存故障问题以及电气故障检测有关。<sup>[1](https://mat.uab.es/~matmat/ebook2014/V2014n02-ebook.pdf)</sup> 关于流行度不等的广义优惠券收集的工作推导了部分收集的期望等待时间与 LRU 缓存未命中率之间的渐近关系。<sup>[21](https://arxiv.org/abs/1706.05250)</sup> 网络监控中流算法的最坏情况分析推动了任意分布的优化结果。<sup>[14](https://arxiv.org/abs/1504.03878)</sup>

**生态学与生物学。** 非等概率的优惠券收集瓮模型在生态学和进化中被用来描述给定采样努力后有多少宿主被寄生，以及解决估计采样努力的逆问题；新项目被发现的速度取决于采样分布的整个形状。<sup>[22](https://pmc.ncbi.nlm.nih.gov/articles/PMC5332560/)</sup> 该问题在生物学中也用于估计动物物种数量。<sup>[1](https://mat.uab.es/~matmat/ebook2014/V2014n02-ebook.pdf)</sup>

## References

1. [Marco Ferrante and Monica Saltalamacchia (2014). The Coupon Collector's Problem. MATerials MATemàtics, Universitat Autònoma de Barcelona.](https://mat.uab.es/~matmat/ebook2014/V2014n02-ebook.pdf)
2. [Thomas Sauerwald. Randomised Algorithms, Lecture 1, University of Cambridge.](https://www.cl.cam.ac.uk/teaching/2122/RandAlgthm/lec1_intro.pdf)
3. [On a Generalisation of the Coupon Collector Problem, Journal of Theoretical Probability (2025).](https://link.springer.com/article/10.1007/s10959-025-01417-w)
4. [Donald J. Newman and Lawrence Shepp (1960). The Double Dixie Cup Problem. The American Mathematical Monthly 67(1), 58–61.](https://faculty.wharton.upenn.edu/wp-content/uploads/2012/04/Double-dixie-cup-problem.pdf)
5. [Coupon Collecting With Unequal Odds, Explained, Quant Memo.](https://quantmemo.com/concepts/coupon-collector-unequal-probabilities)
6. [Weiyu Xu and Ao Kevin Tang (2010). A Generalized Coupon Collector Problem. arXiv:1010.5608.](https://arxiv.org/abs/1010.5608)
7. [The Generalised Coupon Collector Problem, Journal of Applied Probability, Cambridge Core.](https://www.cambridge.org/core/journals/journal-of-applied-probability/article/generalised-coupon-collector-problem/4D5F06A32A7C98F87277BC33E49CE5AE)
8. [Randomized Algorithms (Spring 2010): Balls and bins, TCS Wiki, Nanjing University.](https://tcs.nju.edu.cn/wiki/index.php/Randomized_Algorithms_%28Spring_2010%29/Balls_and_bins)
9. [Asymptotics of multivariate contingency tables with fixed marginals, Journal of Computational and Applied Mathematics.](https://www.sciencedirect.com/science/article/pii/S0378375818300363)
10. [CS 388R Randomized Algorithms, Lecture 5 scribe notes, University of Texas at Austin (Eric Price).](https://www.cs.utexas.edu/~ecprice/courses/randomized/fa21/scribe/lec5.pdf)
11. [Rafael Oliveira. Balls and Bins, CS 466 lecture notes, University of Waterloo.](https://cs.uwaterloo.ca/~r5olivei/courses/2023-spring-cs466/lecture-notes/lecture4/)
12. [Pál Erdős and Alfréd Rényi (1961). On a Classical Problem of Probability Theory. Repository of the Academy's Library.](https://real.mtak.hu/201134/)
13. [The Coupon Collector's Problem Revisited: Asymptotics of the Variance, ResearchGate.](https://www.researchgate.net/publication/241681078_The_Coupon_Collector%27s_Problem_Revisited_Asymptotics_of_the_Variance)
14. [Optimization results for a generalized coupon collector problem. arXiv:1504.03878.](https://arxiv.org/abs/1504.03878)
15. [New results on a generalized coupon collector problem using Markov chains. arXiv:1402.5245.](https://arxiv.org/abs/1402.5245)
16. [General asymptotic estimates for the Coupon Collector Problem, Journal of Computational and Applied Mathematics 67(2), 277–289 (1996).](https://www.sciencedirect.com/science/article/pii/0377042795000208)
17. [Aristides V. Doumas and S. Spektor. Two Multi-Draw Coupon Collector models with different retention rules. arXiv:2607.01463.](https://arxiv.org/abs/2607.01463)
18. [Nathan B. Shank and Hannah Yang (2013). Coupon Collector Problem for Non-Uniform Coupons and Random Quotas. The Electronic Journal of Combinatorics 20(2), #P33.](https://www.combinatorics.org/ojs/index.php/eljc/article/view/v20i2p33)
19. [A Survey of the Coupon Collector's Problem with Random Sample Sizes, ResearchGate.](https://www.researchgate.net/publication/225402602_A_Survey_of_the_Coupon_Collector%27s_Problem_with_Random_Sample_Sizes)
20. [CS174 Lecture 7: Stable Marriages and Coupon Collecting, UC Berkeley.](https://people.eecs.berkeley.edu/~jfc/cs174lecs/lec8/lec8.html)
21. [Christian Berthet (2017). Contributions to the Generalized Coupon Collector and LRU Problems. arXiv:1706.05250.](https://arxiv.org/abs/1706.05250)
22. [The coupon collector urn model with unequal probabilities in ecology and evolution, PMC.](https://pmc.ncbi.nlm.nih.gov/articles/PMC5332560/)

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

Topic: 物质世界与数学 › 数学与统计学 › 逻辑与离散数学 › General discrete mathematics and discrete structures › Combinatorics › Combinatorics in other fields › Combinatorics and probability

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/coupon-collectors-problem

English original: https://www.edgepedia.org/coupon-collectors-problem
