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

Let an represent the number of bit strings o length n containing two consecutive 1s. Whats the recurrence ralation for an ?

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

The correct option is A an2+an1+2n2
a1=0 [no strings of length 1 contain two consecutive 1's]

a2=1[strings=11]
a3=3[ strings are : 011, 110,111]
a4=8[ strings are : 0011, 0110, 0111, 1011, 1100, 1101, 1110, 1111]

Option (a):
an=an2+an1+2n2
a4=a42+a41+242
=a2=a3+22
= 1+3+4 = 8 which is True.

Option (b):
an=an2+2an1+2n2
a4=a2+2a3+22
= 1+2x3+4=11 which is false.

Option (c) :

an=2an2+an1+2n2
a4=2a2+a3+22
= 2x1+3+4 = 9 which is false.

Option (d):

an=2an2+2an1+2n2
a4=2a2+2a3+22
= 2x1+2x3+4 = 12 which False.
Option(a):an=an2+an1+2n2 is correct.



​​​​​​​

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