Solving Recurrence Relations by Iteration

Slides:



Advertisements
Similar presentations
Week 6 - Wednesday CS322.
Advertisements

Writing and Graphing Equations of Lines
Recurrence Relations Reading Material –Chapter 2 as a whole, but in particular Section 2.8 –Chapter 4 from Cormen’s Book.
Kavita Math231 Recursion and Iteration. Kavita Math231 We use Recursion when we have to perform a complex task that can be broken into the several subtasks.
Discrete Structures Chapter 6 Recurrence Relations
1 Solutions to Recurrences Supplementary Notes Prepared by Raymond Wong Presented by Raymond Wong.
1 Recursion, Recurrences and Induction Supplementary Notes Prepared by Raymond Wong Presented by Raymond Wong.
Discrete Structures Chapter 5: Sequences, Mathematical Induction, and Recursion 5.7 Solving Recurrence Relations by Iteration The keener one’s sense of.
3.4 Graph of Linear Equations. Objective 1 Use the slope-intercept form of the equation of a line. Slide
Geometric Sequences and Series
Chapter 1 The Art of Problem Solving © 2008 Pearson Addison-Wesley.
Week 6 - Monday CS322.
 2012 Pearson Education, Inc. Slide Chapter 1 The Art of Problem Solving.
Copyright © Cengage Learning. All rights reserved. CHAPTER 5 SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION.
Chapter 8 With Question/Answer Animations 1. Chapter Summary Applications of Recurrence Relations Solving Linear Recurrence Relations Homogeneous Recurrence.
1 Section 5.5 Solving Recurrences Any recursively defined function ƒ with domain N that computes numbers is called a recurrence or recurrence relation.
Solving Second-Order Recursive Relations Lecture 36 ½ Section 8.3 Wed, Apr 19, 2006.
RECURRENCE Sequence Recursively defined sequence
Copyright © 2007 Pearson Education, Inc. Slide 8-1.
DR. NAVEED AHMAD DEPARTMENT OF COMPUTER SCIENCE UNIVERSITY OF PESHAWAR LECTURE-5 Advance Algorithm Analysis.
Sequences and Summations
Copyright © 2007 Pearson Education, Inc. Slide 8-1.
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Sequences and Summations Section 2.4. Section Summary Sequences. – Examples: Geometric Progression, Arithmetic Progression Recurrence Relations – Example:
Linear Systems of Equations Section 3.1. What is a “system” of equations?
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.
LESSON 5.6 Rational Zeros of Polynomial Functions.
CSE 2813 Discrete Structures Solving Recurrence Relations Section 6.2.
Solving Recurrence Relations by Iteration Lecture 36 Section 8.2 Mon, Apr 17, 2006.
1Computer Sciences. 2 GROWTH OF FUNCTIONS 3.2 STANDARD NOTATIONS AND COMMON FUNCTIONS.
1Computer Sciences Department. Objectives Recurrences.  Substitution Method,  Recursion-tree method,  Master method.
Section 3.4 – Zeros of a Polynomial. Find the zeros of 2, -3 (d.r), 1, -4.
Section 3.5 Solving Systems of Linear Equations in Two Variables by the Addition Method.
Solving Quadratic-Linear Systems
RECURRENCE Sequence Recursively defined sequence
Daily Check 1)Find the first 3 terms of the following sequence: 2)Write the formula for the following arithmetic sequence. -2, 1, 4, 7, 10.
PreCalculus Section 1.6 Solve quadratic equations by: a. Factoring b. Completing the square c. Quadratic formula d. Programmed calculator Any equation.
Sequences and the Binomial Theorem Sequences Arithmetic Sequences Geometric Sequences & Series Binomial Theorem.
1 RECURRENCE 1. Sequence 2. Recursively defined sequence 3. Finding an explicit formula for recurrence relation.
Algebra Review. Systems of Equations Review: Substitution Linear Combination 2 Methods to Solve:
Solving Linear Homogeneous Recurrence Relations ICS 6D Sandy Irani.
Pre-Calculus Section 8.1A Sequences and Series. Chapter 8: Sequences, Series, and Probability Sequences and series describe algebraic patterns. We will.
Mathematical Induction I Lecture 19 Section 4.2 Mon, Feb 14, 2005.
1 Lecture Outline for Recurrences Already Covered: Recursive definition of sequences Recursive definition of sets Recursive definition of operations Recursive.
Advanced Algorithms Analysis and Design By Dr. Nazir Ahmad Zafar Dr Nazir A. Zafar Advanced Algorithms Analysis and Design.
Copyright © 2011 Pearson Education, Inc. Slide
1 10 Section 8.1 Recursive Thinking Page 409
Introduction to Algorithms: Recurrences
The Art of Problem Solving
Design and Analysis of Algorithms
Sullivan Algebra and Trigonometry: Section 1.3
A Brief Summary for Exam 2
Copyright © Cengage Learning. All rights reserved.
Chapter 3 Section 4.
Solving Linear Systems Algebraically
Chapter 8: Further Topics in Algebra
Solving Recurrence Relations by Iteration
Linear Algebra Lecture 3.
Mathematical Induction I
Chapter 11: Further Topics in Algebra
Geometric Sequences and Series
Solving Systems of Linear and Quadratic Equations
Systems of Equations Solve by Graphing.
Chapter 11: Further Topics in Algebra
Unit 3: Linear and Exponential Functions
Chapter 8 Systems of Equations
2 Chapter Chapter 2 Equations, Inequalities and Problem Solving.
SECTIONS 9-2 and 9-3 : ARITHMETIC &
Warm- Up: Solve by Substitution
Algebra 1 Notes Lesson 7-5 Graphing Systems of Inequalities
Presentation transcript:

