Solving Recurrence Relations by Iteration Lecture 36 Section 8.2 Mon, Apr 17, 2006.

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
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.
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.
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
Section 2.4. Section Summary Sequences. Examples: Geometric Progression, Arithmetic Progression Recurrence Relations Example: Fibonacci Sequence Summations.
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Sullivan Algebra and Trigonometry: Section 1.2 Quadratic Equations Objectives of this Section Solve a Quadratic Equation by Factoring Know How to Complete.
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.
1 © 2010 Pearson Education, Inc. All rights reserved © 2010 Pearson Education, Inc. All rights reserved Chapter 10 Further Topics in Algebra.
Linear Systems of Equations Section 3.1. What is a “system” of equations?
CSE 2813 Discrete Structures Solving Recurrence Relations Section 6.2.
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
1 © 2010 Pearson Education, Inc. All rights reserved © 2010 Pearson Education, Inc. All rights reserved Chapter 11 Further Topics in Algebra.
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.
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
Ch. 7 – Matrices and Systems of Equations
Sullivan Algebra and Trigonometry: Section 1.2 Quadratic Equations
The Art of Problem Solving
Sullivan Algebra and Trigonometry: Section 1.3
A Brief Summary for Exam 2
Solving Systems by Substitution
Copyright © Cengage Learning. All rights reserved.
Chapter 3 Section 4.
SECTION 9-3 : SOLVING QUADRATIC EQUATIONS
Solving Linear Systems Algebraically
Solve a system of linear equation in two variables
Algebra 1 Section 12.5.
Chapter 8: Further Topics in Algebra
Solving Recurrence Relations by Iteration
Linear Algebra Lecture 3.
Mathematical Induction I
Solving Recurrence Relations by Iteration
Geometric Sequences and Series
Solving Systems of Linear and Quadratic Equations
Chapter 11: Further Topics in Algebra
Chapter 8 Systems of Equations
2 Chapter Chapter 2 Equations, Inequalities and Problem Solving.
Mathematical Induction II
Recursively Defined Sequences
Presentation transcript:

Solving Recurrence Relations by Iteration Lecture 36 Section 8.2 Mon, Apr 17, 2006

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 {a n } by a 1 = 2, a n = 2a n – 1 – 1, for all n  2. Find a formula for a n. First few terms: 2, 3, 5, 9, 17, 33, 65. Compare to: 1, 2, 4, 8, 16, 32, 64. Guess that a n = 2 n –

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

Example: Postpone the Arithmetic Calculate a few terms a 1 = 1. a 2 = 2  a 3 = 2 2   a 4 = 2 3    a 5 = 2 4     It appears that, in general, a n = 2 n – 1 + (2 n – n – 3 + … + 1)  5.

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

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

Example: Future Value of an Annuity Define {a n } by a 0 = d, a n = (1 + r)a n – 1 + d, for all n  1. Find a formula for a n. a 1 = (1 + r)d + d. a 2 = (1 + r) 2 d + (1 + r)d + d. a 3 = (1 + r) 3 d + (1 + r) 2 d + (1 + r)d + d.

Example: Future Value of an Annuity It appears that, in general, a n = (1 + r) n d + … + (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 {a n } by a 1 = 1, a n = 2a n – 1 + 5, for all n  2. Verify, by induction, the formula a n = 3  2 n – 5, for all n  1.

Future Value of an Annuity Verify the formula a n = 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 a n = sa n – 1 + t, n  1, with initial condition a 0 = 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 a 0 = u, a n = t, for all n  1. If s = 1, the solution is a n = u + nt, for all n  0. If s  0 and s  1, then the solution is of the form a n = As n + 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 a 1 and a 2 and solve the system for A and B. a 0 = A + B = u a 1 = As + B = su + t

Example Solve the recurrence relation a 1 = 1, a n = 2a n – 1 + 5, n  2. Solve the recurrence relation a 0 = d, a n = (1 + r)a n – 1 + d, n  1.