Question

a) Find a recurrence relation for the number of bit strings of length n that contain three consecutive 0s. b) What are the initial conditions? c) How many bit strings of length seven contain three consecutive 0s?

Solution

Verified
Step 1
1 of 4

(a) Let ana_n represent the number of bit strings of length nn that contain three consecutive 0's.

First case\textbf{First case} The bit string is a sequence ending in 11, then the bit string of length n1n-1 (ignore the last 1) has an1a_{n-1} possible strings that contain a pair of consecutive 0's.

Second case\textbf{Second case} The bit string is a sequence ending in 1010, then the bit string of length n2n-2 (ignore the last two digits 10) has an2a_{n-2} possible strings that contain a pair of consecutive 0's.

Third case\textbf{Third case} The bit string is a sequence ending in 100100, then the bit string of length n3n-3 (ignore the three two digits 100) has an3a_{n-3} possible strings that contain a pair of consecutive 0's.

Fourth case\textbf{Fourth case} The bit string is a sequence ending in 000000. There are 2n32^{n-3} bit strings of length n3n-3 and thus there are 2n32^{n-3} bit strings of length n3n-3 followed by 00.

Adding the number of sequences of all three cases, we then obtain:

an=an1+an2+an3+2n3a_n=a_{n-1}+a_{n-2}+a_{n-3}+2^{n-3}

Create an account to view solutions

By signing up, you accept Quizlet's Terms of Service and Privacy Policy
Continue with GoogleContinue with Facebook

Create an account to view solutions

By signing up, you accept Quizlet's Terms of Service and Privacy Policy
Continue with GoogleContinue with Facebook

Recommended textbook solutions

Discrete Mathematics and Its Applications 7th Edition by Kenneth Rosen

Discrete Mathematics and Its Applications

7th EditionISBN: 9780073383095 (1 more)Kenneth Rosen
4,285 solutions
Discrete Mathematics 8th Edition by Richard Johnsonbaugh

Discrete Mathematics

8th EditionISBN: 9780321964687 (1 more)Richard Johnsonbaugh
4,246 solutions
Discrete Mathematics and Its Applications 8th Edition by Kenneth Rosen

Discrete Mathematics and Its Applications

8th EditionISBN: 9781259676512 (4 more)Kenneth Rosen
4,399 solutions

More related questions

1/2

1/3