Logic and Discrete Mathematics. Section 6.7 Recurrence Relations and Their Solution

Similar documents
Algorithm Analysis Recurrence Relation. Chung-Ang University, Jaesung Lee

Ma/CS 6a Class 24: More Generating Functions

CIS Spring 2018 (instructor Val Tannen)

Review for Exam 2. Review for Exam 2.

Discrete Math. Instructor: Mike Picollelli. Day 10

Discrete Mathematics -- Chapter 10: Recurrence Relations

1 Examples of Weak Induction

Lecture 7: Dynamic Programming I: Optimal BSTs

2-4. Holt McDougal Geometry

Part III, Sequences and Series CS131 Mathematics for Computer Scientists II Note 16 RECURRENCES

Recurrences COMP 215

ELEMENTARY LINEAR ALGEBRA

AROUND (1 + 2) n. (1 + x) 5 = 1 + 5x + 10x x 3 + 5x 4 + x 5.

GENERALIZATION OF AN IDENTITY OF ANDREWS

Algorithms Test 1. Question 1. (10 points) for (i = 1; i <= n; i++) { j = 1; while (j < n) {

Advanced Counting Techniques

Method of Frobenius. General Considerations. L. Nielsen, Ph.D. Dierential Equations, Fall Department of Mathematics, Creighton University

Warm Up Lesson Presentation Lesson Quiz. Holt McDougal Geometry

High School Math Contest

Enumerating Binary Strings

Extended Binet s formula for the class of generalized Fibonacci sequences

ELEMENTARY LINEAR ALGEBRA

A sequence of thoughts on constructible angles.

Advanced Counting Techniques. Chapter 8

Consider an infinite row of dominoes, labeled by 1, 2, 3,, where each domino is standing up. What should one do to knock over all dominoes?

Math Assignment 11

How to Solve Linear Differential Equations

17 Advancement Operator Equations

Chapter 5. Linear Algebra. A linear (algebraic) equation in. unknowns, x 1, x 2,..., x n, is. an equation of the form

This class will demonstrate the use of bijections to solve certain combinatorial problems simply and effectively.

AREAS OF POLYGONS WITH COORDINATES OF VERTICES FROM HORADAM AND LUCAS NUMBERS. 1. Introduction

Counting Palindromic Binary Strings Without r-runs of Ones

PRIME LABELING OF SMALL TREES WITH GAUSSIAN INTEGERS. 1. Introduction

Recursive Definitions. Recursive Definition A definition is called recursive if the object is defined in terms of itself.

Recursive Definitions. Recursive Definition A definition is called recursive if the object is defined in terms of itself.

V. Adamchik 1. Recurrences. Victor Adamchik Fall of 2005

SMT 2011 General Test and Solutions February 19, F (x) + F = 1 + x. 2 = 3. Now take x = 2 2 F ( 1) = F ( 1) = 3 2 F (2)

a 11 x 1 + a 12 x a 1n x n = b 1 a 21 x 1 + a 22 x a 2n x n = b 2.

Algorithmic Approach to Counting of Certain Types m-ary Partitions

Week 9-10: Recurrence Relations and Generating Functions

CSL105: Discrete Mathematical Structures. Ragesh Jaiswal, CSE, IIT Delhi

LINEAR RECURSIVE SEQUENCES. The numbers in the sequence are called its terms. The general form of a sequence is

MATH 115 Concepts in Mathematics

Section 5.2 Solving Recurrence Relations

ELEMENTARY LINEAR ALGEBRA

Quiz 3 Reminder and Midterm Results

THE TEACHER UNDERSTANDS THE REAL NUMBER SYSTEM AND ITS STRUCTURE, OPERATIONS, ALGORITHMS, AND REPRESENTATIONS

Computing generating functions for the number of descents in permutations which avoid a family of permutations that start with 1

Prime Labeling of Small Trees with Gaussian Integers

Section 5.2 Series Solution Near Ordinary Point

ELEMENTARY PROBLEMS AND SOLUTIONS. Edited by A. P. HILLMAN University of New Mexico, Albuquerque, NM 87131

CSI2101-W08- Recurrence Relations

Math 3c Solutions: Exam 1 Fall Graph by eliiminating the parameter; be sure to write the equation you get when you eliminate the parameter.

A matrix over a field F is a rectangular array of elements from F. The symbol

Lecture 1 Complex Numbers. 1 The field of complex numbers. 1.1 Arithmetic operations. 1.2 Field structure of C. MATH-GA Complex Variables

Recurrence Relations

COL106: Data Structures and Algorithms (IIT Delhi, Semester-II )

Math 324 Summer 2012 Elementary Number Theory Notes on Mathematical Induction

Partition of Integers into Distinct Summands with Upper Bounds. Partition of Integers into Even Summands. An Example

ACT MATH MUST-KNOWS Pre-Algebra and Elementary Algebra: 24 questions

Divisibility in the Fibonacci Numbers. Stefan Erickson Colorado College January 27, 2006

Series Solutions Near a Regular Singular Point

K th -order linear difference equation (Normal Form)

Fibonacci numbers. Chapter The Fibonacci sequence. The Fibonacci numbers F n are defined recursively by

Appendix C: Event Topics per Meet

11 th Philippine Mathematical Olympiad Questions, Answers, and Hints

NATIONAL BOARD FOR HIGHER MATHEMATICS. M. A. and M.Sc. Scholarship Test. September 22, Time Allowed: 150 Minutes Maximum Marks: 30

Scientific Computing

Mathematical Fundamentals

Recursion. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Fall 2007

Linear Recurrence Relations

Unconventional Space-filling Curves

THE TEACHER UNDERSTANDS THE REAL NUMBER SYSTEM AND ITS STRUCTURE, OPERATIONS, ALGORITHMS, AND REPRESENTATIONS

Syllabus. + + x + n 1 n. + x + 2

A matrix is a rectangular array of. objects arranged in rows and columns. The objects are called the entries. is called the size of the matrix, and

High School Math Contest

The Method of Frobenius

Individual Round CHMMC November 20, 2016

A matrix is a rectangular array of. objects arranged in rows and columns. The objects are called the entries. is called the size of the matrix, and

Section 7.2 Solving Linear Recurrence Relations

IYGB. Special Extension Paper A. Time: 3 hours 30 minutes. Created by T. Madas. Created by T. Madas

{ 0! = 1 n! = n(n 1)!, n 1. n! =

Second Order Linear Equations

x 2 + 6x 18 x + 2 Name: Class: Date: 1. Find the coordinates of the local extreme of the function y = x 2 4 x.

Instructions. 2. Four possible answers are provided for each question and only one of these is correct.

15 th Annual Harvard-MIT Mathematics Tournament Saturday 11 February 2012

CN#4 Biconditional Statements and Definitions

Lucas sequences and infinite sums

CSCE 222 Discrete Structures for Computing. Review for Exam 2. Dr. Hyunyoung Lee !!!

PRINCIPLE OF MATHEMATICAL INDUCTION

PENRITH HIGH SCHOOL MATHEMATICS EXTENSION HSC Trial

ABSTRACT 1. INTRODUCTION

CS361 Homework #3 Solutions

MCR3U Unit 7 Lesson Notes

Chapter 1 Divide and Conquer Algorithm Theory WS 2016/17 Fabian Kuhn

Georgia Tech PHYS 6124 Mathematical Methods of Physics I

Propositional Logic. What is discrete math? Tautology, equivalence, and inference. Applications

Individual Solutions

AMBIGUITY PROBLEMS WITH POLAR COORDINATES

SOLUTIONS, what is the value of f(4)?

Transcription:

Logic and Discrete Mathematics Section 6.7 Recurrence Relations and Their Solution Slides version: January 2015

Definition A recurrence relation for a sequence a 0, a 1, a 2,... is a formula giving a n in terms of one or more of the terms preceding it (i.e in terms of a 0, a 1, a 2,..., a n 1 ), for any n greater than some initial integer k. The values of the first few terms of the sequence needed to start computing with the recurrence relation are called the initial conditions.

The Fibonacci sequence Let F 0 = 1, F 1 = 1, F 2 = 2, F 3 = 3, F 4 = 5, etc.

The Fibonacci sequence Let F 0 = 1, F 1 = 1, F 2 = 2, F 3 = 3, F 4 = 5, etc. We find that F n = F n 1 + F n 2 for all n 2. The necessary initial conditions are F 0 = 1, F 1 = 1.

The Fibonacci sequence Let F 0 = 1, F 1 = 1, F 2 = 2, F 3 = 3, F 4 = 5, etc. We find that for all n 2. F n = F n 1 + F n 2 The necessary initial conditions are F 0 = 1, F 1 = 1. This sequence is known as the Fibonacci sequence and the terms of the sequence are known as Fibonacci numbers.

The Lucas Numbers The sequence of Lucas numbers 2, 1, 3, 4, 7, 11,... has the initial conditions L 1 = 2 and L 2 = 1 and the recursion L n = L n 1 + L n 2.

The Lucas Numbers The sequence of Lucas numbers 2, 1, 3, 4, 7, 11,... has the initial conditions L 1 = 2 and L 2 = 1 and the recursion L n = L n 1 + L n 2. Note that this is the same recursion relation as for the Fibonacci numbers.

The Catalan Numbers The sequence of Catalan numbers is given recursively by C n+1 = C 1 C n + C 2 C n 1 + + C i C n+1 i + + C n C 1, with C 0 = C 1 = 1. The first eleven terms are 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796 C n can also be given non-recursively as follows: (2n)! C n+1 = (n + 1)!(n!) = 1 ( ) 2n, n = 0, 1, 2,.... n + 1 n

Significance of The Catalan Numbers (1) The number of ways to cut an (n + 2)-sided polygon into triangles by connecting its corners with n 1 non-intersecting straight line segments is equal to C n. Figure : Dividing the square. Figure : Dividing the pentagon.

Significance of The Catalan Numbers (2) The number of complete binary trees with n leaves is equal to C n 1. One leaf: Two leaves: Three leaves: Four leaves: Figure : Complete binary trees with one, two, three and four leaves

Definitions Definition A recurrence relation of the form a n = c 1 (n)a n 1 +c 2 (n)a n 2 +c 3 (n)a n 3 + + c m (n)a n m +f (n) where c 1, c 2,..., c m and f are functions of n, is called a linear recurrence relation of order m.

Definitions Definition A recurrence relation of the form a n = c 1 (n)a n 1 +c 2 (n)a n 2 +c 3 (n)a n 3 + + c m (n)a n m +f (n) where c 1, c 2,..., c m and f are functions of n, is called a linear recurrence relation of order m. The relation is homogeneous if f (n) = 0 for all n

Definitions Definition A recurrence relation of the form a n = c 1 (n)a n 1 +c 2 (n)a n 2 +c 3 (n)a n 3 + + c m (n)a n m +f (n) where c 1, c 2,..., c m and f are functions of n, is called a linear recurrence relation of order m. The relation is homogeneous if f (n) = 0 for all n The relation has constant coefficients and is of order m when the c i (n) s are all constant and c m 0.

Definitions Definition A recurrence relation of the form a n = c 1 (n)a n 1 +c 2 (n)a n 2 +c 3 (n)a n 3 + + c m (n)a n m +f (n) where c 1, c 2,..., c m and f are functions of n, is called a linear recurrence relation of order m. The relation is homogeneous if f (n) = 0 for all n The relation has constant coefficients and is of order m when the c i (n) s are all constant and c m 0. We consider recurrence relations that have the form a n = c 1 a n 1 + c 2 a n 2 + c 3 a n 3 + + c m a n m, c m 0.

Characteristic Equation and Roots Definition x m c 1 x m 1 c 2 x m 2 c m = 0 is called the characteristic equation of the recurrence relation a n = c 1 a n 1 + c 2 a n 2 + c 3 a n 3 + + c m a n m, c m 0.

Characteristic Equation and Roots Definition x m c 1 x m 1 c 2 x m 2 c m = 0 is called the characteristic equation of the recurrence relation a n = c 1 a n 1 + c 2 a n 2 + c 3 a n 3 + + c m a n m, c m 0. The characteristic equation has m (not necessarily distinct) roots, r 1, r 2, r 3,... r m, referred to as characteristic roots.

Characteristic Equation and Roots Definition x m c 1 x m 1 c 2 x m 2 c m = 0 is called the characteristic equation of the recurrence relation a n = c 1 a n 1 + c 2 a n 2 + c 3 a n 3 + + c m a n m, c m 0. The characteristic equation has m (not necessarily distinct) roots, r 1, r 2, r 3,... r m, referred to as characteristic roots. These roots may be real or complex.

Characteristic Equation and Roots Definition x m c 1 x m 1 c 2 x m 2 c m = 0 is called the characteristic equation of the recurrence relation a n = c 1 a n 1 + c 2 a n 2 + c 3 a n 3 + + c m a n m, c m 0. The characteristic equation has m (not necessarily distinct) roots, r 1, r 2, r 3,... r m, referred to as characteristic roots. These roots may be real or complex. As c m 0, they are all different from 0.

Theorem: Solutions Theorem The sequence a n = r n is a solution of the recurrence a n = c 1 a n 1 + c 2 a n 2 + c 3 a n 3 + + c m a n m, c m 0. if and only if r is a root of the characteristic equation x m c 1 x m 1 c 2 x m 2 c m = 0 Hence, for each characteristic root r, a n = r n is a solution. These are called fundamental solutions.

Operations on Solutions Let (a n ) and (b n ) be sequences. Addition of the sequences: (a n ) + (b n ) is the sequence (a n + b n ), i.e. (a 1, a 2, a 3,...) + (b 1, b 2, b 3,...) = (a 1 + b 1, a 2 + b 2, a 3 + b 3,...).

Operations on Solutions Let (a n ) and (b n ) be sequences. Addition of the sequences: (a n ) + (b n ) is the sequence (a n + b n ), i.e. (a 1, a 2, a 3,...) + (b 1, b 2, b 3,...) = (a 1 + b 1, a 2 + b 2, a 3 + b 3,...). A constant multiple, k(a n ), of a sequence (a n ) is k(a n ) = (ka 1, ka 2, ka 3,...).

Theorem: Linear Combinations of Solutions Theorem If (a n ) and (b n ) satisfy a homogeneous linear recurrence relation with constant coefficients, then (a n ) + (b n ) and k(a n ) satisfy the same recurrence relation.

General Solution Distinct Roots Theorem Let the roots r 1, r 2, r 3,..., r m of the characteristic equation be distinct. Then a n = k 1 r n 1 + k 2r n 2 + k 3r n 3 + k mr n m is a general solution of the homogeneous linear recurrence relation, i.e. every solution can be expressed in this form for some choice of constants k 1, k 2, k 3..., k m. I.e. the fundamental solutions of a recurrence relation form a basis of the vector space of solutions of that relation.

Solution Procedure Distinct Roots 1. Write down the characteristic equation for the relation.

Solution Procedure Distinct Roots 1. Write down the characteristic equation for the relation. 2. Find the m roots of the characteristic equation. If the roots are distinct we obtain m fundamental solutions.

Solution Procedure Distinct Roots 1. Write down the characteristic equation for the relation. 2. Find the m roots of the characteristic equation. If the roots are distinct we obtain m fundamental solutions. 3. Take an arbitrary linear combination of the fundamental solutions to obtain a general solution.

Solution Procedure Distinct Roots 1. Write down the characteristic equation for the relation. 2. Find the m roots of the characteristic equation. If the roots are distinct we obtain m fundamental solutions. 3. Take an arbitrary linear combination of the fundamental solutions to obtain a general solution. 4. Using the initial conditions, construct and solve a system of equations to obtain the specific solution.

Examples: Distinct Roots Solve the following recurrence relations: 1. a n = 5a n 1 6a n 2 for n > 2, and with a 1 = 2 and a 2 = 10.

Examples: Distinct Roots Solve the following recurrence relations: 1. a n = 5a n 1 6a n 2 for n > 2, and with a 1 = 2 and a 2 = 10. 2. a n = a n 1 + 12a n 2 for n > 1, and with a 0 = 1 and a 1 = 2.

Examples: Distinct Roots Solve the following recurrence relations: 1. a n = 5a n 1 6a n 2 for n > 2, and with a 1 = 2 and a 2 = 10. 2. a n = a n 1 + 12a n 2 for n > 1, and with a 0 = 1 and a 1 = 2. 3. a n = 4a n 1 + 21a n 2 for for n > 2, and with a 1 = 2 and a 2 = 3.

Complex Roots Theorem If the roots of a characteristic equation of a homogeneous linear recurrence relation of degree two are complex numbers a + bi and a bi (i.e. the roots are complex conjugates) then the general solution of the recurrence relation is given by a n = ρ n (k 1 cos nθ + k 2 sin nθ) where ρ = a 2 + b 2, cos θ = a ρ and sin θ = b ρ.

Complex Roots Examples Solve the following recurrence relation: a n = 2 2a n 1 4a n 2 for n > 1, with a 0 = 1 and a 1 = 2.

Multiplicity of Roots A characteristic root r has multiplicity j if it appears as a root of the characteristic equation x m c 1 x m 1 c 2 x m 2 c m = 0 exactly j times. This is equivalent to (x r) j being a divisor of the polynomial x m c 1 x m 1 c 2 x m 2 c m but (x r) j+1 not being a divisor.

Repeated Roots Fundamental Solutions If r is a characteristic root of multiplicity j, then a n = r n, a n = nr n, a n = n 2 r n,... a n = n j 1 r n are linearly independent and can be taken as fundamental solutions.

Repeated Roots Example Solve the recurrence relation given by a n = 6a n 1 9a n 2 with a 0 = 1 and a 1 = 4.