返回题库

硬币三连模式

Coin Triplets

专题
Probability / 概率
难度
L4

题目详情

题目 (A)

你不断抛一枚公平硬币。

  1. 得到连续 HHH 的期望抛掷次数是多少?
  2. 得到连续 THH 的期望抛掷次数是多少?

题目 (B)

一直抛到 HHHTHH 中的任意一个首次出现为止。问:HHH 先于 THH 出现的概率是多少?

题目 (C)

两名玩家各自选择一个不同的 3 位硬币序列。玩家 1 先选并宣布,玩家 2 再选一个不同序列。随后不断抛公平硬币,直到两人序列之一首次出现;出现谁的序列谁获胜。

若双方完全理性,先手更有利还是后手更有利?若你是后手,你的获胜概率大约是多少?

Problem (A)

You keep tossing a fair coin.

  1. What is the expected number of tosses to get HHH in a row?
  2. What is the expected number of tosses to get THH in a row?

Problem (B)

If you toss a fair coin until either HHH or THH appears first, what is the probability that HHH appears before THH?

Problem (C)

Two players each choose a distinct 3-coin sequence. Player 1 chooses and announces first; then Player 2 picks a different sequence. They toss a fair coin until one of the two chosen triplets appears. The player whose sequence appears first wins.

If both players are perfectly rational, is it better to be the first chooser or the second chooser? If you go second, what is your probability of winning?

解析

解答 (A)

  1. HHH

设状态:SS(当前连续 H 个数为 0)、HH(1 个 H)、HHHH(2 个 H)、HHHHHH(吸收态)。令 μS\mu_S 为从 SS 到达 HHHHHH 的期望时间,则

{μS=1+12μS+12μH,μH=1+12μS+12μHH,μHH=1+12μS+12μHHH,μHHH=0.\begin{cases} \mu_S=1+\tfrac12\mu_S+\tfrac12\mu_H,\\ \mu_H=1+\tfrac12\mu_S+\tfrac12\mu_{HH},\\ \mu_{HH}=1+\tfrac12\mu_S+\tfrac12\mu_{HHH},\\ \mu_{HHH}=0. \end{cases}

解得 μS=14\mu_S=14,因此期望为 14 次

  1. THH

设状态:SSTTTHTHTHHTHH(吸收态)。同理可列方程并解得 μS=8\mu_S=8,因此期望为 8 次

解答 (B)

可用马尔可夫链/状态分析得到

P(HHH  先于  THH)=18.P(\mathrm{HHH\;先于\;THH})=\frac18.

解答 (C)

序列胜负具有“非传递性”,不存在一个序列能以 >1/2>1/2 赢所有序列;但作为后手,你可以针对先手的选择挑一个反制序列,使胜率 >1/2>1/2。因此 后手更有利,在最佳反制下后手胜率通常在 2/3\sim 2/3 左右。


Original Explanation

Answer (A)

  1. HHH:

    Define states:

    • SS: start/reset state (0 heads in a row),
    • HH: (1 head in a row),
    • HHHH: (2 heads in a row),
    • HHHHHH: absorbing (3 heads in a row).

    Let μS\mu_S be the expected time to reach HHH from state SS, etc. Then: {μS=1+12μS+12μH,μH=1+12μS+12μHH,μHH=1+12μS+12μHHH,μHHH=0.\begin{cases} \mu_S = 1 + \tfrac{1}{2}\,\mu_S + \tfrac{1}{2}\,\mu_H,\\ \mu_H = 1 + \tfrac{1}{2}\,\mu_S + \tfrac{1}{2}\,\mu_{HH},\\ \mu_{HH} = 1 + \tfrac{1}{2}\,\mu_S + \tfrac{1}{2}\,\mu_{HHH},\\ \mu_{HHH} = 0. \end{cases} Solving, μS=14\mu_S = 14. So on average 14 tosses are needed.

  2. THH:

    Define states:

    • SS: start,
    • TT: (one T in last toss),
    • THTH: (T followed by H),
    • THHTHH: absorbing.

    Then: {μS=1+12μS+12μT,μT=1+12μT+12μTH,μTH=1+12μT+12μTHH,μTHH=0.\begin{cases} \mu_S = 1 + \tfrac{1}{2}\,\mu_S + \tfrac{1}{2}\,\mu_T,\\ \mu_T = 1 + \tfrac{1}{2}\,\mu_T + \tfrac{1}{2}\,\mu_{TH},\\ \mu_{TH} = 1 + \tfrac{1}{2}\,\mu_T + \tfrac{1}{2}\,\mu_{THH},\\ \mu_{THH} = 0. \end{cases} Solving, μS=8\mu_S = 8. So on average 8 tosses are needed.

Answer (B)

A detailed Markov chain or direct state analysis shows that P(HHH before THH)=18.P(\text{HHH before THH}) = \frac{1}{8}. Intuitively, once you get a T, you partially “reset,” making THH more likely. The only way to see HHH first is essentially to get three heads quickly before a tail spawns the THH pattern.

Answer (C)

  • There is no single triplet that beats every other triplet with probability above 1/21/2 (non-transitivity).
  • As second chooser, you can always pick a sequence with winning probability >1/2>1/2 against Player 1’s choice (often by matching certain overlaps).
  • Therefore, being second is better. In fact, with an optimal counter-sequence, the second chooser typically achieves a probability of winning around 2/32/3.