Solving Recurrence Relations by Iteration

Slides:



Advertisements
Similar presentations
Copyright © Cengage Learning. All rights reserved.
Advertisements

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
Discrete Structures Chapter 5: Sequences, Mathematical Induction, and Recursion 5.7 Solving Recurrence Relations by Iteration The keener one’s sense of.
Copyright © 2007 Pearson Education, Inc. Slide 8-1.
Algebra II March 2 nd Students should complete warm-up problems. Given a graph of a system of equations students will be able to determine how many solutions.
Geometric Sequences and Series
Arithmetic Sequences Section 4.5. Preparation for Algebra ll 22.0 Students find the general term and the sums of arithmetic series and of both finite.
7 = 7 SOLUTION EXAMPLE 1 Check the intersection point Use the graph to solve the system. Then check your solution algebraically. x + 2y = 7 Equation 1.
Thinking Mathematically Algebra: Graphs, Functions and Linear Systems 7.3 Systems of Linear Equations In Two Variables.
Algebra 1 Notes Lesson 7-2 Substitution. Mathematics Standards -Patterns, Functions and Algebra: Solve real- world problems that can be modeled using.
Chapter 1 The Art of Problem Solving © 2008 Pearson Addison-Wesley.
 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.
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
Section 2.4. Section Summary Sequences. Examples: Geometric Progression, Arithmetic Progression Recurrence Relations Example: Fibonacci Sequence Summations.
Sequences and Summations Section 2.4. Section Summary Sequences. – Examples: Geometric Progression, Arithmetic Progression Recurrence Relations – Example:
1 Topics Recursion sections 8.1 – Recursion A recursively defined sequence –First, certain initial values are specified –Later terms of the sequence.
Linear Systems of Equations Section 3.1. What is a “system” of equations?
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 Department. Objectives Recurrences.  Substitution Method,  Recursion-tree method,  Master method.
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.
Chapter 11 Sequences and Series
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.
EXAMPLE 1 Solve a system graphically Graph the linear system and estimate the solution. Then check the solution algebraically. 4x + y = 8 2x – 3y = 18.
Algebra Review. Systems of Equations Review: Substitution Linear Combination 2 Methods to Solve:
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.
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
introducing Section 4: Linear Functions Topics 1-4
Lecture 11. Master Theorem for analyzing Recursive relations
Linear Algebra Lecture 19.
The Art of Problem Solving
Arithmetic and Geometric Series
Design and Analysis of Algorithms
Lecture Outline for Recurrences
Sullivan Algebra and Trigonometry: Section 1.3
Copyright © Cengage Learning. All rights reserved.
Chapter 3 Section 4.
Arithmetic & Geometric Sequences
Solve a system of linear equation in two variables
Algebra 1 Section 12.5.
Chapter 8: Further Topics in Algebra
CSEC Mathematics SUBJECT OUTLINE.
Linear Algebra Lecture 3.
Mathematical Induction I
Copyright © Cengage Learning. All rights reserved.
ALGEBRA II ALGEBRA II HONORS/GIFTED - SECTION 5-2 (Polynomials, Linear Functions, and Zeros) 2/17/2019 ALGEBRA II SECTION.
Chapter 11: Further Topics in Algebra
Solving Recurrence Relations by Iteration
Geometric Sequences and Series
Solving Systems of Linear and Quadratic Equations
Chapter 11: Further Topics in Algebra
10/31/12 Recognizing patterns Describe the growth pattern of this sequence of blocks. Illustrate the sequences of blocks for 4, 5, and 6. Try creating.
Chapter 8 Systems of Equations
2 Chapter Chapter 2 Equations, Inequalities and Problem Solving.
Mathematical Induction II
SECTIONS 9-2 and 9-3 : ARITHMETIC &
Recursively Defined Sequences
Algebra 1 Notes Lesson 7-5 Graphing Systems of Inequalities
Presentation transcript:

Solving Recurrence Relations by Iteration Lecture 36 Section 8.2 Thu, Mar 24, 2005

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 that 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, 3, 5, 9, 17, 33, 65. Compare to: 1, 2, 4, 8, 16, 32, 64. Guess that an = 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: Future Value of an Annuity Define {an} by a0 = d, an = (1 + r)an – 1 + d, for all n  1. Find a formula for an. a1 = (1 + r)d + d. a2 = (1 + r)2d + (1 + r)d + d. a3 = (1 + r)3d + (1 + r)2d + (1 + r)d + d.

Example: Future Value of an Annuity It appears that, in general, an = (1 + r)nd + … + (1 + r)d + d = d((1 + r)n + 1 – 1)/((1 + r) – 1) = d((1 + r)n + 1 – 1)/r.

Verifying the Answer Use mathematical induction to verify the guess.

Verifying the Answer Define {an} by Verify, by induction, the formula an = 2an – 1 + 5, for all n  2. Verify, by induction, the formula an = 3  2n – 5, for all n  1.

Future Value of an Annuity Verify the formula an = d((1 + r)n + 1 – 1)/r for all n  0, for the future value of an annuity.

Solving First-Order Linear Recurrence Relations A first-order linear recurrence relation 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. 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 a1 and a2 and solve the system for A and B. a0 = A + B = u a1 = As + B = su + t

Example Solve the recurrence relation a1 = 1, an = 2an – 1 + 5, n  2. a0 = d, an = (1 + r)an – 1 + d, n  1.