Recurrences
Recurrences
Mary Radcliffe
1 Example
I’ll begin these notes with an example of the eigenvalue-eigenvector technique used for solving linear
recurrence we outlined in class. Since all the recurrences in class had only two terms, I’ll do a three-term
recurrence here so you can see the similarity.
Let us consider the recurrence an = 2an−1 + an−2 − 2an−3 , subject to a0 = 2, a1 = 2, a2 = 4.
Notice that
an+1 2an + an−1 − 2an−2 2 1 −2 an
vn+1 = an = an = 1 0 0 an−1 .
an−1 an−1 0 1 0 an−2
2 1 −2
By defining A = 1 0 0 , we thus have that vn+1 = Avn . Therefore, since v2 is the first vector,
0 1 0
we have vn+1 = An−1 v2
Hence, we would like to represent vn in terms of the eigenvectors of A. If we are able to do so, then
we can calculate a formula for vn , and hence for an .
1 1 −2 1 1 −2
R2−R1
λ1 = 1 : A − λI = 1 −1 0 −−−−−→ 0 −2 2
0 1 −1 0 1 −1
R3− 1 R2,R2/2
1 1 −2
−−−−2−−−−−→ 0 1 −1
0 0 0
1 0 −1
R1−R2
−−−−−→ 0 1 −1
0 0 0
1
Examining coefficients, we thus obtain that the first coordinate is the negative of the third,and the
1
second coordinate is also the negative of the third. Hence, the desired eigenvector is x1 = 1 .
1
Without detailing the computations for the remaining eigenvectors, we obtain
1 2
for λ2 = −1, x2 = −1 ; for λ3 = 2, x3 = 2 .
1 1
an
vn = an−1 = An−2 v2
an−2
= An−2 (−x1 + x2 + 2x3 )
= −An−2 x1 + An−2 x2 + 2An−2 x3
= −(1)n−2 x1 + (−1)n−2 x2 + 2(2)n−2 x3
1 1 2
= − 1 + (−1)n −1 + 2n−1 2
1 1 1
Noting that the first term of the vector is indeed an , we thus obtain
an = −1 + (−1)n + 2n .
2 Theory
In general, this technique will work with any recurrence relation that takes the form
where p(n) is a polynomial in n. We here sketch the theoretical underpinnings of the technique, in the
case that p(n) = 0.
Imagine a recurrence relation takin the form an = α1 an−1 + α2 an−2 + · · · + αk an−k , where the αi are
constants and the first k values of the sequence (an ) are known.
an
an−1
Write vn = . Note that the first vector defined in this way will always be vk−1 =
..
.
an−k+1
2
ak−1
ak−2
, which is known by the initial conditions.
..
.
a0
As in the example above, our goal is to construct a matrix A so that Avn = vn+1 . We note that
an+1 αn an + α2 an−1 + · · · + αk an−k+1
an an
vn+1 = = ,
.. ..
. .
an−k+2 an−k+2
α1 α2 α3 ··· αk−1 αk
1 0 0 ... 0 0
and hence we may take A =
0 1 0 ... 0 0 .
..
.
0 0 0 ··· 1 0
Suppose that A is diagonalizable, and has the eigenvalue-eigenvector pairs (λ1 , x1 ), (λ2 , x2 ), . . . , (λk , xk ).
Write vk−1 , our known constant vector, as a linear combination of x1 , . . . , xk , in the following form:
vk−1 = c1 x1 + c2 x2 + · · · + ck xk .
Note that since A is diagonalizable, it is necessarily true that there exists constants c1 , . . . , ck such that
this equation holds. Moreover, as in the above example, we have that vn = An−k+1 vk−1 , and hence
Noting that an is the first coordinate of vn , we can then read off the first coordinate of the vector to
obtain a formula for an .