I am trying to answer the question - You toss a fair coin $n$ times. What is the expected number of strings of $h$ consecutive heads assuming overlapping instances are not allowed?
In the standard version of this problem, it is assumed that overlapping occurrences are allowed. In this case, we note that there are $n - h + 1$ spots of size $h$ in the huge string of length $n$ containing all the tosses. These spots constitute the locations in which the $h$ consecutive heads can occur. Therefore, by the linearity of expectations, the answer is $\frac{n - h + 1}{2^{h}}$. However, I don't think this can be applied here.
My Approach
I noticed that there was the potential for a recurrence relation to be formulated here using a first-step analysis of sorts. I first define $E(\alpha) =$ expected # of strings of $h$ heads in $\alpha$ tosses. Then we want to find $E(n)$.
- We could get $h$ heads in the first $h$ tosses, in which case the expected value is $1 + E(n - h)$. This occurs with probability $\frac{1}{2^h}$
- We could get a tail on the first toss, in which case the expected value is $E(n-1)$. This occurs with probability $\frac{1}{2}$
- We could get a heads and then a tails on the first two tosses, in which case the expected value is $E(n-2)$. This occurs with probability $\frac{1}{4}$
- We could get two heads and then a tails on the first three tosses, in which case the expected value is $E(n - 3)$. This occurs with probability $\frac{1}{8}$
This continues until the final case -
- We could get $h-1$ heads and then a tails on the first $h$ throws, in which case the expected value is $E(n-h)$. This occurs with probability $\frac{1}{2^h}$
We can summarize all of these possibilities in a recurrence relation -
$E(n) = \frac{1}{2^h}\left(1 + E(n-h)\right) + \sum_{i=1}^{h}\frac{1}{2^{i-1}}E(n-i)$
This is where I stopped. I do see that the recurrence relation can be converted into a homogeneous one by considering $E(n - 1) = \frac{1}{2^h}\left(1 + E(n-1-h)\right) + \sum_{i=1}^{h}\frac{1}{2^{i-1}}E(n-1-i)$ and subtracting this from the original relation. This gives us
$E(n) - E(n-1) = \frac{1}{2^h}\left(E(n-h) - E(n-h-1)\right) + \sum_{i=1}^{h}\frac{1}{2^{i-1}}\left(E(n-i)-E(n-i-1)\right)$.
This is far too complicated for me to do anything about now.
Did I make this problem too complicated by approaching it this way? Is this approach even correct?