Copyright © Zeph Grunschlag, 2001-2002. Solving Recurrence Relations Zeph Grunschlag.

Slides:



Advertisements
Similar presentations
Chapter 2: Second-Order Differential Equations
Advertisements

1 Copyright M.R.K. Krishna Rao Solving Recurrence Relations Steps for solving a linear homogeneous recurrence relation of degree 2 : Step #1.
Second-Order Differential
A second order ordinary differential equation has the general form
Ch 3.3: Complex Roots of Characteristic Equation Recall our discussion of the equation where a, b and c are constants. Assuming an exponential soln leads.
Ch 3.4: Repeated Roots; Reduction of Order
Ch 3.5: Repeated Roots; Reduction of Order
Chapter 6 Recurrence and Solution. 6.2 Recurrence Relation 6.3 Solve Homogeneous Recurrence 6.4 Solve Nonhomogeneous Recurrence.
6.Advanced Counting Techniques 1 Copyright M.R.K. Krishna Rao 2003 Ch 6. Recurrence Relations A recurrence relation for the sequence {a n } is an equation.
Multiplying, Dividing, and Simplifying Radicals
Objectives: 1. Solve equations by: A. Factoring B. Square Root of Both Sides C. Completing the Square D. Quadratic Formula 2. Solve equations in quadratic.
Boyce/DiPrima 9 th ed, Ch 3.1: 2 nd Order Linear Homogeneous Equations-Constant Coefficients Elementary Differential Equations and Boundary Value Problems,
5.5 Systems Involving Nonlinear Equations 1 In previous sections, we solved systems of linear equations using various techniques such as substitution,
7.3 Completing the Square BobsMathClass.Com Copyright © 2010 All Rights Reserved In this section we will learn another method called completing.
Solving Equations That Are Quadratic in Form Solve equations by rewriting them in quadratic form. 2.Solve equations that are quadratic in form by.
Boyce/DiPrima 9th ed, Ch 3.4: Repeated Roots; Reduction of Order Elementary Differential Equations and Boundary Value Problems, 9th edition, by William.
1 Linear Recurrence Relations Part I Jorge Cobb The University of Texas at Dallas.
U4L3 Solving Quadratic Equations by Completing the Square.
Mathematics for Business and Economics - I
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.
Non-Homogeneous Equations
Solving Second-Order Recursive Relations Lecture 36 ½ Section 8.3 Wed, Apr 19, 2006.
Goal: Solve a system of linear equations in two variables by the linear combination method.
Chapter 10.7 Notes: Solve Quadratic Equations by the Quadratic Formula Goal: You will solve quadratic equations by using the Quadratic Formula.
1. 2. * Often times we are not able to a quadratic equation in order to solve it. When this is the case, we have two other methods: completing the square.
Derivation of the Quadratic Formula The following shows how the method of Completing the Square can be used to derive the Quadratic Formula. Start with.
Do Now (3x + y) – (2x + y) 4(2x + 3y) – (8x – y)
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.
Solve by factoring. x² = - 4 – 5x 2,. Solve by factoring. n² = -30 – 11n -4 and -1.
CSE 2813 Discrete Structures Solving Recurrence Relations Section 6.2.
By Christina Armetta. The First step is to get the given equation into standard form. Standard form is Example of putting an equation in standard form:
Math 3120 Differential Equations with Boundary Value Problems
Equations involving three terms constant, linear, and square Take square root, factor or use quadratic formula Quadratic Equations.
A Differential Equation is said to be linear if the dependent variable and its differential coefficient occur in it in the first degree only and are not.
Radical Equations and Problem Solving Use the power rule to solve radical equations.
Homogeneous Linear Recurrences To solve such recurrences we must first know how to solve an easier type of recurrence relation: DEF: A linear recurrence.
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.
3.7 Completing the Square Objective:
PreCalculus Section 1. 6 Solve quadratic equations by: a. Factoring b
Solving Quadratic Equations by Completing the Square
Solving Quadratic Equations by Completing the Square
Recurrence Relations; General Inclusion-Exclusion
Solving Quadratic Equations by Completing the Square
A second order ordinary differential equation has the general form
Factoring Special Cases
Solving Quadratic Equations by Completing the Square
Solving Quadratic Equations by Completing the Square
Solving Quadratic Equations by Completing the Square
Solving Quadratic Equations by Completing the Square
Solving Quadratic Equations by Completing the Square
Solving Quadratic Equations by Completing the Square
Solving Quadratic Equations by Completing the Square
Solving Quadratic Equations by Completing the Square
Solving Quadratic Equations by Completing the Square
Quadratic Equations.
Solving Quadratic Equations by Completing the Square
Solving Quadratic Equations by Completing the Square
Solving Quadratic Equations by Completing the Square
Solving Quadratic Equations by Completing the Square
6-3 Completing the Square
Solving Quadratic Equations by Completing the Square
Solving Quadratic Equations by Completing the Square
Solving Quadratic Equations by Completing the Square
Solving Quadratic Equations by Completing the Square
Solving Quadratic Equations by Completing the Square
Solving Quadratic Equations by Completing the Square
Solving Quadratic Equations by Completing the Square
Equations Involving Absolute Value
Presentation transcript:

