master cherundo
- 13
- 0
Homework Statement
Find a recurrence relation for the number of bit strings of length n that contain three consecutive 0s.
The Attempt at a Solution
Divide the bit strings into two condition: one that have three consecutive 0s, another that does not. Let x_i denote the bit strings of length n that fulfill that condition. Then, we can get x_i by adding a 0 or a 1 to x_{i-1}. But, there is another bit strings that included in x_i. That is by adding 1000 string to bit strings of length n-3 that does not have three consecutive 0s. This is can be write by 2^{n-4}-x_{n-4}. So, we get x_n=2x_{n-1}-x_{n-4}+2^{n-4}.
Is my recurrence relation right?
Examples i ever seen is just discuss about bit strings of length n that does not have k bit strings..
Thank you
master cherundo
Last edited: