Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Linear Recurrence Relations Part I Jorge Cobb The University of Texas at Dallas.

Similar presentations


Presentation on theme: "1 Linear Recurrence Relations Part I Jorge Cobb The University of Texas at Dallas."— Presentation transcript:

1 1 Linear Recurrence Relations Part I Jorge Cobb The University of Texas at Dallas

2 2 Solving recurrence relations Setting up a recurrence relation is important – it corresponds to modeling a problem Solving it (providing a sequence that satisfies the recurrence) is also needed Sometimes, this can be done through iteration/induction For certain types of recurrence relations, there are systematic methods for solving them

3 3 Linear recurrence relations of degree k a n = c 1 a n-1 + c 2 a n-2 +... + c k a n-k with c 1,c 2,...,c k real numbers and c k ≠0 Linear: The right-hand side is a sum of weighted previous terms of the sequence – the weights do not depend on the sequence (but not necessarily constant, may be a function of n)

4 4 a n = c 1 a n-1 + c 2 a n-2 +... + c k a n-k with c 1,c 2,...,c k real numbers and c k ≠0 Homogeneous: No terms appear on the right hand side that are not multiples of a previous term Of degree k: The recurrence goes back k terms, i.e., the earliest previous term on the right hand side is a n-k Constant coefficients: The multipliers of the previous terms are all constants, not functions that depend on n Linear homogeneous recurrence relations of degree k with constant coefficients

5 5 Classifying recurrences a n =2a n-1 + a n-2 2 a n =a n-1 a n-2 a n =a n-1 +a n-2 a n =1.05a n-1 a n =na n-1 a n =2a n-1 +1 a n =a n-1 +a n-4 Classification doesn’t depend on initial values Not linear Non-homogeneous Not linear Yes, degree 2 Coefficients are not constant Yes, degree 1 Yes, degree 4

6 6 First degree linear homogeneous recurrence relations with const. coef. a n = c 1 a n-1 Recall the compound interest example Through iterative expansion, a n = c 1 a n-1 = c 1 (c 1 a n-2 ) = c 1 2 a n-2 = c 1 2 (c 1 a n-3 ) = c 1 3 a n-3 =... = c 1 n a 0

7 7 Approach for a general solution a n = c 1 a n-1 + c 2 a n-2 +... + c k a n-k Pretend that there is a solution of the form a n =r n for some constant r r n = c 1 r n-1 + c 2 r n-2 +... + c k r n-k r k – c 1 r k-1 – c 2 r k-2 -... – c k-1 r – c k = 0 This is the characteristic equation of the recurrence relation; the numbers r that satisfy it are the characteristic roots of the recurrence relation

8 8 Second degree linear homogeneous recurrence relations Assumptions Recurrence relation: a n = c 1 a n-1 + c 2 a n-2 Characteristic equation has two distinct roots r 1, r 2. Theorem 1 {a n } is a solution of the recurrence if and only if {a n } is of the form a n = b 1 r 1 n + b 2 r 2 n for all n≥0, and for some constants b 1, b 2

9 9 Proving Theorem 1 We need to prove both directions: If {a n } is a solution, then it must be of the form a n = b 1 r 1 n + b 2 r 2 n for some appropriately chosen constants b 1 and b 2 If {a n } is of the form a n = b 1 r 1 n + b 2 r 2 n for all n≥0, then it must be a solution. We prove the second one first (harder )

10 10 Proving Theorem 1, first part Show a n = b 1 r 1 n + b 2 r 2 n, n≥2, is a solution Because r 2 – c 1 r – c 2 = 0 and r 1 and r 2 are roots, Therefore,

11 11 Proving Theorem 1, first part What about n=1 and n=0? These are just the initial conditions of our solution

12 12 Proving Theorem 1, second part Show that if {a n } is a solution it must be of the form a n = b 1 r 1 n + b 2 r 2 n (we must find b 1 and b 2 ) Note: a second-degree linear homogeneous recurrence has a unique solution {a n } if a 0 and a 1 are specified Because there is a single way to generate the terms a n from the two initial values Therefore, if we show that there is a solution of the form a n = b 1 r 1 n + b 2 r 2 n, n ≥0, that satisfies the initial values a 0 and a 1, this must be the solution that was given to us, and we are done.

13 13 Proving Theorem 1, second part We first show that there are b 1 and b 2 such that b 1 r 1 0 + b 2 r 2 0 = a 0 and b 1 r 1 1 + b 2 r 2 1 = a 1 These simplify to b 1 + b 2 = a 0 b 1 r 1 + b 2 r 2 = a 1, (two linear equations, two unknowns)

14 14 Consider the sequence {a’ n }, where a’ n = b 1 r 1 n + b 2 r 2 n, and a’ 0 = a 0, a’ 1 = a 1 From the first part of the theorem, we have shown that a’ n = b 1 r 1 n + b 2 r 2 n is a solution for any b 1 and b 2 We have shown (previous slide) that b 1 and b 2 can be chosen so that the satisfy a’ 0 = a 0, a’ 1 = a 1 Thus, {a’ n } is a solution, just like {a n }, and with the same initial conditions. However, the initial conditions determine the rest of the sequence. Hence, {a’ n } = {a n } and {a n } is in the desired form. Proving Theorem 1, second part

15 15 Notes about the proof Our proof of the second part also serves as the means to find the solution It depended on r 1 ≠ r 2 The characteristic roots r 1 and r 2 may be complex numbers (the proof and the solution are still valid)

16 16 Example solution a n = a n-1 + 2a n-2, a 0 =2 and a 1 =7 Characteristic equation r 2 – r – 2 = 0 The quadratic formula for ax 2 +bx+c = 0, gives roots r 1 =(1-(3))/2=-1 and r 2 =(1+(3))/2 = 2

17 17 Example solution Therefore,


Download ppt "1 Linear Recurrence Relations Part I Jorge Cobb The University of Texas at Dallas."

Similar presentations


Ads by Google