## Related questions with answers

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

Solutions

Verifieda) Let $a_{n}$ represent the number of bit strings of length n that don't contain a 3 consecutive 0's.

$a_{n} = a_{n-1} + a_{n-2} + a_{n-3}$ for $n \geq 3$.

If the string starts with 1, then there are $n-1$ different bit strings without 3 consecutive 0's. Therefore, $a_{n-1}$. Continue with bit strings starting with 01 and 001.

A **recursive definition** of a sequence defines the higher terms of the sequence using the terms preceding them. So, one needs to break the given problem on $n$ into problems of smaller $n.$

**a)** Let $a_n$ denote the number of binary strings of length $n$ not containing three consecutive $0'$s. We break the given problem into three distinct cases.

**Case: The string starts with $1$:**

In this case, the remaining binary string of length $n-1$ is precisely a string containing no three consecutive $0'$s. There are $a_{n-1}$ such strings.

**Case: The string starts with $01$:**

The remaining string is of length $n-2,$ and it is precisely a string containing no three consecutive $0'$s. There are $a_{n-2}$ such strings.

## 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