






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







Jim Lambers Math 6A Spring Quarter 2003- Lecture 23 Notes
These notes correspond to Section 6.2 in the text.
In the previous lecture, we learned how to model a counting problem using a recurrence relation, which is an equation that relates each term in a sequence to previous terms. In this lecture we will learn how to solve certain types of recurrence relations in order to obtain an explicit formula for each term that is independent of the other terms.
A recurrence relation is said to be linear if each term in the equation that depends on a term of the sequence that it describes is a multiple of that term. The quantity multiplying the term is a coefficient; in this lecture we will consider only recurrence relations with constant coefficients. If every term in the recurrence relation is a multiple of a term, then we also say that the recurrence relation is homogeneous. In summary, a linear homogeneous recurrence relation with constant coefficients can be written in the form an = c 1 an− 1 + c 2 an− 2 + · · · + ckan−k.
The number k is called the degree of the recurrence relation, provided that the coefficient ck is nonzero. We will now learn how to solve recurrence relations of this form, beginning with those of degree 2.
Theorem Let an = c 1 an− 1 + c 2 an− 2
be a linear homogeneous recurrence relation of degree 2 with constant coefficients. If the polynomial r^2 − c 1 r − c 2 has two distinct roots r 1 and r 2 , then a sequence {an} is a solution of the recurrence relation if and only if an = α 1 rn 1 + α 2 rn 2 ,
where α 1 and α 2 are constants.
Proof First, we must show that if an = α 1 rn 1 + α 2 r 2 n for each integer n, then the sequence {an} satisfies the recurrence relation. We have
c 1 an− 1 + c 2 an− 2 = c 1 (α 1 rn 1 −^1 + α 2 rn 2 −^1 ) + c 2 (α 1 rn 1 −^2 + α 2 r 2 n −^2 )
= α 1 r 1 n −^2 (c 1 r 1 + c 2 ) + α 2 rn 2 −^2 (c 1 r 2 + c 2 ) = α 1 r 1 n −^2 r^21 + α 2 rn 2 −^2 r^22 = α 1 r 1 n + α 2 r 2 n = an.
Now, we must show the converse: if a sequence {an} satisfies the recurrence relation, then for each nonnegative integer n, an = α 1 rn 1 + α 2 rn 2 , for some choice of the constants α 1 and α 2. We will prove this statement using mathematical induction. The basis step corresponds to n = 0 and n = 1. We will use a constructive existence proof; that is, we will find constants α 1 and α 2 such that an = α 1 rn 1 + α 2 rn 2 for these values of n. Setting n = 0 and n = 1 in this equation, we obtain the system of equations
α 1 + α 2 = a 0 α 1 r 1 + α 2 r 2 = a 1
Because r 1 6 = r 2 , this system has the unique solution
α 1 = r 2 a 0 − a 1 r 2 − r 1 , α 2 = a 1 − r 1 a 0 r 2 − r 1
as can be determined by substituting a 0 − α 1 for α 2 in the second equation. For the inductive step, we assume that
an = α 1 rn 1 + α 2 r 2 n , an− 1 = α 1 rn 1 −^1 + α 2 r 2 n −^1 ,
where n ≥ 2, and show that an+1 = α 1 r 1 n +1+ α 2 rn 2 +1.
Since {an} satisfies the recurrence relation, we have
an+1 = c 1 an + c 2 an− 1 = c 1 [α 1 rn 1 + α 2 rn 2 ] + c 2 [α 1 r 1 n −^1 + α 2 rn 2 −^1 ] = α 1 [c 1 rn 1 + c 2 rn 1 −^1 ] + α 2 [c 1 rn 2 + c 2 r 2 n −^1 ] = α 1 r 1 n −^1 [c 1 r 1 + c 2 ] + α 2 rn 2 −^1 [c 1 r 2 + c 2 ] = α 1 r 1 n −^1 r^21 + α 2 rn 2 −^1 r^22 = α 1 r 1 n +1+ α 2 rn 2 +
and the proof is complete. 2
Example Consider the recurrence relation satisfied by the Fibonacci numbers,
an = an− 1 + an− 2 ,
where α 1 and α 2 are constants.
Proof First, we must show that if an = α 1 r 1 n + α 2 nrn 1 for each integer n, then the sequence {an} satisfies the recurrence relation. Because r 1 is a double root, the polynomial r^2 − c 1 r − c 2 has the factorization (r − r 1 )^2. It follows that
r^2 − c 1 r − c 2 = r^2 − 2 r 1 r + r^21
which yields c 1 = 2r 1 , c 2 = −r^21.
It follows that
c 1 an− 1 + c 2 an− 2 = c 1 (α 1 r 1 n −^1 + α 2 (n − 1)rn 1 −^1 ) + c 2 (α 1 rn 1 −^2 + α 2 (n − 2)rn 1 −^2 ) = α 1 rn 1 −^2 (c 1 r 1 + c 2 ) + α 2 rn 1 −^2 [c 1 (n − 1)r 1 + c 2 (n − 2)] = α 1 rn 1 −^2 r 12 + α 2 r 1 n −^2 [n(c 1 r 1 + c 2 ) − c 1 r 1 − 2 c 2 ] = α 1 rn 1 + α 2 rn 1 −^2 [nr^21 − c 1 r 1 − 2 c 2 ] = α 1 rn 1 + α 2 nrn 1 − α 2 rn 1 −^2 (c 1 r 1 + 2c 2 ) = α 1 rn 1 + α 2 nrn 1 − α 2 rn 1 −^2 [(2r 1 )r 1 + 2(−r 12 )] = α 1 rn 1 + α 2 nrn 1 − α 2 rn 1 −^2 [2r^21 − 2 r^21 ] = α 1 rn 1 + α 2 nrn 1 = an.
Now, we must show the converse: if a sequence {an} satisfies the recurrence relation, then for each nonnegative integer n, an = α 1 r 1 n + α 2 nrn 1 , for some choice of the constants α 1 and α 2. We will prove this statement using mathematical induction. The basis step corresponds to n = 0 and n = 1. We will use a constructive existence proof; that is, we will find constants α 1 and α 2 such that an = α 1 rn 1 + α 2 nr 1 n for these values of n. Setting n = 0 and n = 1 in this equation, we obtain the system of equations
α 1 = a 0 α 1 r 1 + α 2 r 1 = a 1
This system has the unique solution
α 1 = a 0 , α 2 = a 1 − r 1 a 0 r 1
as can be determined by substituting α 1 = a 0 in the second equation. For the inductive step, we assume that
an = α 1 r 1 n + α 2 nrn 1 , an− 1 = α 1 rn 1 −^1 + α 2 (n − 1)r 1 n −^1 ,
where n ≥ 2, and show that an+1 = α 1 rn 1 +1+ α 2 (n + 1)rn 1 +1.
Since {an} satisfies the recurrence relation, we have
an+1 = c 1 an + c 2 an− 1 = c 1 [α 1 rn 1 + α 2 nr 1 n ] + c 2 [α 1 rn 1 −^1 + α 2 (n − 1)rn 1 −^1 ] = α 1 [c 1 rn 1 + c 2 r 1 n −^1 ] + α 2 [c 1 nr 1 n + c 2 (n − 1)rn 1 −^1 ] = α 1 r 1 n −^1 [c 1 r 1 + c 2 ] + α 2 rn 1 −^1 [n(c 1 r 2 + c 2 ) − c 2 ] = α 1 r 1 n −^1 r^21 + α 2 rn 1 −^1 [nr 12 + r^21 ] = α 1 r 1 n −^1 r^21 + α 2 rn 1 −^1 (n + 1)r 12 = α 1 r 1 n −^1 r^21 + α 2 (n + 1)rn 1 + = α 1 r 1 n +1+ α 2 (n + 1)rn 1 +
and the proof is complete. 2
Example Consider the recurrence relation
an = 2an− 1 − an− 2 ,
with initial conditions a 0 = 3 and a 1 = −1. We will solve this relation by computing the roots of the equation r^2 = 2r − 1.
Since the polynomial r^2 − 2 r + 1 can be factored into (r − 1)^2 , it follows that the equation has a double root of 1. Therefore, by the preceding theorem, the recurrence relation has a solution of the form an = α 11 n^ + α 2 n 1 n^ = α 1 + α 2 n,
where α 1 and α 2 are constants. From the proof of the preceding theorem, we obtain
α 1 = a 0 = 3, α 2 = a 1 − 1 · a 0 1
We conclude that the solution of the recurrence relation is
an = 3 − 4 n.
2
The equation r^2 = c 1 r + r 2 is called the characteristic equation of the recurrence relation an = c 1 an− 1 + c 2 an− 2. In general, the characteristic equation of the recurrence relation
an =
∑^ k
j=
ckan−j
∑^ k
i=
αirni −krki
∑^ k
i=
αirni
= an.
Now, we must show the converse: if a sequence {an} satisfies the recurrence relation, then for each nonnegative integer n, an =
∑k j=1 αj^ r n j ,^ for some choice of the constants^ α^1 , α^2 ,... , αk. We will prove this statement using mathematical induction. The basis step corresponds to n = 0, 1 ,... , k − 1. We will use a constructive existence proof; that is, we will find constants α 1 , α 2 ,... , αk such that an =
∑k j=1 αj^ r n j for these values of^ n. Setting n = 0, 1 ,... , k = 1 in this equation, we obtain a system of k equations for the k unknowns α 1 , α 2 ,... , αk. Because the roots r 1 , r 2 ,... , rk are all distinct, it is known from linear algebra that this system has a unique solution that can be obtained using Gaussian elimination. For the inductive step, we assume that
an−i =
∑^ k
j=
αj rnj −i, i = 0, 1 ,... , k − 1 ,
where n ≥ k, and show that
an+1 =
∑^ k
j=
αj r jn +1.
Since {an} satisfies the recurrence relation, we have
an+1 =
∑^ k
j=
cj an+1−j
∑^ k
j=
cj
∑k
i=
αirni+1−j
∑^ k
i=
αi
∑k
j=
cj rni+1−j
∑^ k
i=
αirn i−k+
∑k
j=
cj rik−j
∑^ k
i=
αirn i −k+1rki
∑^ k
i=
αirn i+
and the proof is complete. 2
Finally, we consider the case where the characteristic equation for a recurrence relation of degree k has multiple roots.
Theorem Let
an =
∑^ k
j=
cj an−j
be a linear homogeneous recurrence relation of degree k with constant coefficients. If the polynomial
rk^ −
∑^ k
j=
cj rk−j
has t distinct roots r 1 , r 2 ,... , rt, with multiplicities m 1 , m 2 ,... , mt, then a sequence {an} is a solution of the recurrence relation if and only if
an =
∑^ t
j=
m ∑j − 1
i=
αj,ini
(^) rnj ,
where αj,i is a constant for j = 1, 2 ,... , k and i = 0, 1 ,... , mj − 1.
We now consider the solution of linear recurrence relations with constant coefficients that are nonhomogeneous. These recurrence relations include terms that do not depend on the terms in the sequence that they describe. As such, they have the form
an =
∑^ k
j=
cj an−j + F (n),
where F (n) is an arbitrary function of n. We will see that recurrence relations of this form can be solved in a fairly straightforward manner for certain choices of the function F (n). First, however, it should be noted that the solution to a nonhomogeneous recurrence relation is not unique. There are actually infinitely many solutions, but all of them can be described in terms of the solutions of the recurrence relation that is obtained by removing the term F (n). The resulting homogeneous recurrence relation
an =
∑^ k
j=
cj an−j
Theorem Let
an =
∑^ k
j=
cj an−j + F (n)
be a linear nonhomogeneous recurrence relation of degree k with constant coefficients. If F (n) is of the form
F (n) = sn
∑t
j=
bj nj^ ,
where s is not a root of the characteristic equation of the associated homogeneous recurrence relation, then the nonhomogeneous recurrence relation has a particular solution of the form
a( np )= sn
∑t
j=
pj nj^.
If s is a root of the characteristic equation of multiplicity m, then the nonhomogeneous recurrence relation has a particular solution of the form
a( np )= nmsn
∑t
j=
pj nj^.