Math 221: LINEAR ALGEBRA 3-4. Application to Linear Recurrences Le - - PowerPoint PPT Presentation

math 221 linear algebra
SMART_READER_LITE
LIVE PREVIEW

Math 221: LINEAR ALGEBRA 3-4. Application to Linear Recurrences Le - - PowerPoint PPT Presentation

Math 221: LINEAR ALGEBRA 3-4. Application to Linear Recurrences Le Chen 1 Emory University, 2020 Fall (last updated on 08/27/2020) Creative Commons License (CC BY-NC-SA) 1 Slides are adapted from those by Karen Seyffarth from University of


slide-1
SLIDE 1

Math 221: LINEAR ALGEBRA

§3-4. Application to Linear Recurrences

Le Chen1

Emory University, 2020 Fall

(last updated on 08/27/2020) Creative Commons License (CC BY-NC-SA) 1Slides are adapted from those by Karen Seyffarth from University of Calgary.

slide-2
SLIDE 2

Linear Recurrences

Example

The Fibonacci Numbers are the numbers in the sequence 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, . . . and can be defined by the linear recurrence relation fn+2 = fn+1 + fn for all n ≥ 0, with the initial conditions f0 = 1 and f1 = 1. Instead of using the recurrence to compute , we’d like to fjnd a formula for that holds for all .

slide-3
SLIDE 3

Linear Recurrences

Example

The Fibonacci Numbers are the numbers in the sequence 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, . . . and can be defined by the linear recurrence relation fn+2 = fn+1 + fn for all n ≥ 0, with the initial conditions f0 = 1 and f1 = 1.

Problem

Find f100. Instead of using the recurrence to compute , we’d like to fjnd a formula for that holds for all .

slide-4
SLIDE 4

Linear Recurrences

Example

The Fibonacci Numbers are the numbers in the sequence 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, . . . and can be defined by the linear recurrence relation fn+2 = fn+1 + fn for all n ≥ 0, with the initial conditions f0 = 1 and f1 = 1.

Problem

Find f100. Instead of using the recurrence to compute f100, we’d like to fjnd a formula for fn that holds for all n ≥ 0.

slide-5
SLIDE 5

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.

slide-6
SLIDE 6

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 xn+k = a1xn+k−1 + a2xn+k−2 + · · · + akxn, n ≥ 0, for some real numbers a1, a2, . . . , ak.

slide-7
SLIDE 7

Example

The simplest linear recurrence has length one, so has the form xn+1 = axn for n ≥ 0, with a ∈ R and some initial value x0.

slide-8
SLIDE 8

Example

The simplest linear recurrence has length one, so has the form xn+1 = axn for n ≥ 0, with a ∈ R and some initial value x0. In this case, x1 = ax0 x2 = ax1 = a2x0 x3 = ax2 = a3x0 . . . . . . . . . xn = axn−1 = anx0 Therefore, xn = anx0.

slide-9
SLIDE 9

Example

Find a formula for xn if xn+2 = 2xn+1 + 3xn for n ≥ 0, with x0 = 0 and x1 = 1.

slide-10
SLIDE 10

Example

Find a formula for xn if xn+2 = 2xn+1 + 3xn for n ≥ 0, with x0 = 0 and x1 = 1.

  • Solution. Define Vn =
  • xn

xn+1

  • for each n ≥ 0. Then

V0 = x0 x1

  • =

1

  • ,

and for n ≥ 0, Vn+1 = xn+1 xn+2

  • =
  • xn+1

2xn+1 + 3xn

slide-11
SLIDE 11

Example (continued)

Now express Vn+1 =

  • xn+1

2xn+1 + 3xn

  • as a matrix product:

det

slide-12
SLIDE 12

Example (continued)

Now express Vn+1 =

  • xn+1

2xn+1 + 3xn

  • as a matrix product:

Vn+1 =

  • xn+1

2xn+1 + 3xn

  • =

1 3 2 xn xn+1

  • = AVn

det

slide-13
SLIDE 13

Example (continued)

Now express Vn+1 =

  • xn+1

2xn+1 + 3xn

  • as a matrix product:

Vn+1 =

  • xn+1

2xn+1 + 3xn

  • =

1 3 2 xn xn+1

  • = AVn

This is a linear dynamical system, so we can apply the techniques from §3.3, provided that A is diagonalizable. det

slide-14
SLIDE 14

Example (continued)

Now express Vn+1 =

  • xn+1

