Flip a fair coin until either HTH or HHT shows up as three in a row. The two triplets look interchangeable, so are they really equally likely to arrive first?
solvedhard2 min
You flip a fair coin repeatedly. What is the probability that the pattern HTH appears before
the pattern HHT?
The triplets are not symmetric, because of what each shares with the other. Once two heads in a
row appear, a single following tail finishes HHT immediately, whereas reaching HTH from that
same HH is impossible without passing through HHT first. That trap is what tilts the race.
Track the longest current suffix that is a prefix of either target. There are four transient
states, the start ∅, then H, HH, and HT, plus two absorbing states W for
HTH and L for HHT. Each toss is fair.
Every edge has probability one half. The only way out of HH is a tail into HHT, so once two heads land in a row the race is lost for HTH. That dead end is why HTH arrives first only one third of the time.