Copyright © Cengage Learning. All rights reserved. CHAPTER 5 SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION.

Slides:



Advertisements
Similar presentations
Week 6 - Wednesday CS322.
Advertisements

Ch 3.2: Solutions of Linear Homogeneous Equations; Wronskian
Fall 2002CMSC Discrete Structures1 Now it’s Time for… RecurrenceRelations.
section 6.2 Solving Recurrence Relations
Copyright © Cengage Learning. All rights reserved. CHAPTER 5 SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION.
Week 5 - Friday.  What did we talk about last time?  Sequences  Summation and production notation  Proof by induction.
Copyright © Zeph Grunschlag, Solving Recurrence Relations Zeph Grunschlag.
Second-Order Differential
Recurrence Relations Reading Material –Chapter 2 as a whole, but in particular Section 2.8 –Chapter 4 from Cormen’s Book.
CSE115/ENGR160 Discrete Mathematics 04/19/12 Ming-Hsuan Yang UC Merced 1.
A second order ordinary differential equation has the general form
Discrete Structures Chapter 6 Recurrence Relations
Ch 6.2: Solution of Initial Value Problems
Recurrence Relations Reading Material –Chapter 2 as a whole, but in particular Section 2.8 –Chapter 4 from Cormen’s Book.
Recursive and Explicit Formulas for Arithmetic (Linear) Sequences.
Copyright © Cengage Learning. All rights reserved. CHAPTER 5 SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION.
Recursion Lecture 17: Nov 11. Quiz int hello(int n) { if (n==0) return 0; else printf(“Hello World %d\n”,n); hello(n-1); } 1.What would the program do.
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.
Boyce/DiPrima 9 th ed, Ch 3.1: 2 nd Order Linear Homogeneous Equations-Constant Coefficients Elementary Differential Equations and Boundary Value Problems,
Copyright © Cengage Learning. All rights reserved.
1 Linear Recurrence Relations Part I Jorge Cobb The University of Texas at Dallas.
Copyright © Cengage Learning. All rights reserved. CHAPTER 11 ANALYSIS OF ALGORITHM EFFICIENCY ANALYSIS OF ALGORITHM EFFICIENCY.
Applied Discrete Mathematics Week 9: Relations
7.2 Solving Recurrence Relations. Definition 1 (p. 460)- LHRR-K Def: A linear homogeneous recurrence relations of degree k with constant coefficients.
Advanced Counting Techniques
SECOND-ORDER DIFFERENTIAL EQUATIONS
Mathematics for Business and Economics - I
Chapter 8. Section 8. 1 Section Summary Introduction Modeling with Recurrence Relations Fibonacci Numbers The Tower of Hanoi Counting Problems Algorithms.
Advanced Counting Techniques CSC-2259 Discrete Structures Konstantin Busch - LSU1.
LIAL HORNSBY SCHNEIDER
Chapter 8 With Question/Answer Animations 1. Chapter Summary Applications of Recurrence Relations Solving Linear Recurrence Relations Homogeneous Recurrence.
Solving Second-Order Recursive Relations Lecture 36 ½ Section 8.3 Wed, Apr 19, 2006.
RECURRENCE Sequence Recursively defined sequence
Copyright © Cengage Learning. All rights reserved. 17 Second-Order Differential Equations.
Infinite Sequences and Series 8. Taylor and Maclaurin Series 8.7.
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Advanced Counting Techniques CSC-2259 Discrete Structures Konstantin Busch - LSU1.
Module #20 - Recurrences Solving Recurrences Rosen 6 th ed., §7.2.
Chapter 8 Recursion. 8.3 More Recurrence Second-Order Recurrence Definition – A second-order linear homogeneous recurrence relation with constant coefficients.
Foundations of Discrete Mathematics Chapters 5 By Dr. Dalia M. Gil, Ph.D.
Second-Order Differential
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.
Agenda Lecture Content:  Recurrence Relations  Solving Recurrence Relations  Iteration  Linear homogenous recurrence relation of order k with constant.
Advanced Engineering Mathematics, 7 th Edition Peter V. O’Neil © 2012 Cengage Learning Engineering. All Rights Reserved. CHAPTER 4 Series Solutions.
Math 3120 Differential Equations with Boundary Value Problems
RECURRENCE Sequence Recursively defined sequence
Copyright © Cengage Learning. All rights reserved. Sequences and Series.
MTH 253 Calculus (Other Topics) Chapter 9 – Mathematical Modeling with Differential Equations Section 9.4 – Second-Order Linear Homogeneous Differential.
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.
Advanced Algorithms Analysis and Design By Dr. Nazir Ahmad Zafar Dr Nazir A. Zafar Advanced Algorithms Analysis and Design.
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.
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.
CMSC Discrete Structures
Modeling with Recurrence Relations
Copyright © Cengage Learning. All rights reserved.
A second order ordinary differential equation has the general form
Copyright © Cengage Learning. All rights reserved.
CMSC Discrete Structures
Solving Recurrence Relations
Copyright © Cengage Learning. All rights reserved.
CMSC Discrete Structures
Copyright © Cengage Learning. All rights reserved.
Recurrence Relations Discrete Structures.
ICS 253: Discrete Structures I
Copyright © Cengage Learning. All rights reserved.
Presentation transcript:

