How do I solve this textbook question:
If we let $n\geq 1$ be an integer and define $A_n$ to be the number of bitstrings of length $n$ that do not contain $101$
- How do I determine $A_1$, $A_2$, $A_3$ $A_4$
and how do I prove that for each integer $n\geq4$,
$A_n$ = 3 +$A_1$+$A_2$+$A_3$+$\cdot$$\cdot$$\cdot$+$A_{n-4}$+$A_{n-3}$+$A_{n-1}$ = 3+$\sum_{k=1}^{n-3}{A_k} {+} A_{n-1}$
haha I'm working on the same question, what I currently have is, consider....
i) a bit string of length n that begins with a zero and doesn't contain 101, removing the first character then there are $A_{n-1}$
ii) now a bit string that begins with 10 and doesn't contain a 101, thus the third character has to be a 0, so now we can remove the first 3 charaters and we have $A_{n-3}$ ways of doing this one
iii)now a bit string beginning with 11 that doesn't contain 101, we have to break this up into 2 cases, the proceeding character is a a) 0, b) 1
a) if the third character is a 0 then by definition the fourth must be a 0, and there are $A_{n-4}$ ways of doing this
b)if the third character is another 1 we go back to the start of iii and consider the proceeding cases we will end up with the conclusion without a loss of generality that $An = A_1+A_2+A_3+⋅⋅⋅+A_{n−4}+A_{n−3}+A_{n−1}$
but now I'm confused as to where this magic 3 comes into play maybe you can help there