retagged by
716 views

1 Answer

Best answer
0 votes
0 votes
An = An-1

A1 = 2, A0 = 0.

As the question demands that no consecutive zeroes or ones to be present, we are left with only one possibility i.e. alternate bits in the string.

Now, either the string can start with 0 or 1 so the string can be either 0101.... or 10101....

Hence for n-length string only two strings are possible.

Hence the above recurrence relation.
selected by

Related questions

0 votes
0 votes
0 answers
1
aniketpatil32 asked May 11, 2019
222 views
T(n)=T(√n) + n I am finding it difficult to solve last step of this recurrence relation . Please help me with expansion of this recurrence relation.
3 votes
3 votes
2 answers
3
Atul Verma12 asked Dec 13, 2016
819 views
solve the recurrence relation:$T(n)=T(\sqrt{n})+\Theta (\log \log n)$My first step was to let $m=\log ⁡n$, making the above:$T(2^m)=T(2^{\frac{m}{2}})+\Theta (\log m)$W...
4 votes
4 votes
7 answers
4
Anil Khatri asked Aug 31, 2016
8,932 views
Determine theta bound for recurrence :$$T(n)=T(n/2)+T(n/4)+T(n/8)+n$$