Related questions with answers
If is a bit string, let be the maximum number of consecutive 0’s in . [Examples: .] Let be the number of n-bit strings with . Develop a recurrence relation for
Solution
VerifiedGiven:
is a bit string
=maximum number of consecutive 0's in
number of -bit strings with
When is an -bit string with at most 2 consecutive zeros and , then either ends with 1 or with 10 or with 100 (as has at most two consecutive zeros).
When ends with 1, then there are possible strings for the remaining digits and thus there are strings that end with 1.
When ends with 10, then there are possible strings for the remaining digits and thus there are strings that end with 10.
When ends with 100, then there are possible strings for the remaining digits and thus there are strings that end with 100.
In total, there are thus -bit strings with at most two consecutive zeros (when ).
There are 2 1-bit strings that contain at most 2 consecutive zeros: 0 and 1.
There are 4 2-bit strings that contain at most 2 consecutive zeros: 00, 01, 10, 11.
There are 7 3-bit strings that contain at most 2 consecutive zeros: 001, 010, 011, 100, 101, 110, 111.
Create a free account to view solutions
Create a free account to view solutions
Recommended textbook solutions

Discrete Mathematics and Its Applications
7th Edition•ISBN: 9780073383095 (8 more)Kenneth Rosen

Discrete Mathematics and Its Applications
8th Edition•ISBN: 9781259676512 (3 more)Kenneth Rosen
More related questions
- college algebra
- differential equations
1/4
- college algebra
- differential equations
1/7