This
** preview**
has intentionally

**sections.**

*blurred***to view the full version.**

*Sign up*This
** preview**
has intentionally

**sections.**

*blurred***to view the full version.**

*Sign up*This
** preview**
has intentionally

**sections.**

*blurred***to view the full version.**

*Sign up*This
** preview**
has intentionally

**sections.**

*blurred***to view the full version.**

*Sign up*
**Unformatted text preview: **CS 173: Discrete Mathematical Structures Cinda Heeren [email protected] Siebel Center, rm 2213 Office Hours: BY APPOINTMENT Cs173 - Spring 2004 CS 173 Announcements Hwk #10 available, due 4/16, 8a Final Exam: 5/10, 7-10p, Siebel 1404 Cs173 - Spring 2004 Here’s one for you to try: a n = 4a n-1 - 5a n-2 + 2a n-3 , n ≥ 3 a = 0, a 1 = 1, a 2 = 2 CS 173 Recurrences Cs173 - Spring 2004 Linear NONhomogeneous recurrence relations with constant coefficients. CS 173 Recurrences c a n + c 1 a n-1 + c 2 a n-2 + … + c k a n-k = f(n), Where f(n) is constant polynomial in n c n for some constant c c n ∙ polynomial(n) This approach is different than the one in your text. Easier and more general. Cs173 - Spring 2004 First, some notation: CS 173 Recurrences A sequence a , a 1 , a 2 , …, is denoted 〈 a n 〉 Examples 〈 2 n 〉 = 1,2,4,8,… 〈 n 2 〉 = 0,1,4,9,… 〈 n 〉 = 0,1,2,3,… Note: if 〈 a n 〉 and 〈 b n 〉 are sequences, then 〈 a n 〉 + 〈 b n 〉 represents the sequence 〈 a n + b n 〉 (termwise addition). Cs173 - Spring 2004 Sequence operators: CS 173 Recurrences Constant multiplication c∙ 〈 a n 〉 defined to be 〈 c∙a n 〉 Ex: 3∙ 〈 2 n 〉 = 〈 3∙2 n 〉 = 3, 6, 12, 24, 48, … Shift “E” E 〈 a n 〉 = 〈 a n+1 〉 shifts sequence to left Ex: E 〈 2 n 〉 = 〈 2 n+1 〉 = 2, 4, 8, 16, … Ex: E 〈 3n + 1 〉 = 〈 3(n+1) + 1 〉 = 〈 3n + 4 〉 Cs173 - Spring 2004 Combining operators: CS 173 Recurrences If A,B are seq ops, then A+B is a seq op: (A+B) 〈 a n 〉 defined to be A 〈 a n 〉 + B 〈 a n 〉 Ex: (E+2) 〈 2 n 〉 = E 〈 2 n 〉 + 2 〈 2 n 〉 = 〈 2 n+1 〉 + 〈 2∙2 n 〉 = 〈 2 n+1 〉 + 〈 2 n+1 〉 = 〈 2 n+1 + 2 n+1 〉 = 〈 2∙2 n+1 〉 = 〈 2 n+2 〉 If A,B are seq ops, then AB is a seq op: (AB) 〈 a n 〉 defined to be A(B 〈 a n 〉 ) Ex: E 3 〈 a n 〉 = E∙E∙E 〈 a n 〉 = E(E(E 〈 a n 〉 )) = 〈 a n+3 〉 Cs173 - Spring 2004...

View
Full
Document