Back

Solution: 2017 Fall Final - 9

Author: Michiel Smid

Question

Consider bitstrings that do not contain 110. Let $S_n$ be the number of such strings having length $n$. Which of the following is true for any $n \geq 4$?
(a)
$S_n = S_{n-1} + S_{n-2} + 2^{n-2}$
(b)
$S_n = S_{n-1} + S_{n-2} + S_{n-3}$
(c)
$S_n = S_{n-1} + S_{n-2} + 1$
(d)
$S_n = S_{n-1} + S_{n-2} + 2^{n-3}$

Solution

Let’s write out and see what happens. We start off with a bitstring that does not contain 110

$ 0, S_{n1} $

$ 0, 1, S_{n-2} $

In the above, all possible combos start with 0. There is also the possibility of having all 1’s: 1

Adding it up, $ S_n = S_{n-1} + S_{n-2} + 1 $