Solving Second-Order Recursive Relations Lecture 36 ½ Section 8.3 Wed, Apr 19, 2006.

Slides:



Advertisements
Similar presentations
Week 6 - Wednesday CS322.
Advertisements

Fall 2002CMSC Discrete Structures1 Now it’s Time for… RecurrenceRelations.
Section 9.1 – Sequences.
Section 6.1 Cauchy-Euler Equation. THE CAUCHY-EULER EQUATION Any linear differential equation of the from where a n,..., a 0 are constants, is said to.
Discrete Mathematics Lecture 8 Alexander Bukharovich New York University.
Appendix B Solving Recurrence Equations : With Applications to Analysis of Recursive Algorithms.
Chapter 2: Second-Order Differential Equations
Algorithm : Design & Analysis [4]
CS 2210 (22C:19) Discrete Structures Advanced Counting
Second-Order Differential
CSE115/ENGR160 Discrete Mathematics 04/19/12 Ming-Hsuan Yang UC Merced 1.
A second order ordinary differential equation has the general form
Discrete Structures Chapter 6 Recurrence Relations
Recurrence Relations Reading Material –Chapter 2 as a whole, but in particular Section 2.8 –Chapter 4 from Cormen’s Book.
1 CSE 20 Lecture 12: Analysis of Homogeneous Linear Recursion CK Cheng May 5, 2011.
Recursion Lecture 17: Nov 11. Quiz int hello(int n) { if (n==0) return 0; else printf(“Hello World %d\n”,n); hello(n-1); } 1.What would the program do.
1 Linear Recurrence Relations Part I Jorge Cobb The University of Texas at Dallas.
Applied Discrete Mathematics Week 9: Relations
7.2 Solving Recurrence Relations. Definition 1 (p. 460)- LHRR-K Def: A linear homogeneous recurrence relations of degree k with constant coefficients.
Advanced Counting Techniques
Jessie Zhao Course page: 1.
Chapter 8. Section 8. 1 Section Summary Introduction Modeling with Recurrence Relations Fibonacci Numbers The Tower of Hanoi Counting Problems Algorithms.
Copyright © Cengage Learning. All rights reserved. CHAPTER 5 SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION.
Advanced Counting Techniques CSC-2259 Discrete Structures Konstantin Busch - LSU1.
Chapter 8 With Question/Answer Animations 1. Chapter Summary Applications of Recurrence Relations Solving Linear Recurrence Relations Homogeneous Recurrence.
Solving Recurrence Lecture 19: Nov 25. Some Recursive Programming (Optional?)
14.1 CompSci 102© Michael Frank Today’s topics Recurrence relationsRecurrence relations –Stating recurrences –LiHoReCoCo –Divide & conquer –Master’s method.
Recurrence Relation. Outline  What is a recurrence relation ?  Solving linear recurrence relations  Divide-and-conquer algorithms and recurrence relations.
15.1 CompSci 102© Michael Frank Today’s topics Recurrence relationsRecurrence relations –Stating recurrences –LiHoReCoCo Reading: Sections Reading:
Module #17: Recurrence Relations Rosen 5 th ed., §
RECURRENCE Sequence Recursively defined sequence
Based on Rosen, Discrete Mathematics & Its Applications, 5e Prepared by (c) Michael P. Frank Modified by (c) Haluk Bingöl 1/18 Module.
Module #1 - Logic 1 Based on Rosen, Discrete Mathematics & Its Applications. Prepared by (c) , Michael P. Frank and Modified By Mingwu Chen Recurrence.
after UCI ICS/Math 6A, Summer AdvancedCounting -1 Recurrence Relations (RRs) A “Recurrence Relation”
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Advanced Counting Techniques CSC-2259 Discrete Structures Konstantin Busch - LSU1.
1 CSE 20 Lecture 13: Analysis of Recursive Functions CK Cheng.
Module #20 - Recurrences Solving Recurrences Rosen 6 th ed., §7.2.
Week 6 - Friday.  What did we talk about last time?  Solving recurrence relations.
Chapter 8 Recursion. 8.3 More Recurrence Second-Order Recurrence Definition – A second-order linear homogeneous recurrence relation with constant coefficients.
Objectives: 1. Use the factor theorem. 2. Factor a polynomial completely.
7.2 Solving Linear Recurrence Relations Some of these recurrence relations can be solved using iteration or some other ad hoc technique. However, one important.
CSE 2813 Discrete Structures Solving Recurrence Relations Section 6.2.
Agenda Lecture Content:  Recurrence Relations  Solving Recurrence Relations  Iteration  Linear homogenous recurrence relation of order k with constant.
RECURRENCE Sequence Recursively defined sequence
1 Chapter 5 DIFFERENCE EQUATIONS. 2 WHAT IS A DIFFERENCE EQUATION? A Difference Equation is a relation between the values y k of a function defined on.
MTH 253 Calculus (Other Topics) Chapter 9 – Mathematical Modeling with Differential Equations Section 9.4 – Second-Order Linear Homogeneous Differential.
1 RECURRENCE 1. Sequence 2. Recursively defined sequence 3. Finding an explicit formula for recurrence relation.
Homogeneous Linear Recurrences To solve such recurrences we must first know how to solve an easier type of recurrence relation: DEF: A linear recurrence.
Mathematical Analysis of Recursive Algorithm CSG3F3 Lecture 7.
Solving Linear Homogeneous Recurrence Relations ICS 6D Sandy Irani.
Advanced Algorithms Analysis and Design By Dr. Nazir Ahmad Zafar Dr Nazir A. Zafar Advanced Algorithms Analysis and Design.
1 Lecture Outline for Recurrences Already Covered: Recursive definition of sequences Recursive definition of sets Recursive definition of operations Recursive.
Discrete Math For Computing II. Contact Information B. Prabhakaran Department of Computer Science University of Texas at Dallas Mail Station EC 31, PO.
CSG523/ Desain dan Analisis Algoritma
CSG523/ Desain dan Analisis Algoritma
Section 2.5 – Quadratic Equations
CMSC Discrete Structures
Modeling with Recurrence Relations
Complex integers? Here a and b are integers.
A second order ordinary differential equation has the general form
Chapter 5: Linear Equations with Constant Coefficients
A Brief Summary for Exam 2
Lecture 43 Section 10.1 Wed, Apr 6, 2005
CMSC Discrete Structures
Solving Recurrence Relations
Solving Recurrence Relations by Iteration
CMSC Discrete Structures
Recurrence Relations Discrete Structures.
ICS 253: Discrete Structures I
Presentation transcript:

