返回题库

排队买票找零

Ticket Line

专题
Probability / 概率
难度
L4

题目详情

售票处一张票 5 美元,共有 2n2n 人排队,其中 nn 人只有 5 美元纸币,nn 人只有 10 美元纸币。售货员一开始没有零钱。

在不改变队列顺序的情况下,售货员从头到尾都能找开零钱、使每个人都顺利买到票的概率是多少?

At a theater ticket office, 2n2n people line up to buy $5 tickets. Among them, nn people only have a $5 bill, and nn people only have a $10 bill. The seller starts with no change. If we do not reorder the line, what is the probability that everyone can buy their ticket in that order without ever running out of $5 bills for change?

解析

把带 5 元的人记为 +1+1(零钱 +1),带 10 元的人记为 1-1(零钱 -1)。我们要求长度为 2n2n、包含 nn+1+1nn1-1 的序列,其部分和永不为负。

总序列数为 (2nn)\binom{2n}{n}

满足“部分和非负”的序列数是 Catalan 型计数:

1n+1(2nn).\frac{1}{n+1}\binom{2n}{n}.

因此所求概率为

1n+1(2nn)(2nn)=1n+1.\frac{\frac{1}{n+1}\binom{2n}{n}}{\binom{2n}{n}}=\frac{1}{n+1}.

Original Explanation

Model each $5 payer as +1+1 and each $10 payer as 1-1. We need the partial sums of the sequence of 2n2n steps (with nn steps of +1+1 and nn steps of 1-1) never to go negative. The total number of such sequences is (2nn),\binom{2n}{n}, and the number of “nonnegative partial sum” sequences is the Catalan-type count 1n+1(2nn).\frac{1}{n+1}\,\binom{2n}{n}. Hence the probability is 1n+1(2nn)(2nn)=1n+1.\frac{\frac{1}{n+1}\binom{2n}{n}}{\binom{2n}{n}} = \frac{1}{n+1}.