Consider the following:
Find a recurrence relation and give initial conditions for the number of bit strings of length n that do not have two consecutive 0s.
I am trying to understand the solution to this problem, but I am stuck on this line of the solution:
To obtain a recurrence relation for {an}, note that by the sum rule, the number of bit strings of length n that do not have two consecutive 0s equals the number of such bit strings ending with a 0 plus the number of such bit strings ending with a 1.
I don't understand why this is the case. For example, what if you have a bit string 000, it ends in 0, but has 2 consecutive 0s.
Could someone help me understand this?
Best Answer
So, if you read it carefully, you'll see that it says the following: