cs 312: algorithm analysis

22
CS 312: Algorithm Analysis Lecture #8: Non- Homogeneous Recurrence Relations This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License . by: Eric Ringger, with contributions from Mike Jones, Eric Mercer, Sean Warn

Upload: ramla

Post on 23-Feb-2016

32 views

Category:

Documents


0 download

DESCRIPTION

This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License . CS 312: Algorithm Analysis. Lecture #8: Non-Homogeneous Recurrence Relations. Slides by: Eric Ringger, with contributions from Mike Jones, Eric Mercer, Sean Warnick. Announcements. HW #5 Due Today - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: CS 312:  Algorithm Analysis

CS 312: Algorithm Analysis

Lecture #8: Non-Homogeneous Recurrence Relations

This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.

Slides by: Eric Ringger, with contributions from Mike Jones, Eric Mercer, Sean Warnick

Page 2: CS 312:  Algorithm Analysis

Announcements

HW #5 Due Today Questions about Homogeneous RR?

Project #2 Questions about the project? Early Day: Friday Due Date: next Monday

Page 3: CS 312:  Algorithm Analysis

Objectives

Define “roots of multiplicity j” Understand how to solvenon-homogeneous, linear, recurrence relations with constant coefficients Geometric forcing function

Find the specific solution from initial conditions

Page 4: CS 312:  Algorithm Analysis

Example (cont.): Linear, HomogeneousRecurrence Relation

Page 5: CS 312:  Algorithm Analysis
Page 6: CS 312:  Algorithm Analysis

Finding the Particular Solution

Page 7: CS 312:  Algorithm Analysis

Fibonacci in Closed Form!

Page 8: CS 312:  Algorithm Analysis

Fundamental Theorem of Algebra

For every polynomial of degree n, there are exactly n roots.

They may not be unique.

Page 9: CS 312:  Algorithm Analysis

Roots of Multiplicity j

Page 10: CS 312:  Algorithm Analysis

Roots of Multiplicity j

Page 11: CS 312:  Algorithm Analysis

Roots of Multiplicity j

Page 12: CS 312:  Algorithm Analysis

Roots of Multiplicity j

Page 13: CS 312:  Algorithm Analysis

Example

Page 14: CS 312:  Algorithm Analysis

Non-Homogeneous, LinearRecurrence Relations

Page 15: CS 312:  Algorithm Analysis

Non-Homogeneous Example

What do you notice about the problem now?

Page 16: CS 312:  Algorithm Analysis

Example (Cont.): d=0

Page 17: CS 312:  Algorithm Analysis
Page 18: CS 312:  Algorithm Analysis
Page 19: CS 312:  Algorithm Analysis

Initial Conditions

Page 20: CS 312:  Algorithm Analysis

Example (cont.)

Page 21: CS 312:  Algorithm Analysis

Towers of Hanoi Revisited

Page 22: CS 312:  Algorithm Analysis

Assignment

Read: Recurrence Relations Notes, Parts III & IV

HW #6: Part II Exercises (Section 2.2)