Computer Sciences > Gate 2016 Set-1 > Recurrence Relation
Let an be the number of n-bit strings that do NOT contain two consecutive 1s. Which one of the following is the recurrence relation for an?
A
an = an−1 +2an-2
B
an= an−1 +an-2
C
an= 2an−1 +an-2
D
an= 2an−1 +2an-2

Explanation

Correct : Recurrence Relation

Similar Questions

What is the worst-case time complexity of insertion in an AVL tree?
Question #23 Medium
Which operations on a binary search tree have O(h) complexity?
Question #31 Easy
Compare search complexities of sorted array vs balanced BST.
Question #47 Hard

Related Topics

Data Structures Binary Search Tree Time Complexity Algorithm Analysis Tree Algorithms Computer Science