Linear Recurrence Relations Part II - PowerPoint PPT Presentation

1 / 12
About This Presentation
Title:

Linear Recurrence Relations Part II

Description:

One such mapping is between linear homogeneous recurrence relations and polynomials. Linear homogeneous recurrence relations of degree k. Characteristic equation ... – PowerPoint PPT presentation

Number of Views:303
Avg rating:3.0/5.0
Slides: 13
Provided by: VasileiosH9
Category:

less

Transcript and Presenter's Notes

Title: Linear Recurrence Relations Part II


1
Linear Recurrence RelationsPart II
  • Vasileios Hatzivassiloglou
  • University of Texas at Dallas

2
Review Problems
  • Suppose that you have unlimited pegs for the
    Towers of Hanoi puzzle. How many moves are needed
    for solving it for n disks?
  • What is the characteristic equation for the
    recurrence relation an 3an-1 2an-3?
  • Solve the recurrence relation an 8an-1 15an-2
    with the initial conditions a0 0, a1 2.

3
The Fibonacci sequence
  • fn fn-1 fn-2, f00 and f11
  • Characteristic equation r2 r 1 0
  • with roots
  • and coefficients
  • Finally,

4
Fibonacci as a recursion example
  • Often used in elementary programming texts to
    introduce the concept of recursion
  • Evaluating fn via the recursive implementation
    takes
  • exponential time and space!
  • a very inefficient way to compute it
  • Evaluating the closed form takes
  • constant time

5
Degenerate characteristic equation
  • What happens if r1r2 (one root of multiplicity
    two)?
  • Theorem 2 If the characteristic equation of a
    second degree linear homogeneous recurrence
    relation has only one root r0, then all solutions
    are of the form anb1r0nb2nr0n for n0, where b1
    and b2 are constants

6
Example
  • an 6an-1 9an-2, a01 and a16
  • Characteristic equation r2 6r 9 0
  • with only one root
  • We again solve from the initial conditions
  • a0 1 b1r00b20r00 b1
  • a1 6 b1r01b21r01 133b2
  • therefore b2 (6-3)/3 1
  • giving the solution an 3nn3n for n0

7
The characteristic equation as an alternative
representation
  • In math, we often construct alternative
    representations of problems or structures, along
    with reversible one-to-one mappings between
    different representations.
  • Then we can work with one such representation and
    transfer the results to others.
  • One such mapping is between linear homogeneous
    recurrence relations and polynomials.

8
Linear homogeneous recurrence relations of degree
k
  • Characteristic equation
  • rk c1rk-1 c2rk-2 ... ck 0
  • Theorem 3 If the above characteristic equation
    has k distinct roots r1, r2, ..., rk, then an
    is a solution of the recurrence if and only if an
    b1r1n b2r2n ... bkrkn for all n0, where
    b1, b2, ..., bk are constants

9
Example
  • an 6an-1 11an-2 6an-3
  • Initial conditions
  • Characteristic equation
  • Factoring
  • Characteristic roots
  • From the initial conditions we obtain
  • b11, b2-1, b32
  • Therefore,

a02, a15, a215
r3 6r2 11r 6 0
(r 1)(r 2)(r 3) 0
r1 1, r2 2, r3 3
an 11n 12n 23n 1 2n 23n
10
Allowing multiple roots
  • Theorem 4 If the above characteristic equation
    has t distinct roots r1, r2, ..., rt with
    multiplicities m1, m2, ..., mt (such that mi1
    and m1m2...mt k) then an is a solution of
    the recurrence if and only if
  • for all n0, where bi,j are constants

11
Reading
  • Section 7.2 (Example 4 to Theorem 4)

12
Review Problems
  • Solve the recurrence relation an 4an-1 4an-2
    with initial conditions a0 3 and a1 8.
  • Which recurrence relation has characteristic
    roots 2, 2, and -1?
  • Find the general form of the solution of the
    recurrence relation an 8an-2 16an-4.
Write a Comment
User Comments (0)
About PowerShow.com