Let denote the number of binary strings of length that contain no consecutive s.
The value of is
Marks were awarded to all candidates for this question. It is not scored as a normal quiz.
View worked solution
Marks to all
To find the number of binary strings of length with no consecutive s, we can set up a recurrence relation based on the ending bit of the string:
- Case 1: The string ends with
1. The remaining bits can be any valid string of length with no consecutive s. There are such strings. - Case 2: The string ends with
0. To avoid consecutive s, the second-to-last bit must be1. The remaining bits can be any valid string of length with no consecutive s. There are such strings.
This gives the recurrence relation:
Let's calculate the base cases directly:
- For : Valid strings are
0and1. - For : Valid strings are
01,10, and11.
Using the recurrence relation, we compute the subsequent terms:
The correct mathematical value for is 13. Since is not present in the given options (Option D is listed as 16), this question has no correct option, leading to the official answer key being marked as X (Marks to All).
Free practice · Your answers on this page are not saved.
