Combinatorics problem with bit-strings When only three types of bit strings 0, 10,11 are available, how many valid $7$-bit strings can be represented? For example, the bit string 0101110, which is composed of 0, 10, 11, 10, is a valid bit string, but 1100101 is invalid.
Define $f(n)$ as the number of valid $n$-bit strings and define the empty string as valid.  So $f(0)=f(1)=1$.  We can create a valid string of length $n$ by taking a string of length $n-1$ and appending "$0$" or by taking a string of length $n-2$ and appending either "$10$" or "$11$".  So, we have $f(n)=f(n-1)+2f(n-2)$.  From here, we get

$$f(2)=f(1)+2f(0)=1+2=3$$
$$f(3)=f(2)+2f(1)=3+2=5$$
$$f(4)=f(3)+2f(2)=5+6=11$$
$$f(5)=f(4)+2f(3)=11+10=21$$
$$f(6)=f(5)+2f(4)=21+22=43$$
$$f(7)=f(6)+2f(5)=43+42=85$$
The numbers 11 and 10 have 2 digits(2 bits) and 0 has a single digit(1 bit).
The 7 bits can be formed in 4 cases:  1) three 2 bits and one 1 bit
                                      2) two 2 bits and three 1 bits
                                      3) one 2 bit and five 1 bits
                                      4) zero 2 bits and seven 1 bits.  

Case 1:
_ _ _ 0   the first three blanks can be filled in 8 ways(2 ways for 1st blank{because it 
                can be filled by 10 or 11}, 2 ways in 2nd and the same goes for the 3rd).

so by product rule 2*2*2=8 ways

Case 2:
_ _ 0 0 0  the first two blanks can be filled in 4 ways( 2 ways for 1st and in two for 
                                                                                  2nd).

so by product rule we have 2*2 = 4.

Case 3:
_ 0 0 0 0 0   the first blank can be filled in 2 ways(with 10 or 11).

so this equals 2.

Case 4:
0 0 0 0 0 0 0   this is applicable in only one way.

(i didn't have the need to choose the one bit because it is 0 for sure)

now to obtain the final answer add all the cases.

which equals 8 + 4 + 2 + 1 = 15.

therefore there 15 strings.

I am happy to receive any corrections if this is wrong :)