wiz-icon
MyQuestionIcon
MyQuestionIcon
2
You visited us 2 times! Enjoying our articles? Unlock Full Access!
Question

Let an be the number of n-bit strings that do NOT contain two consecutive 1's. Which one of the following is the recurrence relation for an ?

A
an = an1 + 2an2
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
an = an1 + an2
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
C
an = 2an1 + an2
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
an = 2an1 + 2an2
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is B an = an1 + an2
Let an be the number of n-bit strings that do not contain two consecutive 1's. we wish to develop a recurrence relation for an. Consider 1 bit strings 0, 1
So, a1 = 2
Consider 2 bit strings 00, 01, 10, 11
Out of minimum only 00, 01, 10 do not contain two consecutive 1's.
So, a2 = 3

Out of minimum six strings only 000, 001, 010, 100 and 101 five strings satisfy do not contain two consercutive 1's.
So, a3 = 5. Three numbers a1, a2, a3 satisfy clearly only (b) an = an1 + an2 is correct

flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Sets and Their Representations
MATHEMATICS
Watch in App
Join BYJU'S Learning Program
CrossIcon