Solving Second-Order Recursive Relations Lecture 36 ½ Section 8.3 Wed, Apr 19, 2006

Second-Order Linear Homogeneous Recurrence Relations with Constant Coefficients What a title! Second-order – Each term is defined in terms of the previous two terms. Linear – The terms of the sequence appear to the first power in the relation. Homogeneous – There is no constant term. Constant coefficients – The coefficients of the terms are constants.

The Form of Such Recurrence Relations Such a recurrence relation is of the form a n = Aa n – 1 + Ba n – 2 for all integers n  2, with initial terms a 0 and a 1 given. The Fibonacci sequence is a very simple example.

The Characteristic Equation The characteristic equation of a n = Aa n – 1 + Ba n – 2 is t 2 – At – B = 0. For the Fibonacci sequence, the characteristic equation is t 2 – t – 1 = 0. The sequence a n = t n satisfies the recurrence relation.

Solving Such Recurrence Relations – Case I Theorem: If the characteristic equation has roots r and s which are distinct real numbers, then the recursive sequence is given by a n = Cr n + Ds n, where C and D are constants, determined by the values of a 0 and a 1.

Solving Such Recurrence Relations – Case I Proof: Since r n and s n satisfy the recurrence relation, it follows easily that Cr n + Ds n also satisfies it. By using the initial conditions, we can solve for C and D. The resulting formula satisfied the recurrence relation with the initial conditions.

Example Solve the recurrence relation a 0 = 2, a 1 = 3, a n = a n – 1 + 2a n – 2, for all n  2. The first few terms are 2, 3, 7, 13, 27, 53, 107, 213, …

Example The roots of the characteristic equation are r = 2 and s = -1. So the general form is a n = C(2 n ) + D(-1) n. Solve a 0 = C + D = 2 and a 1 = 2C – D = 3. We get C = 5/3 and D = 1/3. The sequence is

Example Find a non-recursive formula for the Fibonacci numbers. Find a non-recursive formula for the Lucas numbers: L 1 = 1 L 2 = 3 L n = L n – 1 + L n – 2, for all n  2.

Solving Such Recurrence Relations – Case II Theorem: If the characteristic equation has double root r, then the recursive sequence is given by a n = Cr n + Dnr n = (C + Dn)r n, where C and D are constants determined by the values of a 0 and a 1.

Example Solve the recurrence relation a 0 = 0, a 1 = 4, a n = a n – 1 – (¼)a n – 2, for all n  2. The first few terms are 0, 4, 4, 3, 2, …

Example The root of the characteristic equation is the double root r = ½. So the general form is a n = (C + Dn)(½) n. Solve a 0 = C = 0 and a 1 = (C + D)(½) = 4. We get C = 0 and D = 8. The sequence is

Example Find a nonrecursive formula for the recursive sequence a 0 = 1 a 1 = 10 a n = 2a n – 1 – a n – 2, for all n  2.

Case III – Complex Roots The sequences become more interesting when the roots of the characteristic equation are complex numbers. Write the first few terms of the sequence a 0 = 0 a 1 = 1 a n = 2a n – 1 – 5a n – 2, for all n  2.