2xn+1 + 3xn

  • as a matrix product:

Vn+1 =

  • xn+1

2xn+1 + 3xn

  • =

1 3 2 xn xn+1

  • = AVn

This is a linear dynamical system, so we can apply the techniques from §3.3, provided that A is diagonalizable. cA(x) = det(xI − A) =

  • x

−1 −3 x − 2

  • = x2 − 2x − 3 = (x − 3)(x + 1)

Therefore A has eigenvalues λ1 = 3 and λ2 = −1, and is diagonalizable.

slide-15
SLIDE 15

Example (continued)

  • x1 =

1 3

  • is a basic eigenvector corresponding to λ1 = 3, and
  • x2 =

−1 1

  • is a basic eigenvector corresponding to λ2 = −1.
slide-16
SLIDE 16

Example (continued)

  • x1 =

1 3

  • is a basic eigenvector corresponding to λ1 = 3, and
  • x2 =

−1 1

  • is a basic eigenvector corresponding to λ2 = −1.

Furthermore P =

  • x1
  • x2
  • =

1 −1 3 1

  • is invertible and is the

diagonalizing matrix for A, and P−1AP = D = 3 −1

slide-17
SLIDE 17

Example (continued)

  • x1 =

1 3

  • is a basic eigenvector corresponding to λ1 = 3, and
  • x2 =

−1 1

  • is a basic eigenvector corresponding to λ2 = −1.

Furthermore P =

  • x1
  • x2
  • =

1 −1 3 1

  • is invertible and is the

diagonalizing matrix for A, and P−1AP = D = 3 −1

  • Writing P−1V0 =

b1 b2

  • , we get

b1 b2

  • = 1

4

  • 1

1 −3 1 1

  • =
  • 1

4 1 4

slide-18
SLIDE 18

Example (continued)

Therefore, Vn =

  • xn

xn+1

  • =

b1λn

1

x1 + b2λn

2

x2 = 1 43n 1 3

  • + 1

4(−1)n −1 1

  • ,

and so xn = 1 43n − 1 4(−1)n.

slide-19
SLIDE 19

Example

Solve the recurrence relation xk+2 = 5xk+1 − 6xk, k ≥ 0 with x0 = 0 and x1 = 1.

slide-20
SLIDE 20

Example

Solve the recurrence relation xk+2 = 5xk+1 − 6xk, k ≥ 0 with x0 = 0 and x1 = 1.

  • Solution. Write

Vk+1 = xk+1 xk+2

  • =
  • xk+1

5xk+1 − 6xk

  • =
  • 1

−6 5 xk xk+1

slide-21
SLIDE 21

Example

Solve the recurrence relation xk+2 = 5xk+1 − 6xk, k ≥ 0 with x0 = 0 and x1 = 1.

  • Solution. Write

Vk+1 = xk+1 xk+2

  • =
  • xk+1

5xk+1 − 6xk

  • =
  • 1

−6 5 xk xk+1

  • Find the eigenvalues and corresponding eigenvectors for

A =

  • 1

−6 5

slide-22
SLIDE 22

Example (continued)

A has eigenvalues λ1 = 2 with corresponding eigenvector x1 = 1 2

  • , and

λ2 = 3 with corresponding eigenvector x2 = 1 3

  • .
slide-23
SLIDE 23

Example (continued)

A has eigenvalues λ1 = 2 with corresponding eigenvector x1 = 1 2

  • , and

λ2 = 3 with corresponding eigenvector x2 = 1 3

  • .

P = 1 1 2 3

  • , P−1 =
  • 3

−1 −2 1

  • ,

and b1 b2

  • = P−1V0 =
  • 3

−1 −2 1 1

  • =

−1 1

slide-24
SLIDE 24

Example (continued)

A has eigenvalues λ1 = 2 with corresponding eigenvector x1 = 1 2

  • , and

λ2 = 3 with corresponding eigenvector x2 = 1 3

  • .

P = 1 1 2 3

  • , P−1 =
  • 3

−1 −2 1

  • ,

and b1 b2

  • = P−1V0 =
  • 3

−1 −2 1 1

  • =

−1 1

  • Finally,

Vk =

  • xk

xk+1

  • = b1λk

1

x1 + b2λk

2

x2 = (−1)2k 1 2

  • + 3k

1 3

slide-25
SLIDE 25

Example

  • xk

xk+1

  • = (−1)2k

1 2

  • + 3k

1 3

  • and therefore

xk = 3k − 2k.