Solving Recurrence Relations by Iteration Lecture 41 Section 8.2 Fri, Apr 13, 2007

Solving Recurrence Relations Our method will involve two steps. Guess the answer. Verify the guess, using mathematical induction.

Guessing the Answer Write out the first several terms, as many as necessary. Look for a pattern. Two strategies Do the arithmetic. Spot the pattern in the resulting numbers. Postpone the arithmetic. Spot the pattern in the algebraic formulas.

Example: Do the Arithmetic Define {an} by a1 = 2, an = 2an – 1 + 1, for all n  2. Find a formula for an. First few terms: 2, 5, 11, 23, 47, 95, 191.

Example: Do the Arithmetic Define {an} by a1 = 2, an = 2an – 1 + 1, for all n  2. Find a formula for an. First few terms: 2, 5, 11, 23, 47, 95, 191. Compare to: 1, 2, 4, 8, 16, 32, 64.

Example: Do the Arithmetic Define {an} by a1 = 2, an = 2an – 1 + 1, for all n  2. Find a formula for an. First few terms: 2, 5, 11, 23, 47, 95, 191. Compare to: 1, 2, 4, 8, 16, 32, 64. Guess that an = 32n – 1 + 1.

Example: Postpone the Arithmetic Define {an} by a1 = 1, an = 2an – 1 + 5, for all n  2. Find a formula for an. First few terms: 1, 7, 19, 43, 91. What is an?

Example: Postpone the Arithmetic Calculate a few terms a1 = 1. a2 = 2  1 + 5. a3 = 22  1 + 2  5 + 5. a4 = 23  1 + 22  5 + 2  5 + 5. a5 = 24  1 + 23  5 + 22  5 + 2  5 + 5. It appears that, in general, an = 2n – 1 + (2n – 2 + 2n – 3 + … + 1)  5.

Lemma: Geometric Series Lemma: Let r  1. Then

Example: Postpone the Arithmetic an = 2n – 1 + (2n – 2 + 2n – 3 + … + 1)  5 = 2n – 1 + (2n – 1 – 1)/(2 – 1)  5 = 2n – 1 + (2n – 1 – 1)  5 = 2n – 1 + 5  2n – 1 – 5 = 6  2n – 1 – 5 = 3  2n – 5.

Example Define {an} by Find a formula for an. a0 = a, an = ran – 1 + b, for all n  1. Find a formula for an. a1 = ra + b. a2 = r(ra + b) + b = r2a + (rb + b). a3 = r(r2a + (rb + b)) + b = r3a + (r2b + rb + b).

Example: Future Value of an Annuity It appears that, in general,

Verifying the Answer Use mathematical induction to verify the guess.

Solving First-Order Linear Recurrence Relations A first-order linear recurrence relation with constant coefficients is a recurrence relation of the form an = san – 1 + t, n  1, with initial condition a0 = u, where s, t, and u are real numbers.

Solving First-Order Linear Recurrence Relations Theorem: Depending on the value of s, the recurrence relation will have one of the following solutions: If s = 0, the solution is a0 = u, an = t, for all n  1. If s = 1, the solution is an = u + nt, for all n  0.

Solving First-Order Linear Recurrence Relations If s  0 and s  1, then the solution is of the form an = Asn + B, for all n  0, for some real numbers A and B.

Solving First-Order Linear Recurrence Relations To solve for A and B in the general case, substitute the values of a0 and a1 and solve the system for A and B. a0 = A + B = u a1 = As + B = su + t

Example Solve the recurrence relation a0 = 1, an = 2an – 1 + 1, n  1.