7.2 Solving Recurrence Relations. Definition 1 (p. 460)- LHRR-K Def: A linear homogeneous recurrence...
-
Upload
junior-short -
Category
Documents
-
view
259 -
download
2
Transcript of 7.2 Solving Recurrence Relations. Definition 1 (p. 460)- LHRR-K Def: A linear homogeneous recurrence...
Definition 1 (p. 460)- LHRR-K
Def: A linear homogeneous recurrence relations of degree k with constant coefficients (referred to as “LHRR-K”) is a recurrence relation of the form
an = c1an-1 + c2 an-2 + … +ckan-k where c1, c2, …ck are real numbers, and ck≠0.
------------------------------Note: These can be explicitly solved in a
systematic way.
First, are the following examples or non-examples?
• a n = 3 a n-1
• a n = a n-1 + a n-2 2
• f n = f n-1 + f n-2
• H n = 2H n-1 +1
• B n = n B n-1
• a n = a n-1 +3 a n-2 , a0 =1, a1 =2
Solving LHRR-K:
Step 1: Find a characteristic equation: an=rn is a solution of an = c1an-1
+ c2 an-2 + … +ckan-k iff
rn = c1 rn-1 + c2 rn-2 + … +ck rn-k
Divide by rn-k: Then rk= c1 rk-1 + c2 rk-2 + … +ck
So: rk - c1 rk-1 - c2 rk-2 - … - ck =0
For degree 2: the characteristic equation is r2-c1r –c2=0 (roots are used to find explicit formula)
Basic Solution: an=α1r1n+ α2r2
n where r1 and r2 are roots of the characteristic equation
Thm. 1 (for 2nd degree equations)
Theorem 1: Let c1, c2 be elements of the real numbers.
Suppose r2-c1r –c2=0 has two distinct roots r1 and r2,
Then the sequence {a n} is a solution of the recurrence relation an = c1an-1 + c2 an-2
iff an=α1r1n+ α2r2
n for n=0, 1, 2… where α1 and α2 are constants.----------------------------
First an example… Proof: later…
Ex. 1. Let an=7an-1 – 10 an-2 for n≥2; a0=2, a1=1
Find the characteristic equation …get r=2, 5
Let an= α1r1
n+ α2r2n … solve
system and get α1 = 3 and α2 = -1
So, basic solution is: an= 3*2n-5n
Sketch of Proof of Thm. 1: (p. 462)
Step 1: Show that an=α1 r1n+ α2 r2
n is a solution of
an =c1an-1+c2an-2
c1an-1+c2an-2
=c1(α1 r1n-1+ α2 r2
n-1 )+c2 (α1 r1n-2+ α2 r2
n-2) why?
= α1r1n-2(c1 r1 + c2 ) + α2r2
n-2(c1 r2 + c2 ) algebra
=α1r1n-2r1
2 + α2r2n-2r2
2
reason: r1 r2 are roots of r2-c1r-c2=0
so r12=c1r1 +c2 and
r2 2= c1r2 +c2
=α1r1n + α2r2
n
=an
Pf- step 2Step 2: Show that there exist constants α1 α2 such that
an=α1 r1n+ α2 r2
n satisfies the initial conditions a0=C0 and a1=C1.
a 0 = C 0 = …
a 1 = C 1 = …
Next solve system of 2 equations and 2 variables and get…
α1 = (C1-C0r2)/(r1-r2) α2 = (C0r1 – C1) / (r1-r2)
Ex: 3. Fibonacci numbers:
fn =fn-1 +fn-2 for n≥2; f0=0 and f1=1.
Find characteristic equationr2 = r+1 find r1 and r2
Thm. 1 says fn= α1r1n+ α2r2
n
Solve for α1, α2
Solution:
Note: Thm. 1 is only for r1≠r2
Thm. 2 is for r1 = r2
Theorem 2: Let c1, c2 be elements of the real numbers.
Suppose r2-c1r –c2=0 has only one root r0 ,
Then the sequence {a n} is a solution of the recurrence relation an = c1an-1 + c2 an-2 iff an=α1r0
n+ α2 n r0n
for n=0, 1, 2… where α1 and α2 are constants.
Ex: 4. (Recall this ex from section 5.1)
an =2an-1 -an-2 for n≥2; a0=0 and a1=3
Find characteristic equation Find solution Prove it is a solution
Ex: 5. an = - 6an-1 -9an-2 for n≥2; a0=3 and a1= - 3
Find characteristic equation Find solution
Prove it is a solution
Ex: 6. an =8an-1 -16an-2 for n≥2; a0=2 and a1=20.
Find characteristic equation Find solution Prove it is a solution
Ex: (#12 in book) an =2an-1 +an-2 -2an-3 for n≥3; a0=3 ,a1=6, a2=0
Find characteristic equation r3 – 2 r2- r +2=0Use synthetic division to get (r-1)(r+1)(r-2)=0 Find solution Prove it is a solution
Ex: (#15 bk) an =2an-1 +5an-2 -6an-3 for n≥3; a0=7 ,a1= - 4, a2=8
Find characteristic equation Use synthetic division to get Find solution Prove it is a solution
Ex: 7. an =5an-2 -4an-4 ; a0=3, a1=2, a2=6 and a3=8
Find characteristic equation Find solution
Prove it is a solution