Copyright © Zeph Grunschlag, Solving Recurrence Relations Zeph Grunschlag

L202 Agenda Solving recurrence solutions Linear recurrences with constant coefficients  Homogeneous case (RHS = 0)  General case

L203 Linear Recurrences There is a class of recurrence relations which can be solved analytically in general. These are called linear recurrences and include the Fibonacci recurrence. Begin by showing how to solve Fibonacci:

L204 Linear Recurrences with Constant Coefficients Previous method generalizes to solving “linear recurrence relations with constant coefficients”: DEF: A recurrence relation is said to be linear if a n is a linear combination of the previous terms plus a function of n. I.e. no squares, cubes or other complicated function of the previous a i can occur. If in addition all the coefficients are constants then the recurrence relation is said to have constant coefficients.

L205 Linear Recurrences with Constant Coefficients Q: Which of the following are linear with constant coefficients? 1. a n = 2a n-1 2. a n = 2a n n-3 - a n-3 3. a n = a n-1 2

L206 Linear Recurrences with Constant Coefficients A: 1. a n = 2a n-1 : YES 2. a n = 2a n n-3 - a n-3 : YES 3. a n = a n-1 2 : NO. Squaring is not a linear operation. Similarly a n = a n-1 a n-2 and a n = cos(a n-2 ) are non-linear.

L207 Homogeneous Linear Recurrences To solve such recurrences we must first know how to solve an easier type of recurrence relation: DEF: A linear recurrence relation is said to be homogeneous if it is a linear combination of the previous terms of the recurrence without an additional function of n. Q: Which of the following are homogeneous? 1. a n = 2a n-1 2. a n = 2a n n-3 - a n-3

L208 Linear Recurrences with Constant Coefficients A: 1. a n = 2a n-1 : YES 2. a n = 2a n n-3 - a n-3 : No. There’s an extra term f (n) = 2 n-3

L209 Homogeneous Linear Recurrences with Const. Coeff.’s The 3-step process used for the next example, Fibonacci recurrence, works well for general homogeneous linear recurrence relations with constant coefficients. There are a few instances where some modification is necessary. In class notes are useful

L2010 Solving Fibonacci Recipe solution has 3 basic steps: 1) Assume solution of the form a n = r n 2) Find all possible r’s that seem to make this work. Call these 1 r 1 and r 2. Modify assumed solution to general solution a n = Ar 1 n +Br 2 n where A,B are constants. 3) Use initial conditions to find A,B and obtain specific solution.

L2011 Solving Fibonacci 1) Assume exponential solution of the form a n = r n : Plug this into a n = a n-1 + a n-2 : r n = r n-1 + r n-2 Notice that all three terms have a common r n-2 factor, so divide this out: r n /r n-2 = (r n-1 +r n-2 )/r n-2  r 2 = r + 1 This equation is called the characteristic equation of the recurrence relation.

L2012 Solving Fibonacci 2) Find all possible r’s that solve characteristic r 2 = r + 1 Call these r 1 and r 2. 1 General solution is a n = Ar 1 n +Br 2 n where A,B are constants. Quadratic formula 2 gives: r = (1   5)/2 So r 1 = (1+  5)/2, r 2 = (1-  5)/2 General solution: a n = A [(1+  5)/2] n +B [(1-  5)/2] n

L2013 Solving Fibonacci 3) Use initial conditions a 0 = 0, a 1 = 1 to find A,B and obtain specific solution. 0=a 0 = A [(1+  5)/2] 0 +B [(1-  5)/2] 0 = A +B 1=a 1 = A [(1+  5)/2] 1 +B [(1-  5)/2] 1 = A(1+  5)/2 +B (1-  5)/2 = (A+B )/2 + (A-B )  5/2 First equation give B = -A. Plug into 2 nd : 1 = 0 +2A  5/2 so A = 1/  5, B = -1/  5 Final answer: (CHECK IT!)

L2014 Homogeneous -Complications Repeating roots in characteristic equation. Repeating roots imply that don’t learn anything new from second root, so may not have enough information to solve formula with given initial conditions. We’ll see how to deal with this on next slide.

L2015 Complication: Repeating Roots EG: Solve a n = 2a n-1 -a n-2, a 0 = 1, a 1 = 2 Find characteristic equation by plugging in a n = r n : r 2 - 2r +1 = 0 Since r 2 - 2r +1 = (r -1) 2 the root r = 1 repeats. SOLUTION: Multiply second solution by n so general solution looks like: a n = Ar 1 n +Bnr 1 n

L2016 Complication: Repeating Roots Solve a n = 2a n-1 -a n-2, a 0 = 1, a 1 = 2 General solution: a n = A1 n +Bn1 n = A+Bn Plug into initial conditions 1 = a 0 = A+B·0·1 0 = A 2 = a 0 = A·1 1 +B·1·1 1 = A+B Plugging first equation A = 1 into second: 2 = 1+B implies B = 1. Final answer: a n = 1+n (CHECK IT!)

Self Study There are many types of recurrence relations, such as non-homogeneous which require different approach in solving them, and the ways are explained in the test book if you are interested. L2017