返回题库

差 2 也算赢

2 Below I

专题
Algorithmic Programming / 算法编程
难度
L4

题目详情

你和朋友各自选择 1..100 的整数。若你选的数严格更大,则你赢 1;若相等则 0;但如果你选的数恰好比对方小 2,你也算赢。

双方都最优博弈时,最优策略是一个混合策略:从某分布抽随机变量 XX 作为选择。

Var(X)\mathrm{Var}(X)

You and friend play a game where you both select an integer 11001-100. The winner receives $1 from the loser. The winner is the player who selects the strictly higher number. If there is a tie, then nothing happens. However, a player can also win by selecting a value exactly 22 below the larger integer. For example, if you select 8080 and your friend selects 8282, you are the winner in this case. Assume both you and your friend play optimally. The optimal strategy here is a mixed strategy, where you select a random value XX from some appropriately determined distribution. Find Var(X)\text{Var}(X).

解析

注意到任意 nn 都被 n+3n+3 支配(因为 n+3n+3 额外还能赢 n+2n+2),因此均衡只会在 98、99、100 上混合。

为避免被对方针对,必须在 98、99、100 上取均匀分布。

于是 XUnif{98,99,100}X\sim\mathrm{Unif}\{98,99,100\}

E[X]=99,Var(X)=(9899)2+(9999)2+(10099)23=23.\mathbb{E}[X]=99,\quad \mathrm{Var}(X)=\frac{(98-99)^2+(99-99)^2+(100-99)^2}{3}=\frac{2}{3}.

Original Explanation

Suppose you were planning to select a value nn. Note that n+3n+3 is strictly better than nn, as n+3n+3 will beat all integers nn would beat, as well as the integer n+2n+2. Therefore, whenever you can select nn, you should select n+3n+3. This means that your strategy should be to select 98,99,98, 99, or 100100 with some probabilities.

By the symmetry of the game, your friend should also select those values with the same probabilities. In particular, if you select 9810098-100 with equal probability, no matter what probabilities your friend selects 98,99,98, 99, and 100100 with, the expected payout for each player is 00 by symmetry. This is because we see that 9898 is beat by 9999, 9999 is beat by 100100, and 100100 is beat by 9898, so each of the three outcomes is dominated by one other outcome.

Furthermore, if you select a non-uniform distribution on 98,99,10098, 99, 100 for your values, there exists a strategy your friend can select that yields positive expected payout for them. The probabilities of selecting each of the values for you would be p1,p2,p_1, p_2, and 1p1p21-p_1-p_2. For a numerical demonstration, say p1=15p_1 = \frac{1}{5} and p2=12p_2 = \frac{1}{2}. Then your friend should always select the value that maximizes their probability of winning. In this case, they should select 100100, as the expected payout would be (1)15+(1)12+(0)310>0(-1) \cdot \frac{1}{5} + (1) \cdot \frac{1}{2} + (0) \cdot \frac{3}{10} > 0. Namely, if xx is the value assigned to probability max{p1,p2,1p1p2}\max\{p_1, p_2, 1-p_1-p_2\}, then your friend should always select the value that beats xx. Therefore, to eliminate this opportunity, you should select a uniform distribution among 9810098-100.

This means XDiscreteUnif{98,99,100}X \sim \text{DiscreteUnif}\{98, 99, 100\}, so E[X]=99\mathbb{E}[X] = 99 and Var(X)=(9899)2+(9999)2+(10099)23=23\text{Var}(X) = \frac{(98-99)^2 + (99-99)^2 + (100-99)^2}{3} = \frac{2}{3}.