17 views

A bit string is called legitimate if it contains no consecutive zeros, e.g., 0101110 is legitimate, where as 10100111 is not. Let $a_n$ denote the number of legitimate bit strings of length $n$. Define $a_0=1$. Derive a recurrence relation for $a_n$ (i.e., express $a_n$ in terms of the preceding $a_i$').

reshown | 17 views

I think a(n)=a(n-1)+2; a0=1

+1 vote
1
2