返回题库

最后留下的弹珠

Last Marble Standing

专题
Probability / 概率
难度
L4

题目详情

Josephine 的坛子里有 rr 个红球、bb 个蓝球和 gg 个绿球。她每次从坛中取出一颗球,且抽出后不放回。求在最后一颗红球被抽出时,坛中仍至少剩下 1 个绿球和 1 个蓝球的概率。当 r=10,b=20,g=30r=10, b=20, g=30 时,这个概率是多少?

Josephine has rr red marbles, bb blue marbles, and gg green marbles in an urn. She draws out the marbles one at a time without replacement. Find the probability there is at least one green and one blue marble left in the urn right after the last red marble is selected. Find the probability when r=10,b=20,g=30r=10, b=20, g=30.

解析

我们可以把“不放回抽球”的过程建模为:对所有球进行一次均匀随机排列。

RRBBGG 分别表示红球、蓝球和绿球的集合。
定义 last(C)\operatorname{last}(C) 为颜色 CC 的最后一颗球在该排列中的位置。

我们要求的是:在最后一颗红球被抽出之后,坛中仍至少剩下一颗蓝球和一颗绿球的概率。

等价地说,我们要排除下面两个“坏事件”:

A:    last(G)<last(R),B:    last(B)<last(R).A : \;\; \operatorname{last}(G) < \operatorname{last}(R), \quad B : \;\; \operatorname{last}(B) < \operatorname{last}(R).

因此所求概率为 Pr(good)=1Pr(AB)=1Pr(A)Pr(B)+Pr(AB).\Pr(\text{good}) = 1 - \Pr(A \cup B) = 1 - \Pr(A) - \Pr(B) + \Pr(A \cap B).


第 1 步. 计算 Pr(A)\text{第 1 步. 计算 Pr(A)}

在颜色属于 RGR \cup Gr+gr+g 个球中,最后出现的是哪一个球是等可能的,因此 Pr(A)=Pr(RG 中最后一个球是红球)=rr+g.\Pr(A) = \Pr(\text{$R \cup G$ 中最后一个球是红球}) = \frac{r}{r+g}.

第 2 步. 计算 Pr(B)\text{第 2 步. 计算 Pr(B)}

用同样的道理, Pr(B)=rr+b.\Pr(B) = \frac{r}{r+b}.

第 3 步. 计算\text{第 3 步. 计算} Pr(AB)\text{Pr}(A \cap B)

事件 AABB 同时发生,当且仅当总体上最后一个被抽出的球是红球(也就是红球的最后出现位置晚于蓝球和绿球的最后出现位置)。因此 Pr(AB)=rr+b+g.\Pr(A \cap B) = \frac{r}{r+b+g}.


通用公式:\text{通用公式:} Pr(最后一颗红球被抽出后,至少还剩一颗蓝球和一颗绿球)=1rr+grr+b+rr+b+g.\Pr(\text{最后一颗红球被抽出后,至少还剩一颗蓝球和一颗绿球}) = 1 - \frac{r}{r+g} - \frac{r}{r+b} + \frac{r}{r+b+g}.
当 r=10, b=20, g=30 时:\text{当 r=10, b=20, g=30 时:} 11010+301010+20+1010+20+30=11413+16=712.1 - \frac{10}{10+30} - \frac{10}{10+20} + \frac{10}{10+20+30} = 1 - \frac{1}{4} - \frac{1}{3} + \frac{1}{6} = \frac{7}{12}. 712\boxed{\tfrac{7}{12}}

Original Explanation

We can model the process of drawing marbles without replacement as choosing a uniformly random permutation of all the marbles.

Let RR, BB, and GG denote the sets of red, blue, and green marbles.
Define last(C)\operatorname{last}(C) as the position of the last marble of color CC in the permutation.

We want the probability that after the last red is drawn, there is at least one blue and at least one green remaining.

Equivalently, we want to avoid the two “bad” events:

A:    last(G)<last(R),B:    last(B)<last(R).A : \;\; \operatorname{last}(G) < \operatorname{last}(R), \quad B : \;\; \operatorname{last}(B) < \operatorname{last}(R).

Thus the desired probability is Pr(good)=1Pr(AB)=1Pr(A)Pr(B)+Pr(AB).\Pr(\text{good}) = 1 - \Pr(A \cup B) = 1 - \Pr(A) - \Pr(B) + \Pr(A \cap B).


Step 1. Compute Pr(A)\text{Step 1. Compute Pr(A)}

Among the r+gr+g marbles of colors RGR \cup G, the final marble is equally likely to be any of them. Hence Pr(A)=Pr(last of RG is red)=rr+g.\Pr(A) = \Pr(\text{last of $R \cup G$ is red}) = \frac{r}{r+g}.

Step 2. Compute Pr(B)\text{Step 2. Compute Pr(B)}

By the same reasoning, Pr(B)=rr+b.\Pr(B) = \frac{r}{r+b}.

Step 3. Compute\text{Step 3. Compute} Pr(AB)\text{Pr}(A \cap B)

Both AA and BB occur iff the overall last marble is red (so red’s last is after both blue’s and green’s last). Thus Pr(AB)=rr+b+g.\Pr(A \cap B) = \frac{r}{r+b+g}.


General formula:\text{General formula:} Pr(at least one blue and one green left after last red)=1rr+grr+b+rr+b+g.\Pr(\text{at least one blue and one green left after last red}) = 1 - \frac{r}{r+g} - \frac{r}{r+b} + \frac{r}{r+b+g}.
Case r=10, b=20, g=30:\text{Case r=10, b=20, g=30:} 11010+301010+20+1010+20+30=11413+16=712.1 - \frac{10}{10+30} - \frac{10}{10+20} + \frac{10}{10+20+30} = 1 - \frac{1}{4} - \frac{1}{3} + \frac{1}{6} = \frac{7}{12}. 712\boxed{\tfrac{7}{12}}