返回题库

硬币配对 IV

Coin Pair IV

专题
Probability / 概率
难度
L4

题目详情

面前有 4 枚公平硬币。你先同时抛掷 4 枚并观察结果。

之后你可以反复进行操作:只要当前仍有至少两枚反面(T),你就可以任选两枚反面并把这两枚再抛一次(注意:不能只抛 1 枚;每次必须抛 2 枚)。

当反面数少于 2 枚时,你无法继续操作,过程结束。

问:直到过程结束,期望一共需要进行多少次“硬币翻转”(按单枚硬币翻转计数;初始抛掷算 4 次翻转,每次操作算 2 次翻转)?

英文原题

Four fair coins appear in front of you. You flip all four at once and observe the outcomes of the coins. After seeing the outcomes, you may flip any pair of tails again. You may not flip a single coin without flipping another. You can iterate this process as many times as there are at least two tails to flip. Find the expected number of coin flips needed until you are unable to better your position.

解析

EkE_k 表示“当前反面数为 kk”时,直到结束还需要进行的操作次数期望(每次操作会翻转 2 枚)。显然 E0=E1=0E_0=E_1=0

k2k\ge 2 时,一次操作会把两枚反面重抛,其结果:

  • 变成 HH(概率 1/41/4):反面数变为 k2k-2
  • 变成 HT/TH(概率 1/21/2):反面数变为 k1k-1
  • 变成 TT(概率 1/41/4):反面数仍为 kk

因此

Ek=1+14Ek2+12Ek1+14EkEk=43+13Ek2+23Ek1.E_k=1+\frac14E_{k-2}+\frac12E_{k-1}+\frac14E_k \Rightarrow E_k=\frac{4}{3}+\frac{1}{3}E_{k-2}+\frac{2}{3}E_{k-1}.

由递推得 E2=43, E3=209, E4=8827E_2=\frac{4}{3},\ E_3=\frac{20}{9},\ E_4=\frac{88}{27}

初始抛掷后反面数 KBin(4,1/2)K\sim\mathrm{Bin}(4,1/2),故后续操作次数期望为

E[EK]=61643+416209+1168827=3427.\mathbb{E}[E_K]=\frac{6}{16}\cdot\frac{4}{3}+\frac{4}{16}\cdot\frac{20}{9}+\frac{1}{16}\cdot\frac{88}{27}=\frac{34}{27}.

每次操作翻转 2 枚硬币,所以后续翻转次数期望为 23427=68272\cdot\frac{34}{27}=\frac{68}{27}

再加上初始抛掷的 4 次翻转,总期望翻转次数为

4+6827=176276.5185.4+\frac{68}{27}=\boxed{\frac{176}{27}}\approx 6.5185.

英文解析

Let EkE_k indicate the * * number of operations * * that need to be done until the end when the current negative number is kk (2 flips per operation). Obviously E0=E1=0E_0=E_1=0.

When k2k\ge 2, two negatives are tossed in one operation, resulting in:

  • Become HH (probability 1/41/4): the negative number becomes k2k-2;
  • Become HT/TH (probability 1/21/2): the negative number becomes k1k-1;
  • Turns into TT (probability 1/41/4): the negative number is still kk.

Therefore,

Ek=1+14Ek2+12Ek1+14EkEk=43+13Ek2+23Ek1.E_k=1+\frac14E_{k-2}+\frac12E_{k-1}+\frac14E_k \Rightarrow E_k=\frac{4}{3}+\frac{1}{3}E_{k-2}+\frac{2}{3}E_{k-1}.

Deferred to E2=43,\E3=209,\E4=8827E_2=\frac{4}{3},\E_3=\frac{20}{9},\E_4=\frac{88}{27}.

The number of reverse sides after the initial throw is KBin(4,1/2)K\sim\mathrm{Bin}(4,1/2), so the number of subsequent operations is expected to be

E[EK]=61643+416209+1168827=3427.\mathbb{E}[E_K]=\frac{6}{16}\cdot\frac{4}{3}+\frac{4}{16}\cdot\frac{20}{9}+\frac{1}{16}\cdot\frac{88}{27}=\frac{34}{27}.

Each operation flips 2 coins, so the expected number of subsequent flips is 23427=68272\cdot\frac{34}{27}=\frac{68}{27}.

Coupled with the 4 flips of the initial throw, the total expected number of flips is

4+6827=176276.5185.4+\frac{68}{27}=\boxed{\frac{176}{27}}\approx 6.5185.