Professional Documents
Culture Documents
Math 221: Linear Algebra: 3-4. Application To Linear Recurrences
Math 221: Linear Algebra: 3-4. Application To Linear Recurrences
Le Chen1
Emory University, 2020 Fall
(last updated on 08/27/2020)
1
Slides are adapted from those by Karen Seyffarth from University of Calgary.
Linear Recurrences
Example
The Fibonacci Numbers are the numbers in the sequence
Example
The Fibonacci Numbers are the numbers in the sequence
Problem
Find f100 .
Linear Recurrences
Example
The Fibonacci Numbers are the numbers in the sequence
Problem
Find f100 .
Instead of using the recurrence to compute f100 , we’d like to find a formula for
fn that holds for all n ≥ 0.
Definitions
A sequence of numbers x0 , x1 , x2 , x3 , . . . is defined recursively if each
number in the sequence is determined by the numbers that occur before it
in the sequence.
Definitions
A sequence of numbers x0 , x1 , x2 , x3 , . . . is defined recursively if each
number in the sequence is determined by the numbers that occur before it
in the sequence.
A linear recurrence of length k has the form
x1 = ax0
x2 = ax1 = a2 x0
x3 = ax2 = a3 x0
.. .. ..
. . .
xn = axn−1 = an x0
Therefore, xn = an x0 .
Example
Find a formula for xn if
with x0 = 0 and x1 = 1.
Example
Find a formula for xn if
and for n ≥ 0,
xn+1 xn+1
Vn+1 = =
xn+2 2xn+1 + 3xn
Example (continued)
xn+1
Now express Vn+1 = as a matrix product:
2xn+1 + 3xn
Example (continued)
xn+1
Now express Vn+1 = as a matrix product:
2xn+1 + 3xn
xn+1 0 1 xn
Vn+1 = = = AVn
2xn+1 + 3xn 3 2 xn+1
Example (continued)
xn+1
Now express Vn+1 = as a matrix product:
2xn+1 + 3xn
xn+1 0 1 xn
Vn+1 = = = AVn
2xn+1 + 3xn 3 2 xn+1
x −1
cA (x) = det(xI − A) = = x2 − 2x − 3 = (x − 3)(x + 1)
−3 x−2
and so
1 n 1
xn = 3 − (−1)n .
4 4
Example
Solve the recurrence relation
with x0 = 0 and x1 = 1.
Example
Solve the recurrence relation
with x0 = 0 and x1 = 1.
Solution. Write
xk+1 xk+1 0 1 xk
Vk+1 = = =
xk+2 5xk+1 − 6xk −6 5 xk+1
Example
Solve the recurrence relation
with x0 = 0 and x1 = 1.
Solution. Write
xk+1 xk+1 0 1 xk
Vk+1 = = =
xk+2 5xk+1 − 6xk −6 5 xk+1
Finally,
xk 1 1
Vk = = b1 λk1~x1 + b2 λk2~x2 = (−1)2k + 3k
xk+1 2 3
Example
xk k 1 k 1
= (−1)2 +3
xk+1 2 3
and therefore
xk = 3k − 2k .