3.5 Recurrence Relations.

Slides:



Advertisements
Similar presentations
Choi 2012 Arithmetic Sequence A sequence like 2, 5, 8, 11,…, where the difference between consecutive terms is a constant, is called an arithmetic sequence.
Advertisements

Discrete Structures Chapter 6 Recurrence Relations
7.5 Use Recursive Rules with Sequences and Functions
1 Linear Recurrence Relations Part I Jorge Cobb The University of Texas at Dallas.
Applied Discrete Mathematics Week 9: Relations
1.3 “Solving Linear Equations” Steps: 1.Isolate the variable. 2.To solve when there is a fraction next to a variable, multiply both sides by the reciprocal.
Explicit, Summative, and Recursive
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.
What are two types of Sequences?
Solving Second-Order Recursive Relations Lecture 36 ½ Section 8.3 Wed, Apr 19, 2006.
RECURRENCE Sequence Recursively defined sequence
CSCI 115 Chapter 3 Counting. CSCI 115 §3.1 Permutations.
1 Topics Recursion sections 8.1 – Recursion A recursively defined sequence –First, certain initial values are specified –Later terms of the sequence.
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.
Infinite Geometric Series Recursion & Special Sequences Definitions & Equations Writing & Solving Geometric Series Practice Problems.
RECURRENCE Sequence Recursively defined sequence
Multiplication and Division Properties. Multiplication Properties Commutative Property Associative Property Identity Property Zero Property Distributive.
Sequences and Series Explicit, Summative, and Recursive.
4.2A Arithmetic Explicit and Recursive Sequences
Solving Quadratic Equations. Find the quadratic equation if the solutions are 3 and -2. x = 3 x = -2 Make them equal zero. x – 3 = 0x + 2 = 0 (x – 3)(x.
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.
Advanced Algorithms Analysis and Design By Dr. Nazir Ahmad Zafar Dr Nazir A. Zafar Advanced Algorithms Analysis and Design.
11.5 Recursive Rules for Sequences p What is a recursive rule for sequences? What does ! mean in math?
Warm-Up #34 Thursday, 12/10. Homework Thursday, 12/10 Lesson 4.02 packet Pg____________________.
Advanced Algorithms Analysis and Design By Dr. Nazir Ahmad Zafar Dr Nazir A. Zafar Advanced Algorithms Analysis and Design.
SEQUENCES. Learning Objectives Generate terms of a simple sequence, given a rule, finding a term from the previous term Generate terms of a simple sequence,
CSG523/ Desain dan Analisis Algoritma
CSG523/ Desain dan Analisis Algoritma
Year 9 Mathematics Algebra and Sequences
CMSC Discrete Structures
Sequences Arithmetic Sequence:
Recursion and Recurrence Relations
11.2 Arithmetic Sequences.
Properties of Arithmetic
Modeling with Recurrence Relations
Solving Linear Equations and Inequalities
Cross Multiplication. 4x + 16 = ……………...
9 The Mathematics of Spiral Growth
Sequences and Series.
Patterns & Sequences Algebra I, 9/13/17.
Module 1 Day 1 Evaluating Functions.
Patterns and Algebraic rules
Leave 1 page blank to create your table of contents.
Arithmetic Sequences.
½ is the slope 1 is the y-intercept ½ is the slope
Arithmetic Sequences.
Geometric Sequences.
Warm-up ~ Happy Wednesday
Equation with variables on both sides
Arithmetic Sequences.
8.1.1 Solving Simple Equations
CMSC Discrete Structures
Solving Recurrence Relations
3.8 Use Inverse Matrices to Solve Linear Systems
Equations and Inequalities
Two step equation Operations
Linear Equations A linear first-order DE looks like Standard form is
CMSC Discrete Structures
Recurrence Relations Discrete Structures.
Arithmetic Sequences.
Write the recursive and explicit formula for the following sequence
Example 2B: Solving Linear Systems by Elimination
Warm-Up#.
Unit 1 – Section 4 “Recursive and Explicit Formula” Part 2
How to Solve Equations using Factoring
Sequence.
Presentation transcript:

3.5 Recurrence Relations

Terms that refer to previous terms to define the next term is called recursive. The recursive formula is called recurrence relation. Information about the beginning sequence is called the initial condition or conditions.

The recurrence relation below recursively defines the sequence 4, 7, 10, 13 ... An = A n-1 + 3 with initial condition A1 =4 The recurrence relation below defines the Fibonacci sequence 1, 1, 2, 3, 5, 8, 13, 21….. fn = f n-1 + fn-2 with initial conditions f1 = f2 = 1

A technique for finding an explicit formula for a sequence defined by a recurrence relation is backtracking. An explicit formula allows direct computation of any term for a sequence.

In order to find a5, we need to determine a2, a3 and a4 In order to find a5, we need to determine a2, a3 and a4. an = 2an-1 where a1 = 3 a2= 2a2-1 a2= 2a1 a2=2(3) = 6 a3= 2a3-1 a3= 2a2 a3=2(6) = 12 a4= 2a4-1 a4= 2a3 a4=2(12) = 24 a5= 2a5-1 a5= 2a4 a5=2(24) = 48 The result is sequence 3, 6, 12, 24, 48

Backtracking method The Backtracking method is a method to determine an explicit formula an = 2an-1 a2= 2an-1 a3= 2(2an-2) a4= 2*2(2an-3) a5= 2*2*2(2an-4)   We see patterns emerging When n = 2 we have 21 When n = 3 we have 22 When n = 4 we have 23 When n = 5 we have 24 Part of the explicit formula is: 2n-1

a2 =21 * 3 = 6 a3 =22 * 3 = 12 a4 =23 * 3 = 24 a5 =24 * 3 = 48 Explicit formula result: an = 2 n-1 * 3 Now we can determine that a5 = 24 * 3 = 48

A recurrence relation is a linear homogeneous relation of degree k. Linear: The right hand side is a sum of weighted previous terms of the sequence. Homogeneous: No terms appears on the right hand side that are not multiples of a previous term. Of degree k: the recurrence goes back k terms. Cn =(-2)Cn-1 degree 1 (1 term) f n = f n-1 + f n-2 degree 2 (2 terms) LHS RHS an = r1a n-1 + r2an-2 +…+rkan-k   The terms are built the same way and each additional term refers to the previous term.

Backtracking doesn’t always work for solving a recurrence relation We have the Characteristic equation to use as an explicit formula.

an = 4an-1 + 5an-2 initial values: a1 = 2 and a2 = 6 Characteristic Equation: x2 = 4x + 5 We want the equation to equal zero. x2- 4x - 5= 0 (what two numbers when added = -4 and when multiplied = -5? Answer: -5 and 1) (x-5)(x+1) = 0 5 – 5 = 0 and -1 +1 = 0 x = 5 and -1 = x S1 = 5 S2 = -1 Formula: An = US1n + VS2n a1 = 2 = U(5)1 + V(-1)1 a2= 6 = U(5) 2 + V(-1) 2

a1 = 2 = U(5)1 + V(-1)1 a2= 6 = U(5) 2 + V(-1) 2 Solve for U 2 = 5U – V 6 = 25U + V 8 = 30U (1/30)8 = 30U(1/30) 4/15 = U

Solve for V (we know what U is now (4/15)) a1 = 2 = U(5)1 + V(-1)1 2 = 5(4/15)-V 2 = 20/15 – V + V 2 = 20/15 – V +V 2 + V = 20/15 -2 2 + V = 20/15 -2 V = 4/3 – 2 V = -2/3

An = US1n + VS2n S1 = 5 S2 = -1 U = 4/15 V = -2/3 An = 4/15(5)n + -2/3(-1)n

To check your answer a1 = 2 a2= 6 An = 4/15(5)n + -2/3(-1)n a1 = 2 = 4/15(5)1 + -2/3(-1)1 20/15 + 10/15 = 30/15 = 2 OR a2= 6 =4/15(5)2 + -2/3(-1) 2 100/15 + -2/3 100/15 + -10/15 = 90/15 = 6