Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 312: Algorithm Analysis Lecture #8: Non-Homogeneous Recurrence Relations This work is licensed under a Creative Commons Attribution-Share Alike 3.0.

Similar presentations


Presentation on theme: "CS 312: Algorithm Analysis Lecture #8: Non-Homogeneous Recurrence Relations This work is licensed under a Creative Commons Attribution-Share Alike 3.0."— Presentation transcript:

1 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.Creative Commons Attribution-Share Alike 3.0 Unported License Slides by: Eric Ringger, with contributions from Mike Jones, Eric Mercer, Sean Warnick

2 Announcements  HW #5 Due Today  Questions about Homogeneous RR?  Project #2  Questions about the project?  Early Day: Wednesday  Due Date: next Friday!

3 Objectives  Find specific solutions using initial conditions  Understand how to solve non-homogeneous, linear, recurrence relations with constant coefficients  Geometric forcing functions  Define roots of multiplicity j

4 Example (cont.): Linear, Homogeneous Recurrence Relation

5 Finding the Specific Solution

6 Finding the Particular Solution

7 Linear Combinations

8 Fibonacci in Closed Form!

9

10 Fundamental Theorem of Algebra  For every polynomial of degree n, there are exactly n roots.  They may not be unique.

11 Roots of Multiplicity j

12

13

14

15 Example

16

17 Non-Homogeneous, Linear Recurrence Relations

18 Non-Homogeneous Example What do you notice about the problem now?

19 Example (Cont.)

20

21

22

23 Possible Update  Point out existence of homog. RR for every non-homog. RR.  Notation: Use y(k) (homog.) instead of z(k) (non-homog.) to emphasize the difference.

24 Initial Conditions

25

26 Example (cont.)

27

28 Towers of Hanoi Revisited

29 Assignment  Read: Recurrence Relations Notes, Parts III & IV  HW #6:  Part II Exercises (Section 2.2)  Towers of Hanoi using method of recurrence relations.


Download ppt "CS 312: Algorithm Analysis Lecture #8: Non-Homogeneous Recurrence Relations This work is licensed under a Creative Commons Attribution-Share Alike 3.0."

Similar presentations


Ads by Google