## Related questions with answers

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(a) Let $a_n$ represent the number of bit strings of length $n$ that contain three consecutive 0's.

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

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

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

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

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

$a_n=a_{n-1}+a_{n-2}+a_{n-3}+2^{n-3}$

## Create an account to view solutions

## Create an account to view solutions

## Recommended textbook solutions

#### Discrete Mathematics and Its Applications

7th Edition•ISBN: 9780073383095 (1 more)Kenneth Rosen#### Advanced Mathematics: Precalculus with Discrete Mathematics and Data Analysis

ISBN: 9780395551899Brown#### Discrete Mathematics and Its Applications

8th Edition•ISBN: 9781259676512 (4 more)Kenneth Rosen## More related questions

1/2

1/3