edgepedia

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

综合 · Edgepedia阅读需 8 分钟

优惠券收集问题

阅读英文原文

优惠券收集问题是概率论中的一个经典问题,它问的是:从一个包含 n 种等概率优惠券的集合中,有放回地独立抽取,平均需要抽多少次才能每种至少得到一张。答案是 nHn n H_n ,其中 Hn=1+12+⋯+1n H_n = 1 + \tfrac{1}{2} + \cdots + \tfrac{1}{n} 是第 n 个调和数,其增长速度约为 nlog⁡n n \log n 。1 该问题是随机算法分析中的标准范例,自十八世纪以来一直受到概率学家的研究。1

关键事实细节
期望抽取次数(等概率情形)E[T]=nHn≈nln⁡n+0.5772 n \mathbb{E}[T] = n H_n \approx n \ln n + 0.5772\,n ,其中 Hn H_n 为第 n 个调和数1
尾部界需要超过 nlog⁡n+cn n \log n + cn 次抽取的概率至多为 e−c e^{-c} 2
极限分布归一化后的完成时间收敛到耿贝尔分布3
m 套完整集合当 m 固定、n 很大时,需要 n(log⁡n+(m−1)log⁡log⁡n+o(1)) n(\log n + (m-1)\log\log n + o(1)) 次抽取;第一套花费 nlog⁡n n \log n ,之后所有套加起来只花费 nlog⁡log⁡n n \log\log n 4
非等概率期望没有简单的闭式表达;最稀有的优惠券主导等待时间5
多次抽取变体每轮抽取 d 张不同优惠券,收集 m 套平均需要 nlog⁡nd+nd(m−1)log⁡log⁡n+O(mn) \tfrac{n\log n}{d} + \tfrac{n}{d}(m-1)\log\log n + O(mn) 轮6
历史首次出现于棣莫弗的《抽签的度量》(1708);非等概率情形最早由 H. von Schelling(1954)处理1

问题陈述

优惠券从包含 n 种不同种类的总体中逐张收集,每次抽取独立同分布,即有放回抽取。当所有 n 种都被收集到时过程停止,记录总抽取次数 Y。7 在经典版本中每种等概率,每次抽取的概率为 1/n 1/n 。7

该问题等价于将球均匀且独立地投入 n 个箱子,问需要多少个球才能使没有箱子为空。8 文献中也以捕获–再捕获、委员会问题、矩阵占位和随机分配等名称记载同一过程。9

期望等待时间

阶段分解。 将总数写为 T=X1+X2+⋯+Xn T = X_1 + X_2 + \cdots + X_n ,其中 Xi X_i 是从 i−1 i-1 种不同优惠券增加到 i 种所需的抽取次数。第一次抽取总是得到新种类,所以 X1=1 X_1 = 1 。一旦持有 i 种不同优惠券,一次抽取为新种类的概率是 (n−i+1)/n (n-i+1)/n ,因此 Xi X_i 服从以该成功概率为参数的几何分布,期望为 n/(n−i+1) n/(n-i+1) 。1 各阶段变量相互独立,故由期望的线性性10

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

由于 Hn≈ln⁡n+γ H_n \approx \ln n + \gamma ,其中 γ≈0.5772 \gamma \approx 0.5772 为欧拉–马歇罗尼常数,期望约为 nln⁡n n \ln n 。1

集中性。 完成时间紧密集中在其均值附近。一个联合界论证表明,需要超过 nlog⁡n+cn n \log n + cn 次抽取的概率至多为 e−c e^{-c} ,因此在 nlog⁡n n \log n 之上再加 n 的常数倍即以高概率足够。2 同样的 nln⁡n n \ln n 尺度贯穿算法分析,例如完全图上随机游走的覆盖时间,以及图稀疏化所需的边数。11

极限分布。 经过适当的归一化后,收集全部优惠券的时间依分布收敛到一个缩放后的耿贝尔随机变量,即同样支配独立样本最大值的极值分布。3 这一耿贝尔极限在该问题的许多变体中反复出现。3

历史

该问题最早出现于 1708 年亚伯拉罕·棣莫弗的《抽签的度量》中,等概率情形下的进一步早期结果归功于拉普拉斯和欧拉。1 1954 年 H. von Schelling 首次得到了优惠券概率不等时完成收集的等待时间,1960 年唐纳德·J. 纽曼和劳伦斯·谢普计算了等概率情形下完成两套收集的等待时间。1 纽曼和谢普的“双迪克西杯”论文回答了 W. Weissblum 提出的一个问题:两个合作收集的孩子需要多长时间才能获得两套完整的 n 张图片。4 埃尔代什和雷尼在 1961 年匈牙利科学院数学研究所出版物上的一篇论文中处理了一个相关的经典问题。12

收集 m 套完整集合

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

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

虽然第一套花费 nlog⁡n n \log n ,但之后所有套加起来只花费 nlog⁡log⁡n n \log\log n 。4 后来杜马斯和帕帕尼科拉乌的工作将 Tm(N) T_m(N) 及其方差的渐近性推广到了优惠券概率不等的一般情形,包括广义齐夫定律等分布。13