Copyright © Cengage Learning. All rights reserved. CHAPTER 5 SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION

Copyright © Cengage Learning. All rights reserved. Second-Order Linear Homogeneous Recurrence Relations with Constant Coefficients SECTION 5.8

3 Second-Order Linear Homogeneous Recurrence Relations with Constant Coefficients Iteration is a basic technique that does not require any special tools beyond the ability to discern patterns. In many cases a pattern is not readily discernible and other methods must be used. A variety of techniques are available for finding explicit formulas for special classes of recursively defined sequences. The method explained in this section is one that works for the Fibonacci and other similarly defined sequences.

4 Second-Order Linear Homogeneous Recurrence Relations with Constant Coefficients “Second-order” refers to the fact that the expression for a k contains the two previous terms a k−1 and a k−2, “linear” to the fact that a k−1 and a k−2 appear in separate terms and to the first power, “homogeneous” to the fact that the total degree of each term is the same (thus there is no constant term), and “constant coefficients” to the fact that A and B are fixed real numbers that do not depend on k.

5 Example 1 – Second-Order Linear Homogeneous Recurrence Relations with Constant Coefficients State whether each of the following is a second-order linear homogeneous recurrence relation with constant coefficients: a. b. c. d. e. f. g. h.

6 a. b. c. d. e. f. g. h. Example 1 – Solution

7 The Distinct-Roots Case

8 Consider a second-order linear homogeneous recurrence relation with constant coefficients: where A and B are fixed real numbers. Relation (5.8.1) is satisfied when all the a i = 0, but it has nonzero solutions as well.

9 The Distinct-Roots Case Suppose that for some number t with t  0, the sequence, 1, t, t 2, t 3,..., t n,... satisfies relation (5.8.1). Then t satisfies the following characteristic equation.

10 The Distinct-Roots Case Equation (5.8.2) is called the characteristic equation of the recurrence relation.

11 Example 2 – Using the Characteristic Equation to Find Solutions to a Recurrence Relation Consider the recurrence relation that specifies that the kth term of a sequence equals the sum of the (k – 1)st term plus twice the (k – 2)nd term. That is, Find all sequences that satisfy relation (5.8.3) and have the form 1, t, t 2, t 3,..., t n,..., where t is nonzero.

12 Example 2 – Solution By Lemma 5.8.1, relation (5.8.3) is satisfied by a sequence 1, t, t 2, t 3,..., t n,... if, and only if, t satisfies the characteristic equation t 2 – t – 2 = 0. Since t 2 – t – 2 = (t – 2)(t + 1), the only possible values of t are 2 and –1.

13 Example 2 – Solution It follows that the sequences 1, 2, 2 2, 2 3,..., 2 n,... and 1, –1, (–1) 2, (–1) 3,..., (–1) n,.... are both solutions for relation (5.8.3) and there are no other solutions of this form. Note that these sequences can be rewritten more simply as 1, 2, 2 2, 2 3,..., 2 n,... and 1, –1, 1, –1,..., (–1) n,.... cont’d

14 The Distinct-Roots Case The Example 2 shows how to find two distinct sequences that satisfy a given second-order linear homogeneous recurrence relation with constant coefficients. It turns out that any linear combination of such sequences produces another sequence that also satisfies the relation.

15 The Distinct-Roots Case Given a second-order linear homogeneous recurrence relation with constant coefficients, if the characteristic equation has two distinct roots, then Lemmas and can be used together to find a particular sequence that satisfies both the recurrence relation and two specific initial conditions.

16 Example 3 – Finding the Linear Combination That Satisfies the Initial Conditions Find a sequence that satisfies the recurrence relation of Example 2, and that also satisfies the initial conditions a 0 = 1 and a 1 = 8. Solution: Example 2, the sequences 1, 2, 2 2, 2 3,..., 2 n,... and 1, –1, 1, –1,..., (–1) n,.. both satisfy relation (5.8.3) (though neither satisfies the given initial conditions).

