I have seen multiple posts on how to prove this, but I don't understand why we need only Fib(n-1) and Fib(n-2) from the Fib series to prove it. Why do we only need Fib(n), Fib(n-1) and Fib(n-2)? How are these three elements in the series sufficient to tell total sequences of valid binary strings? Why can't we have something like Fib(n) = Fib(n - 1) + Fib(n - 2) + C*Fib(n-3) +...
Asked
Active
Viewed 248 times
1
Parth Gupta
- 33
-
2Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Nov 08 '22 at 17:24
-
Does this answer your question? Proving the number of $n$ length binary strings with no consecutive $1's$ $b_n$ is equal to $b_{n-1} + b_{n-2}$ – Anne Bauval Nov 08 '22 at 22:00
-
@AnneBauval, I looked at it but couldn't figure out the answer to the doubt. – Parth Gupta Nov 08 '22 at 22:14
1 Answers
1
Define $a_n$ as the number of $n$-sequences that ends with $1$ and $b_n$ the number of $n$-sequences that ends with $0$. It is easy to see that $b_{n+1}=a_n+b_n$ and $a_{n+1}=b_n$. From the second one we conclude that $b_{n+1}=b_n+b_{n-1}$ and that defining $$c_n:=b_n+a_n=b_{n+1}$$ we conclude what we want.
-
A binary string of length (n+1) could end with 1 as well, so why didn't we show if for $a_{n + 1}$ in the final answer? – Parth Gupta Nov 08 '22 at 17:48