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: HW9 Solutions Dilip Raghavan November 17, 2008 1 Section 7.5 Problem 8. If the first slot is 1 or 2, then there are a n 1 possibilities for the rest. If the first slot is 0, then out of the total a n 1 possibilities, we need to exclude the ones starting with 12. There are a n 3 such sequences. So a n = 2 a n 1 + a n 1 a n 3 = 3 a n 1 a n 3 . Put g ( x ) = ∑ ∞ n = a n x n . Note that a 1 = a 2 = 0 (since we must have the pattern 012), and that a 3 = 1. From these we can calculate a = 1. Using the recurrence relation and the inital conditions, we can get g ( x ) = 1 + 3 x 1 3 x + x 3 . Problem 13. Let a n be the number of n –digit quaternary sequences with an odd number of 1s and an odd number of 2s. Let b n be the number of n –digit quaternary sequences with an even number of 1s and an odd number of 2s, and let c n be the number of n –digit quaternary sequences with an odd number of 1s and an even number of 2s. Note that number of n –digit quaternary sequences with an even number of 1s and an even number of 2s is 4 n a n b n c n . So we have the recurrence a n = 2 a n 1 + b n 1 + c n 1 b n = b n 1 + 4 n 1...
View
Full
Document
This note was uploaded on 09/15/2011 for the course AMAT 356 taught by Professor Hernandez/rag during the Spring '11 term at SUNY Albany.
 Spring '11
 Hernandez/Rag

Click to edit the document details