17 Example 3 – Solution By Lemma 5.8.2, therefore, any sequence a 0, a 1, a 2,... that satisfies an explicit formula of the form where C and D are numbers, also satisfies relation (5.8.3). You can find C and D so that a 0, a 1, a 2,... satisfies the specified initial conditions by substituting n = 0 and n = 1 into equation (5.8.6) and solving for C and D: cont’d

18 Example 3 – Solution When you simplify, you obtain the system which can be solved in various ways. For instance, if you add the two equations, you get and so Then, by substituting into 1 = C + D, you get cont’d

19 Example 3 – Solution It follows that the sequence a 0, a 1, a 2,... given by for integers n  0, satisfies both the recurrence relation and the given initial conditions. cont’d

20 The Distinct-Roots Case The techniques of Examples 2 and 3 can be used to find an explicit formula for any sequence that satisfies a second-order linear homogeneous recurrence relation with constant coefficients for which the characteristic equation has distinct roots, provided that the first two terms of the sequence are known.

21 The Distinct-Roots Case This is made precise in the next theorem.

22 The Distinct-Roots Case The next example shows how to use the distinct-roots theorem to find an explicit formula for the Fibonacci sequence.

23 Example 4 – A Formula for the Fibonacci Sequence The Fibonacci sequence F 0, F 1, F 2,... satisfies the recurrence relation for all integers k  2 with initial conditions F 0 = F 1 = 1. Find an explicit formula for this sequence.

24 Example 4 – Solution The Fibonacci sequence satisfies part of the hypothesis of the distinct-roots theorem since the Fibonacci relation is a second-order linear homogeneous recurrence relation with constant coefficients (A = 1 and B = 1). Is the second part of the hypothesis also satisfied? Does the characteristic equation t 2 – t – 1 = 0 have distinct roots?

25 Example 4 – Solution By the quadratic formula, the roots are and so the answer is yes. It follows from the distinct-roots theorem that the Fibonacci sequence is given by the explicit formula where C and D are the numbers whose values are determined by the fact that F 0 = F 1 = 1. cont’d

26 Example 4 – Solution To find C and D, write and cont’d

27 Example 4 – Solution Thus the problem is to find numbers C and D such that C + D = 1 and This may look complicated, but in fact it is just a system of two equations in two unknowns. Solving the system of equations, we have cont’d

28 Example 4 – Solution Substituting these values for C and D into formula (5.8.7) gives or, simplifying, for all integers n  0. Remarkably, even though the formula for F n involves all of the values of the Fibonacci sequence are integers. cont’d

29 The Single-Root Case

30 The Single-Root Case Consider again the recurrence relation where A and B are real numbers, but suppose now that the characteristic equation has a single real root r. By Lemma 5.8.1, one sequence that satisfies the recurrence relation is 1, r, r 2, r 3,..., r n,... But another sequence that also satisfies the relation is 0, r, 2r 2, 3r 3,..., nr n,...

31 The Single-Root Case

32 The Single-Root Case Lemmas and can be used to establish the single-root theorem, which tells how to find an explicit formula for any recursively defined sequence satisfying a second-order linear homogeneous recurrence relation with constant coefficients for which the characteristic equation has just one root. Taken together, the distinct-roots and single-root theorems cover all second-order linear homogeneous recurrence relations with constant coefficients.

33 The Single-Root Case

34 Example 5 – Single-Root Case Suppose a sequence b 0, b 1, b 2,... satisfies the recurrence relation with initial conditions b 0 = 1 and b 1 = 3. Find an explicit formula for b 0, b 1, b 2,....

35 Example 5 – Solution This sequence satisfies part of the hypothesis of the single root theorem because it satisfies a second-order linear homogeneous recurrence relation with constant coefficients (A = 4 and B = –4). The single-root condition is also met because the characteristic equation t 2 – 4t + 4 = 0 has the unique root r = 2 [since t 2 – 4t + 4 = (t – 2) 2 ].

36 Example 5 – Solution It follows from the single-root theorem that b 0, b 1, b 2,... is given by the explicit formula where C and D are the real numbers whose values are determined by the fact that b 0 = 1 and b 1 = 3. To find C and D, write cont’d

37 Example 5 – Solution Hence the problem is to find numbers C and D such that C = 1 and 2C + 2D = 3. Substitute C = 1 into the second equation to obtain 2 + 2D = 3, Now substitute C = 1 and D = into formula (5.8.12) to conclude that cont’d