非等概率

当优惠券种类以不等概率 pk p_k 出现时,问题虽然更贴近现实,却变得更加困难。1 完成收集的期望时间没有简单的闭式表达,且不成比例地由最稀有的优惠券驱动;一张极稀有的优惠券可以将期望购买次数推向无穷。5 • 1 精确公式存在,但对大规模收集计算量很大,因此实践中使用近似公式。1

优化结果刻画了哪些分布最容易、哪些最困难。几乎均匀分布——即所有非空优惠券具有相同抽取概率——在随机意义下最小化收集固定数量不同优惠券的期望时间,而在一个闭分布集中,除一项外其余所有项都取最小可能值的分布在随机意义下最大化该时间。14 • 15 任意优惠券概率的一般渐近估计在 1990 年代得到发展。16

推广

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

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

ET(r,s)=(ns)log⁡(ns)(rs)(1+o(1)), \mathbb{E}T^{(r,s)} = \frac{\binom{n}{s}\log\binom{n}{s}}{\binom{r}{s}}(1+o(1)),

在相应的归一化下具有耿贝尔极限。3 当 s=1 s = 1 时退化为经典问题,时间按因子 r 缩放。3

配额与分组抽取。 该问题推广到在非均匀分布下收集优惠券 i 的 mi m_i 份,上下界给出了随机配额的极限渐近性。18 优惠券成批到达的分组抽取以及随机样本量也得到了研究。1 • 19

应用

稳定婚姻。 稳定婚姻问题的随机求婚算法在每个女性都收到一次求婚时终止,而所需的随机求婚次数恰好是一个优惠券收集问题:大约 nln⁡n n \ln n 次求婚后每个女性都已收到过求婚,从而产生一个稳定婚姻。20

缓存与监控。 该问题与电气工程中的缓存故障问题以及电气故障检测有关。1 关于流行度不等的广义优惠券收集的工作推导了部分收集的期望等待时间与 LRU 缓存未命中率之间的渐近关系。21 网络监控中流算法的最坏情况分析推动了任意分布的优化结果。14

生态学与生物学。 非等概率的优惠券收集瓮模型在生态学和进化中被用来描述给定采样努力后有多少宿主被寄生,以及解决估计采样努力的逆问题;新项目被发现的速度取决于采样分布的整个形状。22 该问题在生物学中也用于估计动物物种数量。1

References

  1. Marco Ferrante and Monica Saltalamacchia (2014). The Coupon Collector's Problem. MATerials MATemàtics, Universitat Autònoma de Barcelona.
  2. Thomas Sauerwald. Randomised Algorithms, Lecture 1, University of Cambridge.
  3. On a Generalisation of the Coupon Collector Problem, Journal of Theoretical Probability (2025).
  4. Donald J. Newman and Lawrence Shepp (1960). The Double Dixie Cup Problem. The American Mathematical Monthly 67(1), 58–61.
  5. Coupon Collecting With Unequal Odds, Explained, Quant Memo.
  6. Weiyu Xu and Ao Kevin Tang (2010). A Generalized Coupon Collector Problem. arXiv:1010.5608.
  7. The Generalised Coupon Collector Problem, Journal of Applied Probability, Cambridge Core.
  8. Randomized Algorithms (Spring 2010): Balls and bins, TCS Wiki, Nanjing University.
  9. Asymptotics of multivariate contingency tables with fixed marginals, Journal of Computational and Applied Mathematics.
  10. CS 388R Randomized Algorithms, Lecture 5 scribe notes, University of Texas at Austin (Eric Price).
  11. Rafael Oliveira. Balls and Bins, CS 466 lecture notes, University of Waterloo.
  12. Pál Erdős and Alfréd Rényi (1961). On a Classical Problem of Probability Theory. Repository of the Academy's Library.
  13. The Coupon Collector's Problem Revisited: Asymptotics of the Variance, ResearchGate.
  14. Optimization results for a generalized coupon collector problem. arXiv:1504.03878.
  15. New results on a generalized coupon collector problem using Markov chains. arXiv:1402.5245.
  16. General asymptotic estimates for the Coupon Collector Problem, Journal of Computational and Applied Mathematics 67(2), 277–289 (1996).
  17. Aristides V. Doumas and S. Spektor. Two Multi-Draw Coupon Collector models with different retention rules. arXiv: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.
  19. A Survey of the Coupon Collector's Problem with Random Sample Sizes, ResearchGate.
  20. CS174 Lecture 7: Stable Marriages and Coupon Collecting, UC Berkeley.
  21. Christian Berthet (2017). Contributions to the Generalized Coupon Collector and LRU Problems. arXiv:1706.05250.
  22. The coupon collector urn model with unequal probabilities in ecology and evolution, PMC.

Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026; Oct 15, 2026 · Edited: Sep 30, 2026; Oct 15, 2026

© 2026 Biostate AI。依据 Edgepedia Community License,注明出处即可免费使用。 嵌入参考卡片。

报告错误

优惠券收集问题

请至少选择一个原因。