The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
0 votes

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$').

asked in Others by Veteran (116k points)
reshown by | 17 views

1 Answer

0 votes
I think a(n)=a(n-1)+2; a0=1
answered by (373 points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
49,447 questions
53,651 answers
70,913 users