I know this question has been asked several times here before, but I think I have a different view and that's why I wanted some help with it.
Let me first state a few numbers here:
E(coin tosses until $HTH$ appears) = $10$
E(coin tosses until $HHT$ appears) = $8$
E(coin tosses until $HT$ appears) = $4$
E(coin tosses until $HH$ appears) = $6$
E(coin tosses until $H$ appears) = $2$
E(coin tosses until $T$ appears) = $2$
What I am upto: I know given any such pattern, I can construct a Markov chain with the absorbing state being the pattern sough. Then the waiting time for the absorbing state will give me the expectation of the number of coin tosses.
But I thought if I can build up these expectations recursively. More precisely, can I express expectation of a pattern of length $n$ in terms of expectation of patterns of length $k$ $(k < n)$?
So to attack this problem, I first thought of how to express $HTH$ in terms of $HT + H$. I don't know how to present the following argument formally, but here's a very vague explanation:
In the first 4 tosses, I expect to see a $HT$. If following $HT$ was a $H$, then I have won ($HTH$), but I could fail for the first time and get a $T$.
Now in the next following 4 coin tosses again, I expect to see a $HT$. This time, I expect to see a $H$, following the $HT$ coin toss.
Hence I expect to see $HTH$ in 10 coin tosses.
Now, if I am apply similar kind of reasoning to $HHT$ case, I would end up getting something like this:
I expect to see $HH$ in the first 6 coin tosses. And the first time, I could fail to see a following $T$. So in the next 6 tosses I would again see a $HH$ and this time I would expect to win. Hence, total of 14 coin tosses to win.
But clearly, that line of reasoning turns out to be wrong.
Is there some way I can condition on previous tosses and get the required expectation?