An infinite Penney’s game.

combinatoricsexpected valuemarkov chainsprobabilitystochastic-processes

Context:
I need to solve one variation of the Penney's game.

Problem:
Two players ($A$ and $B$) throw a coin until one of the victory sequences appears. For player $A$ the victory sequence is $HTT$, for player $B$ the victory sequence is $TTH$. What is the probability that $A$ wins and what is the expected number of throws given that $A$ won?

My attempt:
Intuitively, it seems that player $B$ is more likely to win.
Basically, I reliase that we can use the Markov-Chains, but my idea is only draw a binary tree and consider the sequences on the n-th step. My another idea was to calculate the expected number of throws to get, say, $HH$ that would be equal to $r_{HH}$:

$$r_{HH} = \frac{1}{4}E(number|HH) + \frac{1}{4}E(number|HH)+ \frac{1}{4}E(number|TT)+ \frac{1}{4}E(number|TH) = \frac{1}{4}(9 + \frac{5}{2} r_{HH})$$ And get $r_{HH}$.

My issues: I don't really understand how to join these ideas to get a proper solution.

Best Answer

The probability that player A wins is $\frac{3}{4}$, by the following logic. Suppose it takes more than three throws for player B to win; then all earlier throws must have been $T$'s, because if there's even a single $H$ before the sequence $TTH$, player A would win. Thus player B only wins with the sequences $TTH, TTTH, TTTTH$, etc, and those probabilities add to $\frac{1}{4}$.

Let $x$ be the number of expected flips to get $HTT$; also, let $y$ be the number of additional flips after flipping an $H$, and $z$ be the number of additional flips after flipping an $HT$.

If the first flip is an $H$, then the expected number of additional flips required is $y$; if the first flip is a $T$, then the expected number of additional flips is $x$. This yields the equation $x = 1 + \frac{1}{2}y + \frac{1}{2}x$.

Similarly, after flipping an $H$, if the next flip is also an $H$, then the expected number of additional flips required is $y$, whereas if the next flip is a $T$, the expected number of additional flips required is $z$.This yields the equation $y = 1 + \frac{1}{2}y + \frac{1}{2}z$.

Finally, after flipping $HT$, if the next flip is an $H$, the expected number of additional flips required is $y$, whereas if the next flip is a $T$, we are done.This yields the equation $z = 1 + \frac{1}{2}y$.

Simplifying, we get the system

$$\begin{align} x &= y + 2 \\ y &= z + 2 \\ 2z &= y + 2 \end{align}$$

which yields $(x,y,z) = (8,6,4)$.

Thus the expected number of flips for player A to win is $8$.