This preview shows page 1. Sign up to view the full content.
Unformatted text preview: Quiz 4 Solutions
Dilip Raghavan November 11, 2008 Problem 1. (a) If the first slot is not a 0, then we have 3 possibilities for the first slot and an1 . If the first slot is 0, then we nust have an odd number of 0 in what follows. The total number of sequences of length n  1 is 4n1 , and of these an1 have an even number of 0s. So there are 4n1  an1 possibilities for this case. So an = 3an1 + 4n1  an1 = 2an1 + 4n1 . (b) The homogeneous solution is A2n . Look for a particular solution of the form p(n) = B4n . Substituting, 1 we get the equation B4n = 2B4n1 + 4n1 , which simplifies to 4B = 2B + 1 Hence, B = 2 . So an = A2n + 1 4n . Using the initial condition a1 = 3, we get A = 1 . 2 2 Problem 2. Let an be the number of such subsets. We find a recurrence relation for an . If a subset does not contain n, then it is subset of {1, 2, . . . , n  1} with no consecutive integers. There are an1 such subsets. If the subset does contain n, then it cannot contain n  1, and the remainder of the subset must be a subset of {1, 2, . . . , n  2} with no consecutive integers. There are an2 such subsets. So an = an1 + an2 , which is the Fibonacci relation. The general solution is an = A 1+2 5 + B 12 different a1 = 2 and a2 = 3. Using these, we can find A and B. n n 5 . But the initial conditions are slightly 1 ...
View
Full
Document
This note was uploaded on 09/15/2011 for the course AMAT 344 taught by Professor Raghaven during the Spring '11 term at SUNY Albany.
 Spring '11
 Raghaven

Click to edit the document details