Alice tosses a coin until she sees a head followed by a tail. Bob tosses a coin until he sees two heads in a row. On average, how many flips will Alice and Bob require?

### Alice

Let $x = \mathbb{E}[HT]$ be the expected number of flips to get HT, $\mathbb{E}[HT|H]$ is the expected number of flips to get HT given the last flip was H and similarly $\mathbb{E}[HT|T]$ is the expected number of flips to get HT given the last flip was T.

Assuming a fair coin we have

$$ x = \mathbb{E}[HT] = 0.5 \times (1 + \mathbb{E}[HT|H]) + 0.5 \times (1 + E[HT|T]) $$

If we flip a tail then this is comparable to start from scratch so $\mathbb{E}[HT|T] = x$.

If we flip a head then we either flip a T and we are done or we flip a head again. Therefore $\mathbb{E}[HT|H] = 0.5 \times (1) + 0.5 \times (1 + \mathbb{E}[HT|H])$. Solving this we find $\mathbb{E}[HT|H] = 2$.

Plugging these results back into the original equation we get

$$ x = \mathbb{E}[HT] = 0.5 \times (1 + 2) + 0.5 \times (1 + x) $$ $$ x = 1.5 + 0.5 + 0.5 \times x $$ $$ x = 4 $$

Therefore on average Alice makes four tosses.