返回题库

30 面骰 vs 20 面骰:Bob 可不看 Alice

30 Die Split III

专题
Probability / 概率
难度
L6

题目详情

Alice 有一枚公平 30 面骰,Bob 有一枚公平 20 面骰。两人同时掷出点数,点数更大者获胜;若平局,则 Bob 获胜。

Bob 在掷完第一次后可以选择是否重掷一次(他看不到 Alice 的点数),若选择重掷则用第二次结果作为最终点数。

在 Bob 最优策略下,求 Alice 获胜概率。

Alice and Bob have fair 3030-sided and 2020-sided dice, respectively. The goal for each player is to have the largest value on their die. Alice and Bob both roll their dice. However, Bob has the option to re-roll his die in the event that he is unhappy with the outcome. He can't see Alice's die beforehand. Bob then keeps the value of the new die roll. In the event of a tie, Bob is the winner. Assuming optimal play by Bob, find the probability Alice is the winner.

解析

Alice 获胜当且仅当 A>BA>B

由于 B20B\le 20,要最小化 P(A>B)P(A>B) 等价于让 Bob 最大化自己最终点数 BB 的期望(因为 P(A>B)=E[(30B)/30]=1E[B]/30P(A>B)=\mathbb{E}[(30-B)/30]=1-\mathbb{E}[B]/30)。

若 Bob 采用阈值策略:当第一次掷到 btb\le t 就重掷,否则保留,则

E[B]=t2+20t+42040,\mathbb{E}[B]=\frac{-t^2+20t+420}{40},

该二次函数在 t=10t=10 处取最大值。

因此 Bob 最优为:第一次掷到 1..10 就重掷,掷到 11..20 就保留。此时 E[B]=13\mathbb{E}[B]=13,所以

P(A>B)=11330=1730.P(A>B)=1-\frac{13}{30}=\frac{17}{30}.

Original Explanation

Let WW be the event Alice wins. First, we want to find P[W]\mathbb{P}[W]. Let AA and BB be the value of Alice's roll and Bob's first roll, respectively. The key here is to condition on whether or not A20A \leq 20. Namely, this means P[W]=P[WA20]P[A20]+P[WA>20]P[A>20].\mathbb{P}[W] = \mathbb{P}[W \mid A \leq 20] \mathbb{P}[A \leq 20] + \mathbb{P}[W \mid A > 20] \mathbb{P}[A > 20]. We can quickly see that P[A20]=23\mathbb{P}[A \leq 20] = \frac{2}{3}, as this accounts for 2020 of 3030 equally-likely values. If A>20A > 20, then clearly Alice wins regardless of what Bob obtains, so P[WA>20]=1\mathbb{P}[W \mid A > 20] = 1.

If A20A \leq 20, then we are really rolling 22 independent 2020-sided fair dice. Namely, to compute P[WA20]\mathbb{P}[W \mid A \leq 20], we see that the probability of a tie is 120\frac{1}{20}, as there are 2020 values they can agree upon out of 202=40020^2 = 400 outcomes. Therefore, the probability the two rolls are different is 1920\frac{19}{20}. Because of the fact that the two dice are symmetric, P[A>B]=121920=1940\mathbb{P}[A > B] = \frac{1}{2} \cdot \frac{19}{20} = \frac{19}{40}.

Combining these all together, we see that P[W]=131+231940=3960.\mathbb{P}[W] = \frac{1}{3} \cdot 1 + \frac{2}{3} \cdot \frac{19}{40} = \frac{39}{60}. Now, Bob is going to roll again whenever P[WB=b]>P[W]=3960\mathbb{P}[W \mid B = b] > \mathbb{P}[W] = \frac{39}{60}. This is because he wants to minimize Alice's chance of winning. It is easy to see that P[WB=b]=1b30.\mathbb{P}[W \mid B = b] = 1 - \frac{b}{30}. Alice just needs to roll a value of at least b+1b + 1.

We just need to find the maximum value of bb, say bb^*, such that P[WB=b]=1b30>3960\mathbb{P}[W \mid B = b] = 1 - \frac{b}{30} > \frac{39}{60}. Solving this inequality, we get that b10.5b \leq 10.5, so b=10b^* = 10 is the maximum value that Bob rolls again. Let W1W_1 be the event that Alice wins in this new game where Bob can roll again. We have that P[W1]=P[W]+1020(P[W]P[WB10]).\mathbb{P}[W_1] = \mathbb{P}[W] + \frac{10}{20}\left(\mathbb{P}[W] - \mathbb{P}[W \mid B \leq 10]\right). We get this because of the fact that Bob rolls again with probability 12\frac{1}{2} which is when he rolls at most 1010. Then, the probability Alice wins is going to change by P[W]P[WB10].\mathbb{P}[W] - \mathbb{P}[W \mid B \leq 10].

To calculate P[WB10]\mathbb{P}[W \mid B \leq 10], this is simply just averaging all the cases where B=bB = b for 1b101 \leq b \leq 10, as when B10B \leq 10, the value is uniformly distributed on the first 1010 positive integers. Therefore, P[WB10]=110b=110(1b30)=4960.\mathbb{P}[W \mid B \leq 10] = \frac{1}{10}\sum_{b=1}^{10} \left(1 - \frac{b}{30}\right) = \frac{49}{60}. Therefore, we get that P[W]=3960+12(39604960)=1730.\mathbb{P}[W] = \frac{39}{60} + \frac{1}{2}\left(\frac{39}{60} - \frac{49}{60}\right) = \frac{17}{30}.