{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

quiz4solutions - Quiz 4 Solutions Dilip Raghavan Problem...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
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 a n - 1 . 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 4 n - 1 , and of these a n - 1 have an even number of 0s. So there are 4 n - 1 - a n - 1 possibilities for this case. So a n = 3 a n - 1 + 4 n - 1 - a n - 1 = 2 a n - 1 + 4 n - 1 . (b) The homogeneous solution is A 2 n . Look for a particular solution of the form p ( n ) = B 4 n . Substituting, we get the equation B 4 n = 2 B 4 n - 1 + 4 n - 1 , which simplifies to 4 B = 2 B + 1 Hence, B = 1 2 . So a n = A 2 n + 1 2 4 n . Using the initial condition a 1 = 3, we get A = 1 2 . Problem 2. Let a n be the number of such subsets. We find a recurrence relation for
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}