Hint for Section 8.1 Question 7

7. To write out bit strings which do not contain the bit pattern 10,  if you are working from left to right, as soon as you write down a 1, the rest of the bits must all be 1's as well.

a)

length

bit strings

0 empty string
1 0, 1
2 00, 01, 11
3 000, 001, 011, 111
4 0000, 0001, 0011, 0111, 1111

b) S0 = 1,  S1 = 2,  S2 = 3,  S3 = 4,  S4 = 5.

c) To build the required bit strings of length n in terms of the bit stings of length n-1 the following steps are taken, for each string of length n-1:

Use these two facts to write a recurrence relation for Sn in terms of   Sn-1.

Back to Section 8.1
Full solution