This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Discrete Mathematics, Spring 2004 Homework 5 Sample Solutions 5.1 #20. Let S n denote the number of nbit strings that do not contain the pattern 00. Show that S n = f n +1 , where f denotes the Fibonacci sequence. Solution . Exercise 19 in the text (the solution of which is in the back of the book) shows that S 1 , S 2 , . . . satisfies the recurrence relation S n = S n − 1 + S n − 2 with initial conditions S 1 = 2, S 2 = 3. To see then that S n = f n +1 for all n ≥ 1, we proceed by induction on n . The base cases are evidently true, since S 1 = 2 = f 2 and S 2 = 3 = f 3 . So suppose that S k = f k +1 for all k < n , where n ≥ 3; then using the recurrence relations for the Fibonacci sequence and for the sequence S , we see that S n +1 = S n + S n − 1 = f n +1 + f n = f n +2 . This proves the claim by induction. 5.1 #21. By considering the number of nbit strings with exactly i 0’s and Exercise 20, show that f n +1 = ⌊ ( n +1) / 2 ⌋ summationdisplay i =0 C ( n + 1 − i, i ) , n = 1 , 2 , . . . Solution . We proved in Exercise 68 of Section 4.2 that the number of nbit strings having exactly i 0’s, with no two 0’s consecutive, is C ( n + i − 1 , i ). But S n is by definition the number of nbit strings without consecutive 0’s, and hence (by the Addition Principle, if you like) S n is the sum, over the possible values of i , of C ( n + i − 1 , i ). So what are the possible values? Observe that in a bit string for which no two 0’s are consecutive, the number of 0’s cannot exceed the number of 1’s by two or more. Thereforeconsecutive, the number of 0’s cannot exceed the number of 1’s by two or more....
View
Full
Document
This note was uploaded on 06/12/2011 for the course MATH 103 taught by Professor Wouters during the Spring '08 term at Wisc Oshkosh.
 Spring '08
 WOUTERS
 Math, Algebra

Click to edit the document details