ioan despi - university of new...

52
Recurrence Relations Ioan Despi [email protected] University of New England September 10, 2013

Upload: others

Post on 21-Feb-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Recurrence Relations

Ioan Despi

[email protected]

University of New England

September 10, 2013

Page 2: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Outline

1 Recurrence RelationsExamples

2 How Recurrence Relations Arise

3 Basic Concepts Related to Recurrence RelationsExamplesExamples

Ioan Despi – AMTH140 2 of 18

Page 3: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Motivation

Recurrence relations are important in quite a large number of areas ofmathematics.

In particular, they crop up in the analysis of algorithms, see section 5.3and tutorial 1.

The famous Mandelbrot set arises out of a recurrence relation.

Ioan Despi – AMTH140 3 of 18

Page 4: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Motivation

Recurrence relations are important in quite a large number of areas ofmathematics.

In particular, they crop up in the analysis of algorithms, see section 5.3and tutorial 1.

The famous Mandelbrot set arises out of a recurrence relation.

Ioan Despi – AMTH140 3 of 18

Page 5: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Motivation

Recurrence relations are important in quite a large number of areas ofmathematics.

In particular, they crop up in the analysis of algorithms, see section 5.3and tutorial 1.

The famous Mandelbrot set arises out of a recurrence relation.

Ioan Despi – AMTH140 3 of 18

Page 6: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Basic Definitions

A sequence is an ordered list of objects or events.

The number of elements (terms, members) is called the length of thesequence.

A sequence can be finite (e.g., alphabet letters) or infinite (e.g., positiveintegers).

An element can appear multiple times in different positions.

Elements of a sequence are usually identified by their position (thesecond, the third, the 6th, etc.)

The easiest way to create an ordered list of objects or events is by using afunction defined on the set of natural numbers with values in the set ofgiven objects or events.

Then a sequence is the image of this function

𝑓 : N → 𝐴 such that 𝑖 ↦→ 𝑎𝑖, 𝑎𝑖 ∈ 𝐴

and we write {𝑎𝑖}𝑖∈N to denote the sequence.

Ioan Despi – AMTH140 4 of 18

Page 7: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Basic Definitions

A sequence is an ordered list of objects or events.

The number of elements (terms, members) is called the length of thesequence.

A sequence can be finite (e.g., alphabet letters) or infinite (e.g., positiveintegers).

An element can appear multiple times in different positions.

Elements of a sequence are usually identified by their position (thesecond, the third, the 6th, etc.)

The easiest way to create an ordered list of objects or events is by using afunction defined on the set of natural numbers with values in the set ofgiven objects or events.

Then a sequence is the image of this function

𝑓 : N → 𝐴 such that 𝑖 ↦→ 𝑎𝑖, 𝑎𝑖 ∈ 𝐴

and we write {𝑎𝑖}𝑖∈N to denote the sequence.

Ioan Despi – AMTH140 4 of 18

Page 8: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Basic Definitions

A sequence is an ordered list of objects or events.

The number of elements (terms, members) is called the length of thesequence.

A sequence can be finite (e.g., alphabet letters) or infinite (e.g., positiveintegers).

An element can appear multiple times in different positions.

Elements of a sequence are usually identified by their position (thesecond, the third, the 6th, etc.)

The easiest way to create an ordered list of objects or events is by using afunction defined on the set of natural numbers with values in the set ofgiven objects or events.

Then a sequence is the image of this function

𝑓 : N → 𝐴 such that 𝑖 ↦→ 𝑎𝑖, 𝑎𝑖 ∈ 𝐴

and we write {𝑎𝑖}𝑖∈N to denote the sequence.

Ioan Despi – AMTH140 4 of 18

Page 9: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Basic Definitions

A sequence is an ordered list of objects or events.

The number of elements (terms, members) is called the length of thesequence.

A sequence can be finite (e.g., alphabet letters) or infinite (e.g., positiveintegers).

An element can appear multiple times in different positions.

Elements of a sequence are usually identified by their position (thesecond, the third, the 6th, etc.)

The easiest way to create an ordered list of objects or events is by using afunction defined on the set of natural numbers with values in the set ofgiven objects or events.

Then a sequence is the image of this function

𝑓 : N → 𝐴 such that 𝑖 ↦→ 𝑎𝑖, 𝑎𝑖 ∈ 𝐴

and we write {𝑎𝑖}𝑖∈N to denote the sequence.

Ioan Despi – AMTH140 4 of 18

Page 10: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Basic Definitions

A sequence is an ordered list of objects or events.

The number of elements (terms, members) is called the length of thesequence.

A sequence can be finite (e.g., alphabet letters) or infinite (e.g., positiveintegers).

An element can appear multiple times in different positions.

Elements of a sequence are usually identified by their position (thesecond, the third, the 6th, etc.)

The easiest way to create an ordered list of objects or events is by using afunction defined on the set of natural numbers with values in the set ofgiven objects or events.

Then a sequence is the image of this function

𝑓 : N → 𝐴 such that 𝑖 ↦→ 𝑎𝑖, 𝑎𝑖 ∈ 𝐴

and we write {𝑎𝑖}𝑖∈N to denote the sequence.

Ioan Despi – AMTH140 4 of 18

Page 11: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Basic Definitions

A sequence is an ordered list of objects or events.

The number of elements (terms, members) is called the length of thesequence.

A sequence can be finite (e.g., alphabet letters) or infinite (e.g., positiveintegers).

An element can appear multiple times in different positions.

Elements of a sequence are usually identified by their position (thesecond, the third, the 6th, etc.)

The easiest way to create an ordered list of objects or events is by using afunction defined on the set of natural numbers with values in the set ofgiven objects or events.

Then a sequence is the image of this function

𝑓 : N → 𝐴 such that 𝑖 ↦→ 𝑎𝑖, 𝑎𝑖 ∈ 𝐴

and we write {𝑎𝑖}𝑖∈N to denote the sequence.

Ioan Despi – AMTH140 4 of 18

Page 12: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Basic Definitions

A sequence is an ordered list of objects or events.

The number of elements (terms, members) is called the length of thesequence.

A sequence can be finite (e.g., alphabet letters) or infinite (e.g., positiveintegers).

An element can appear multiple times in different positions.

Elements of a sequence are usually identified by their position (thesecond, the third, the 6th, etc.)

The easiest way to create an ordered list of objects or events is by using afunction defined on the set of natural numbers with values in the set ofgiven objects or events.

Then a sequence is the image of this function

𝑓 : N → 𝐴 such that 𝑖 ↦→ 𝑎𝑖, 𝑎𝑖 ∈ 𝐴

and we write {𝑎𝑖}𝑖∈N to denote the sequence.

Ioan Despi – AMTH140 4 of 18

Page 13: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Basic Definitions

A recurrence relation for a given sequence {𝑎𝑖}𝑖≥𝑚 is an equation thatexpresses each 𝑎𝑛 in terms of one or more of the previous terms of thesequence (namely 𝑎0, 𝑎1, . . . , 𝑎𝑛−1) for all integers 𝑛 with 𝑛 ≥ 𝑚.

The first few elements (𝑎0, 𝑎1, . . . , 𝑎𝑚−1) in the sequence that can not berelated to each other by the recurrence relation are often determined bythe initial conditions.

A recurrence relation is sometimes also called a difference equation.

Formally, a recurrence relation is an equation of the type

𝐹 (𝑛, 𝑎𝑛, 𝑎𝑛+1, . . . , 𝑎𝑛+𝑚) = 0

where 𝑚 ∈ N is fixed.

The order of a recurrence relation is the difference between the greatestand the lowest subscripts of the terms of the sequence in the equation.Above, the order is (𝑛 + 𝑚) − (𝑛) = 𝑚.

A sequence is called a solution of a recurrence relation if its terms satisfythe recurrence relation.

A recurrence relation can have multiple solutions but a recurrencerelation with initial conditions has an unique solution.

Ioan Despi – AMTH140 5 of 18

Page 14: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Basic Definitions

A recurrence relation for a given sequence {𝑎𝑖}𝑖≥𝑚 is an equation thatexpresses each 𝑎𝑛 in terms of one or more of the previous terms of thesequence (namely 𝑎0, 𝑎1, . . . , 𝑎𝑛−1) for all integers 𝑛 with 𝑛 ≥ 𝑚.

The first few elements (𝑎0, 𝑎1, . . . , 𝑎𝑚−1) in the sequence that can not berelated to each other by the recurrence relation are often determined bythe initial conditions.

A recurrence relation is sometimes also called a difference equation.

Formally, a recurrence relation is an equation of the type

𝐹 (𝑛, 𝑎𝑛, 𝑎𝑛+1, . . . , 𝑎𝑛+𝑚) = 0

where 𝑚 ∈ N is fixed.

The order of a recurrence relation is the difference between the greatestand the lowest subscripts of the terms of the sequence in the equation.Above, the order is (𝑛 + 𝑚) − (𝑛) = 𝑚.

A sequence is called a solution of a recurrence relation if its terms satisfythe recurrence relation.

A recurrence relation can have multiple solutions but a recurrencerelation with initial conditions has an unique solution.

Ioan Despi – AMTH140 5 of 18

Page 15: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Basic Definitions

A recurrence relation for a given sequence {𝑎𝑖}𝑖≥𝑚 is an equation thatexpresses each 𝑎𝑛 in terms of one or more of the previous terms of thesequence (namely 𝑎0, 𝑎1, . . . , 𝑎𝑛−1) for all integers 𝑛 with 𝑛 ≥ 𝑚.

The first few elements (𝑎0, 𝑎1, . . . , 𝑎𝑚−1) in the sequence that can not berelated to each other by the recurrence relation are often determined bythe initial conditions.

A recurrence relation is sometimes also called a difference equation.

Formally, a recurrence relation is an equation of the type

𝐹 (𝑛, 𝑎𝑛, 𝑎𝑛+1, . . . , 𝑎𝑛+𝑚) = 0

where 𝑚 ∈ N is fixed.

The order of a recurrence relation is the difference between the greatestand the lowest subscripts of the terms of the sequence in the equation.Above, the order is (𝑛 + 𝑚) − (𝑛) = 𝑚.

A sequence is called a solution of a recurrence relation if its terms satisfythe recurrence relation.

A recurrence relation can have multiple solutions but a recurrencerelation with initial conditions has an unique solution.

Ioan Despi – AMTH140 5 of 18

Page 16: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Basic Definitions

A recurrence relation for a given sequence {𝑎𝑖}𝑖≥𝑚 is an equation thatexpresses each 𝑎𝑛 in terms of one or more of the previous terms of thesequence (namely 𝑎0, 𝑎1, . . . , 𝑎𝑛−1) for all integers 𝑛 with 𝑛 ≥ 𝑚.

The first few elements (𝑎0, 𝑎1, . . . , 𝑎𝑚−1) in the sequence that can not berelated to each other by the recurrence relation are often determined bythe initial conditions.

A recurrence relation is sometimes also called a difference equation.

Formally, a recurrence relation is an equation of the type

𝐹 (𝑛, 𝑎𝑛, 𝑎𝑛+1, . . . , 𝑎𝑛+𝑚) = 0

where 𝑚 ∈ N is fixed.

The order of a recurrence relation is the difference between the greatestand the lowest subscripts of the terms of the sequence in the equation.Above, the order is (𝑛 + 𝑚) − (𝑛) = 𝑚.

A sequence is called a solution of a recurrence relation if its terms satisfythe recurrence relation.

A recurrence relation can have multiple solutions but a recurrencerelation with initial conditions has an unique solution.

Ioan Despi – AMTH140 5 of 18

Page 17: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Basic Definitions

A recurrence relation for a given sequence {𝑎𝑖}𝑖≥𝑚 is an equation thatexpresses each 𝑎𝑛 in terms of one or more of the previous terms of thesequence (namely 𝑎0, 𝑎1, . . . , 𝑎𝑛−1) for all integers 𝑛 with 𝑛 ≥ 𝑚.

The first few elements (𝑎0, 𝑎1, . . . , 𝑎𝑚−1) in the sequence that can not berelated to each other by the recurrence relation are often determined bythe initial conditions.

A recurrence relation is sometimes also called a difference equation.

Formally, a recurrence relation is an equation of the type

𝐹 (𝑛, 𝑎𝑛, 𝑎𝑛+1, . . . , 𝑎𝑛+𝑚) = 0

where 𝑚 ∈ N is fixed.

The order of a recurrence relation is the difference between the greatestand the lowest subscripts of the terms of the sequence in the equation.Above, the order is (𝑛 + 𝑚) − (𝑛) = 𝑚.

A sequence is called a solution of a recurrence relation if its terms satisfythe recurrence relation.

A recurrence relation can have multiple solutions but a recurrencerelation with initial conditions has an unique solution.

Ioan Despi – AMTH140 5 of 18

Page 18: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Basic Definitions

A recurrence relation for a given sequence {𝑎𝑖}𝑖≥𝑚 is an equation thatexpresses each 𝑎𝑛 in terms of one or more of the previous terms of thesequence (namely 𝑎0, 𝑎1, . . . , 𝑎𝑛−1) for all integers 𝑛 with 𝑛 ≥ 𝑚.

The first few elements (𝑎0, 𝑎1, . . . , 𝑎𝑚−1) in the sequence that can not berelated to each other by the recurrence relation are often determined bythe initial conditions.

A recurrence relation is sometimes also called a difference equation.

Formally, a recurrence relation is an equation of the type

𝐹 (𝑛, 𝑎𝑛, 𝑎𝑛+1, . . . , 𝑎𝑛+𝑚) = 0

where 𝑚 ∈ N is fixed.

The order of a recurrence relation is the difference between the greatestand the lowest subscripts of the terms of the sequence in the equation.Above, the order is (𝑛 + 𝑚) − (𝑛) = 𝑚.

A sequence is called a solution of a recurrence relation if its terms satisfythe recurrence relation.

A recurrence relation can have multiple solutions but a recurrencerelation with initial conditions has an unique solution.

Ioan Despi – AMTH140 5 of 18

Page 19: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Basic Definitions

A recurrence relation for a given sequence {𝑎𝑖}𝑖≥𝑚 is an equation thatexpresses each 𝑎𝑛 in terms of one or more of the previous terms of thesequence (namely 𝑎0, 𝑎1, . . . , 𝑎𝑛−1) for all integers 𝑛 with 𝑛 ≥ 𝑚.

The first few elements (𝑎0, 𝑎1, . . . , 𝑎𝑚−1) in the sequence that can not berelated to each other by the recurrence relation are often determined bythe initial conditions.

A recurrence relation is sometimes also called a difference equation.

Formally, a recurrence relation is an equation of the type

𝐹 (𝑛, 𝑎𝑛, 𝑎𝑛+1, . . . , 𝑎𝑛+𝑚) = 0

where 𝑚 ∈ N is fixed.

The order of a recurrence relation is the difference between the greatestand the lowest subscripts of the terms of the sequence in the equation.Above, the order is (𝑛 + 𝑚) − (𝑛) = 𝑚.

A sequence is called a solution of a recurrence relation if its terms satisfythe recurrence relation.

A recurrence relation can have multiple solutions but a recurrencerelation with initial conditions has an unique solution.

Ioan Despi – AMTH140 5 of 18

Page 20: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Examples

Example

1. For the sequence {𝑎𝑖}𝑖∈N, the following formula

𝑎𝑛 = 7𝑎𝑛−1 − 5𝑎𝑛−2

is a recurrence relation valid for 𝑛 ≥ 2.

The elements in the sequence that are not related by the above formulaare 𝑎0 and 𝑎1.

Hence 𝑎0 and 𝑎1 can be determined by the initial conditions.

Once the values of 𝑎0 and 𝑎1 are specified, the whole sequence {𝑎𝑖}𝑖≥0 iscompletely specified by the recurrence relation.

Ioan Despi – AMTH140 6 of 18

Page 21: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Examples

Example

1. For the sequence {𝑎𝑖}𝑖∈N, the following formula

𝑎𝑛 = 7𝑎𝑛−1 − 5𝑎𝑛−2

is a recurrence relation valid for 𝑛 ≥ 2.

The elements in the sequence that are not related by the above formulaare 𝑎0 and 𝑎1.

Hence 𝑎0 and 𝑎1 can be determined by the initial conditions.

Once the values of 𝑎0 and 𝑎1 are specified, the whole sequence {𝑎𝑖}𝑖≥0 iscompletely specified by the recurrence relation.

Ioan Despi – AMTH140 6 of 18

Page 22: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Examples

Example

1. For the sequence {𝑎𝑖}𝑖∈N, the following formula

𝑎𝑛 = 7𝑎𝑛−1 − 5𝑎𝑛−2

is a recurrence relation valid for 𝑛 ≥ 2.

The elements in the sequence that are not related by the above formulaare 𝑎0 and 𝑎1.

Hence 𝑎0 and 𝑎1 can be determined by the initial conditions.

Once the values of 𝑎0 and 𝑎1 are specified, the whole sequence {𝑎𝑖}𝑖≥0 iscompletely specified by the recurrence relation.

Ioan Despi – AMTH140 6 of 18

Page 23: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Examples

Example

1. For the sequence {𝑎𝑖}𝑖∈N, the following formula

𝑎𝑛 = 7𝑎𝑛−1 − 5𝑎𝑛−2

is a recurrence relation valid for 𝑛 ≥ 2.

The elements in the sequence that are not related by the above formulaare 𝑎0 and 𝑎1.

Hence 𝑎0 and 𝑎1 can be determined by the initial conditions.

Once the values of 𝑎0 and 𝑎1 are specified, the whole sequence {𝑎𝑖}𝑖≥0 iscompletely specified by the recurrence relation.

Ioan Despi – AMTH140 6 of 18

Page 24: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Examples

Example

2. Let a sequence {𝑎𝑖}𝑖∈N be determined by the recurrence relation

𝑎𝑛 = 3𝑎𝑛−1 + 2𝑎𝑛−2 (*)

and the initial conditions𝑎0 = 1, 𝑎1 = 2 . (**)

Calculate 𝑎4 recursively first. Then calculate 𝑎4 again iteratively.

Solution. Recursively, we use (*) repeatedly (“topdown”) to decrease theindices involved until they all reach the initial ones. Hence

𝑎4 = 3𝑎3 + 2𝑎2 used (*) for 𝑛 = 4

= 3(3𝑎2 + 2𝑎1) + 2𝑎2 used (*) for 𝑛 = 3

= 11𝑎2 + 6𝑎1= 11(3𝑎1 + 2𝑎0) + 6𝑎1= 39𝑎1 + 22𝑎0= 39 × 2 + 22 × 1 = 100 . used (**)

Ioan Despi – AMTH140 7 of 18

Page 25: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Examples

Example

2. Let a sequence {𝑎𝑖}𝑖∈N be determined by the recurrence relation

𝑎𝑛 = 3𝑎𝑛−1 + 2𝑎𝑛−2 (*)

and the initial conditions𝑎0 = 1, 𝑎1 = 2 . (**)

Calculate 𝑎4 recursively first. Then calculate 𝑎4 again iteratively.

Solution. Recursively, we use (*) repeatedly (“topdown”) to decrease theindices involved until they all reach the initial ones. Hence

𝑎4 = 3𝑎3 + 2𝑎2 used (*) for 𝑛 = 4

= 3(3𝑎2 + 2𝑎1) + 2𝑎2 used (*) for 𝑛 = 3

= 11𝑎2 + 6𝑎1= 11(3𝑎1 + 2𝑎0) + 6𝑎1= 39𝑎1 + 22𝑎0= 39 × 2 + 22 × 1 = 100 . used (**)

Ioan Despi – AMTH140 7 of 18

Page 26: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Examples

Example

2. Let a sequence {𝑎𝑖}𝑖∈N be determined by the recurrence relation

𝑎𝑛 = 3𝑎𝑛−1 + 2𝑎𝑛−2 (*)

and the initial conditions𝑎0 = 1, 𝑎1 = 2 . (**)

Calculate 𝑎4 recursively first. Then calculate 𝑎4 again iteratively.

Solution.Iteratively, we use (*) repeatedly (“building-up”) to derive more and moreknown elements until the desired index is reached. Hence

𝑎0 = 1 ,𝑎1 = 2 ,𝑎2 = 3𝑎1 + 2𝑎0 = 8 ,𝑎3 = 3𝑎2 + 2𝑎1 = 28 , used (*) for 𝑛 = 3

𝑎4 = 3𝑎3 + 2𝑎2 = 100 . used (*) for 𝑛 = 4

Ioan Despi – AMTH140 8 of 18

Page 27: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Examples

Example

2. Let a sequence {𝑎𝑖}𝑖∈N be determined by the recurrence relation

𝑎𝑛 = 3𝑎𝑛−1 + 2𝑎𝑛−2 (*)

and the initial conditions𝑎0 = 1, 𝑎1 = 2 . (**)

Calculate 𝑎4 recursively first. Then calculate 𝑎4 again iteratively.

Solution.Iteratively, we use (*) repeatedly (“building-up”) to derive more and moreknown elements until the desired index is reached. Hence

𝑎0 = 1 ,𝑎1 = 2 ,𝑎2 = 3𝑎1 + 2𝑎0 = 8 ,𝑎3 = 3𝑎2 + 2𝑎1 = 28 , used (*) for 𝑛 = 3

𝑎4 = 3𝑎3 + 2𝑎2 = 100 . used (*) for 𝑛 = 4Ioan Despi – AMTH140 8 of 18

Page 28: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Examples

Example

3. Let 𝑓(𝑛) for 𝑛 ∈ N be given by the recurrence relation

𝑓(𝑛) = 𝑛𝑓(𝑛− 1), 𝑛 ∈ N, 𝑛 ≥ 1

𝑓(0) = 1 (initial condition) .

Find the solution 𝑓(𝑛).

Solution. We first derive

𝑓(𝑛) = 𝑛𝑓(𝑛− 1) if 𝑛 ≥ 1= 𝑛(𝑛− 1)𝑓(𝑛− 2) if 𝑛 ≥ 2= 𝑛(𝑛− 1)(𝑛− 2)𝑓(𝑛− 3) if 𝑛 ≥ 3= . . .= 𝑛(𝑛− 1)(𝑛− 2) · · · 2 · 1𝑓(0)= 𝑛!𝑓(0) = 𝑛! · 1 = 𝑛!

Then we can show inductively 𝑓(𝑛) = 𝑛! for 𝑛 ≥ 0.

Ioan Despi – AMTH140 9 of 18

Page 29: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Examples

Example

3. Let 𝑓(𝑛) for 𝑛 ∈ N be given by the recurrence relation

𝑓(𝑛) = 𝑛𝑓(𝑛− 1), 𝑛 ∈ N, 𝑛 ≥ 1

𝑓(0) = 1 (initial condition) .

Find the solution 𝑓(𝑛).

Solution. We first derive

𝑓(𝑛) = 𝑛𝑓(𝑛− 1) if 𝑛 ≥ 1= 𝑛(𝑛− 1)𝑓(𝑛− 2) if 𝑛 ≥ 2= 𝑛(𝑛− 1)(𝑛− 2)𝑓(𝑛− 3) if 𝑛 ≥ 3= . . .= 𝑛(𝑛− 1)(𝑛− 2) · · · 2 · 1𝑓(0)= 𝑛!𝑓(0) = 𝑛! · 1 = 𝑛!

Then we can show inductively 𝑓(𝑛) = 𝑛! for 𝑛 ≥ 0.

Ioan Despi – AMTH140 9 of 18

Page 30: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

How Recurrence Relations Arise

Example

Consider the equation 𝑎𝑛 = 𝐴 · 𝑛! where 𝐴 is a constant.

Solution. Then 𝑎𝑛+1 = 𝐴 · (𝑛 + 1)! and combining the two equations andeliminating 𝐴 = 𝑎𝑛

𝑛! gives 𝑎𝑛+1 = 𝑎𝑛

𝑛! · (𝑛 + 1)! so we obtain the first orderrecurrence relation 𝑎𝑛+1 = (𝑛 + 1) · 𝑎𝑛.

Example

Consider the equation 𝑎𝑛 = (𝐴 + 𝐵𝑛) · 3𝑛 where 𝐴,𝐵 are constants. Prove

yourself that this represents the second order recurrence relation:

𝑎𝑛+2 − 6𝑎𝑛+1 + 9𝑎𝑛 = 0

Ioan Despi – AMTH140 10 of 18

Page 31: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

How Recurrence Relations Arise

Example

Consider the equation 𝑎𝑛 = 𝐴 · 𝑛! where 𝐴 is a constant.

Solution. Then 𝑎𝑛+1 = 𝐴 · (𝑛 + 1)! and combining the two equations andeliminating 𝐴 = 𝑎𝑛

𝑛! gives 𝑎𝑛+1 = 𝑎𝑛

𝑛! · (𝑛 + 1)! so we obtain the first orderrecurrence relation 𝑎𝑛+1 = (𝑛 + 1) · 𝑎𝑛.

Example

Consider the equation 𝑎𝑛 = (𝐴 + 𝐵𝑛) · 3𝑛 where 𝐴,𝐵 are constants. Prove

yourself that this represents the second order recurrence relation:

𝑎𝑛+2 − 6𝑎𝑛+1 + 9𝑎𝑛 = 0

Ioan Despi – AMTH140 10 of 18

Page 32: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

How Recurrence Relations Arise

Example

Someone deposits $10000 in a saving account in a bank yielding 5% per yearwith interest compounded annually. How much money will be in the accountin 30 years?

Solution. Let 𝑃𝑛 denote the amount in the account after 𝑛 years. We canderive

𝑃𝑛 = 𝑃𝑛−1 + 0.05𝑃𝑛−1 = 1.05𝑃𝑛−1

𝑃0 = 10000

Then

𝑃1 = 1.05𝑃0

𝑃2 = 1.05𝑃1 = (1.05)2𝑃0

· · ·𝑃𝑛 = 1.05𝑃𝑛−1 = (1.05)𝑛𝑃0

therefore 𝑃30 = (1.05)30 · 10000 = 43219.42

Ioan Despi – AMTH140 11 of 18

Page 33: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

How Recurrence Relations Arise

Example

Someone deposits $10000 in a saving account in a bank yielding 5% per yearwith interest compounded annually. How much money will be in the accountin 30 years?

Solution. Let 𝑃𝑛 denote the amount in the account after 𝑛 years. We canderive

𝑃𝑛 = 𝑃𝑛−1 + 0.05𝑃𝑛−1 = 1.05𝑃𝑛−1

𝑃0 = 10000

Then

𝑃1 = 1.05𝑃0

𝑃2 = 1.05𝑃1 = (1.05)2𝑃0

· · ·𝑃𝑛 = 1.05𝑃𝑛−1 = (1.05)𝑛𝑃0

therefore 𝑃30 = (1.05)30 · 10000 = 43219.42Ioan Despi – AMTH140 11 of 18

Page 34: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Basic Concepts

A linear equation is an algebraic equation in which each term is either aconstant or the product of a constant and the first power of a singlevariable.

A recurrence relation of order 𝑚 is said to be linear if it is linear in𝑎𝑛, 𝑎𝑛+1, . . . , 𝑎𝑛+𝑚.

I Otherwise, the recurrence equation is said to be non-linearI (usually, very hard to solve)

The general linear recurrence relation of order 𝑚 has the form

𝑠𝑚(𝑛)𝑎𝑛+𝑚 + 𝑠𝑚−1(𝑛)𝑎𝑛+𝑚−1 + · · ·+ 𝑠1(𝑛)𝑎𝑛+1 + 𝑠0(𝑛)𝑎𝑛 = 𝑔(𝑛), 𝑛 ≥ 0

where 𝑠0(𝑛), 𝑠1(𝑛), . . . , 𝑠𝑚(𝑛), 𝑔(𝑛) are given functions.

If these ”s“ functions are constants (they don’t depend on the index 𝑛explicitly), say 𝑠𝑖(𝑛) = 𝑐𝑖 for all 𝑛 ∈ N, 𝑖 = 0, 1, 2, . . . ,𝑚, then therecurrence equation is said to be with constant coefficients.

Ioan Despi – AMTH140 12 of 18

Page 35: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Basic Concepts

A linear equation is an algebraic equation in which each term is either aconstant or the product of a constant and the first power of a singlevariable.

A recurrence relation of order 𝑚 is said to be linear if it is linear in𝑎𝑛, 𝑎𝑛+1, . . . , 𝑎𝑛+𝑚.

I Otherwise, the recurrence equation is said to be non-linearI (usually, very hard to solve)

The general linear recurrence relation of order 𝑚 has the form

𝑠𝑚(𝑛)𝑎𝑛+𝑚 + 𝑠𝑚−1(𝑛)𝑎𝑛+𝑚−1 + · · ·+ 𝑠1(𝑛)𝑎𝑛+1 + 𝑠0(𝑛)𝑎𝑛 = 𝑔(𝑛), 𝑛 ≥ 0

where 𝑠0(𝑛), 𝑠1(𝑛), . . . , 𝑠𝑚(𝑛), 𝑔(𝑛) are given functions.

If these ”s“ functions are constants (they don’t depend on the index 𝑛explicitly), say 𝑠𝑖(𝑛) = 𝑐𝑖 for all 𝑛 ∈ N, 𝑖 = 0, 1, 2, . . . ,𝑚, then therecurrence equation is said to be with constant coefficients.

Ioan Despi – AMTH140 12 of 18

Page 36: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Basic Concepts

A linear equation is an algebraic equation in which each term is either aconstant or the product of a constant and the first power of a singlevariable.

A recurrence relation of order 𝑚 is said to be linear if it is linear in𝑎𝑛, 𝑎𝑛+1, . . . , 𝑎𝑛+𝑚.

I Otherwise, the recurrence equation is said to be non-linear

I (usually, very hard to solve)

The general linear recurrence relation of order 𝑚 has the form

𝑠𝑚(𝑛)𝑎𝑛+𝑚 + 𝑠𝑚−1(𝑛)𝑎𝑛+𝑚−1 + · · ·+ 𝑠1(𝑛)𝑎𝑛+1 + 𝑠0(𝑛)𝑎𝑛 = 𝑔(𝑛), 𝑛 ≥ 0

where 𝑠0(𝑛), 𝑠1(𝑛), . . . , 𝑠𝑚(𝑛), 𝑔(𝑛) are given functions.

If these ”s“ functions are constants (they don’t depend on the index 𝑛explicitly), say 𝑠𝑖(𝑛) = 𝑐𝑖 for all 𝑛 ∈ N, 𝑖 = 0, 1, 2, . . . ,𝑚, then therecurrence equation is said to be with constant coefficients.

Ioan Despi – AMTH140 12 of 18

Page 37: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Basic Concepts

A linear equation is an algebraic equation in which each term is either aconstant or the product of a constant and the first power of a singlevariable.

A recurrence relation of order 𝑚 is said to be linear if it is linear in𝑎𝑛, 𝑎𝑛+1, . . . , 𝑎𝑛+𝑚.

I Otherwise, the recurrence equation is said to be non-linearI (usually, very hard to solve)

The general linear recurrence relation of order 𝑚 has the form

𝑠𝑚(𝑛)𝑎𝑛+𝑚 + 𝑠𝑚−1(𝑛)𝑎𝑛+𝑚−1 + · · ·+ 𝑠1(𝑛)𝑎𝑛+1 + 𝑠0(𝑛)𝑎𝑛 = 𝑔(𝑛), 𝑛 ≥ 0

where 𝑠0(𝑛), 𝑠1(𝑛), . . . , 𝑠𝑚(𝑛), 𝑔(𝑛) are given functions.

If these ”s“ functions are constants (they don’t depend on the index 𝑛explicitly), say 𝑠𝑖(𝑛) = 𝑐𝑖 for all 𝑛 ∈ N, 𝑖 = 0, 1, 2, . . . ,𝑚, then therecurrence equation is said to be with constant coefficients.

Ioan Despi – AMTH140 12 of 18

Page 38: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Basic Concepts

A linear equation is an algebraic equation in which each term is either aconstant or the product of a constant and the first power of a singlevariable.

A recurrence relation of order 𝑚 is said to be linear if it is linear in𝑎𝑛, 𝑎𝑛+1, . . . , 𝑎𝑛+𝑚.

I Otherwise, the recurrence equation is said to be non-linearI (usually, very hard to solve)

The general linear recurrence relation of order 𝑚 has the form

𝑠𝑚(𝑛)𝑎𝑛+𝑚 + 𝑠𝑚−1(𝑛)𝑎𝑛+𝑚−1 + · · ·+ 𝑠1(𝑛)𝑎𝑛+1 + 𝑠0(𝑛)𝑎𝑛 = 𝑔(𝑛), 𝑛 ≥ 0

where 𝑠0(𝑛), 𝑠1(𝑛), . . . , 𝑠𝑚(𝑛), 𝑔(𝑛) are given functions.

If these ”s“ functions are constants (they don’t depend on the index 𝑛explicitly), say 𝑠𝑖(𝑛) = 𝑐𝑖 for all 𝑛 ∈ N, 𝑖 = 0, 1, 2, . . . ,𝑚, then therecurrence equation is said to be with constant coefficients.

Ioan Despi – AMTH140 12 of 18

Page 39: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Basic Concepts

A linear equation is an algebraic equation in which each term is either aconstant or the product of a constant and the first power of a singlevariable.

A recurrence relation of order 𝑚 is said to be linear if it is linear in𝑎𝑛, 𝑎𝑛+1, . . . , 𝑎𝑛+𝑚.

I Otherwise, the recurrence equation is said to be non-linearI (usually, very hard to solve)

The general linear recurrence relation of order 𝑚 has the form

𝑠𝑚(𝑛)𝑎𝑛+𝑚 + 𝑠𝑚−1(𝑛)𝑎𝑛+𝑚−1 + · · ·+ 𝑠1(𝑛)𝑎𝑛+1 + 𝑠0(𝑛)𝑎𝑛 = 𝑔(𝑛), 𝑛 ≥ 0

where 𝑠0(𝑛), 𝑠1(𝑛), . . . , 𝑠𝑚(𝑛), 𝑔(𝑛) are given functions.

If these ”s“ functions are constants (they don’t depend on the index 𝑛explicitly), say 𝑠𝑖(𝑛) = 𝑐𝑖 for all 𝑛 ∈ N, 𝑖 = 0, 1, 2, . . . ,𝑚, then therecurrence equation is said to be with constant coefficients.

Ioan Despi – AMTH140 12 of 18

Page 40: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Basic Concepts

An 𝑚–th order, linear, constant coefficient recurrence relation ona sequence {𝑎𝑛}𝑛≥0 is a recurrence relation which can be written in theform

𝑐𝑚𝑎𝑛+𝑚 + 𝑐𝑚−1𝑎𝑛+𝑚−1 + · · · + 𝑐1𝑎𝑛+1 + 𝑐0𝑎𝑛 = 𝑔(𝑛), 𝑛 ≥ 0 (* * *)

𝑚∑︁𝑘=0

𝑐𝑘𝑎𝑛+𝑘 = 𝑔(𝑛)

where 𝑐0, · · · , 𝑐𝑚 are constants, 𝑐0𝑐𝑚 ̸= 0 (why?), and 𝑔(𝑛) is a functionof 𝑛.

If furthermore 𝑔(𝑛) = 0 for all 𝑛, then the relation is said to behomogeneous

𝑐𝑚𝑎𝑛+𝑚 + 𝑐𝑚−1𝑎𝑛+𝑚−1 + · · · + 𝑐1𝑎𝑛+1 + 𝑐0𝑎𝑛 = 0, 𝑛 ≥ 0

Ioan Despi – AMTH140 13 of 18

Page 41: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Basic Concepts

An 𝑚–th order, linear, constant coefficient recurrence relation ona sequence {𝑎𝑛}𝑛≥0 is a recurrence relation which can be written in theform

𝑐𝑚𝑎𝑛+𝑚 + 𝑐𝑚−1𝑎𝑛+𝑚−1 + · · · + 𝑐1𝑎𝑛+1 + 𝑐0𝑎𝑛 = 𝑔(𝑛), 𝑛 ≥ 0 (* * *)

𝑚∑︁𝑘=0

𝑐𝑘𝑎𝑛+𝑘 = 𝑔(𝑛)

where 𝑐0, · · · , 𝑐𝑚 are constants, 𝑐0𝑐𝑚 ̸= 0 (why?), and 𝑔(𝑛) is a functionof 𝑛.

If furthermore 𝑔(𝑛) = 0 for all 𝑛, then the relation is said to behomogeneous

𝑐𝑚𝑎𝑛+𝑚 + 𝑐𝑚−1𝑎𝑛+𝑚−1 + · · · + 𝑐1𝑎𝑛+1 + 𝑐0𝑎𝑛 = 0, 𝑛 ≥ 0

Ioan Despi – AMTH140 13 of 18

Page 42: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Examples

Example

4. 𝑎𝑛 = 5𝑎𝑛−1 + 2𝑎𝑛−2 + 3𝑛, 𝑛 ≥ 2, is a second order linear, constantcoefficient recurrence relation and is non-homogeneous.

This is because we can equivalently rewrite it as

𝑎𝑘+2 − 5𝑎𝑘+1 − 2𝑎𝑘 = 3𝑘+2, 𝑘 ≥ 0 .

In terms of the notation in (* * *) we have in this case 𝑚 = 2 and

𝑐𝑚 = 𝑐2 = 1, 𝑐𝑚−1 = 𝑐1 = −5, 𝑐𝑚−2 = 𝑐0 = −2, 𝑔(𝑛) = 3𝑛+2 .

Ioan Despi – AMTH140 14 of 18

Page 43: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Examples

Example

4. 𝑎𝑛 = 5𝑎𝑛−1 + 2𝑎𝑛−2 + 3𝑛, 𝑛 ≥ 2, is a second order linear, constantcoefficient recurrence relation and is non-homogeneous.

This is because we can equivalently rewrite it as

𝑎𝑘+2 − 5𝑎𝑘+1 − 2𝑎𝑘 = 3𝑘+2, 𝑘 ≥ 0 .

In terms of the notation in (* * *) we have in this case 𝑚 = 2 and

𝑐𝑚 = 𝑐2 = 1, 𝑐𝑚−1 = 𝑐1 = −5, 𝑐𝑚−2 = 𝑐0 = −2, 𝑔(𝑛) = 3𝑛+2 .

Ioan Despi – AMTH140 14 of 18

Page 44: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Examples

Example

5. 𝐵𝑛+2 = sin(𝐵𝑛+1), 𝑛 ≥ −1, is not a linear recurrence relation becausesin(𝐵𝑛+1) is not a linear function of the dependent function 𝐵𝑛+1.

Example

6. 𝑎𝑛+1 = 𝑛𝑎𝑛, 𝑛 ≥ 0, is not a constant coefficient recurrence relation, thoughit is linear and homogeneous.

Example

7. 𝑓(𝑛 + 1) = 3𝑓(𝑛− 5) + 4𝑓(𝑛− 2), 𝑛 ≥ 5, is a homogeneous, 6th order,linear, constant coefficient recurrence relation. Observe that the difference ofthe highest index (𝑛 + 1) and the lowest index (𝑛− 5) is exactly the order 6 ofthe recurrence relation.

Example

8. 𝑎𝑛+1 = 𝑟𝑎𝑛 with constant 𝑟 and 𝑛 ≥ 0 induces a geometric sequence{𝑎𝑛}𝑛≥0 with𝑎𝑛 = 𝑟𝑎𝑛−1 = 𝑟(𝑟𝑎𝑛−2) = 𝑟2𝑎𝑛−2 = · · · = 𝑟𝑛𝑎0, i.e. 𝑎𝑛 = 𝑟𝑛𝑎0 as its solution.

Ioan Despi – AMTH140 15 of 18

Page 45: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Examples

Example

5. 𝐵𝑛+2 = sin(𝐵𝑛+1), 𝑛 ≥ −1, is not a linear recurrence relation becausesin(𝐵𝑛+1) is not a linear function of the dependent function 𝐵𝑛+1.

Example

6. 𝑎𝑛+1 = 𝑛𝑎𝑛, 𝑛 ≥ 0, is not a constant coefficient recurrence relation, thoughit is linear and homogeneous.

Example

7. 𝑓(𝑛 + 1) = 3𝑓(𝑛− 5) + 4𝑓(𝑛− 2), 𝑛 ≥ 5, is a homogeneous, 6th order,linear, constant coefficient recurrence relation. Observe that the difference ofthe highest index (𝑛 + 1) and the lowest index (𝑛− 5) is exactly the order 6 ofthe recurrence relation.

Example

8. 𝑎𝑛+1 = 𝑟𝑎𝑛 with constant 𝑟 and 𝑛 ≥ 0 induces a geometric sequence{𝑎𝑛}𝑛≥0 with𝑎𝑛 = 𝑟𝑎𝑛−1 = 𝑟(𝑟𝑎𝑛−2) = 𝑟2𝑎𝑛−2 = · · · = 𝑟𝑛𝑎0, i.e. 𝑎𝑛 = 𝑟𝑛𝑎0 as its solution.

Ioan Despi – AMTH140 15 of 18

Page 46: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Examples

Example

5. 𝐵𝑛+2 = sin(𝐵𝑛+1), 𝑛 ≥ −1, is not a linear recurrence relation becausesin(𝐵𝑛+1) is not a linear function of the dependent function 𝐵𝑛+1.

Example

6. 𝑎𝑛+1 = 𝑛𝑎𝑛, 𝑛 ≥ 0, is not a constant coefficient recurrence relation, thoughit is linear and homogeneous.

Example

7. 𝑓(𝑛 + 1) = 3𝑓(𝑛− 5) + 4𝑓(𝑛− 2), 𝑛 ≥ 5, is a homogeneous, 6th order,linear, constant coefficient recurrence relation. Observe that the difference ofthe highest index (𝑛 + 1) and the lowest index (𝑛− 5) is exactly the order 6 ofthe recurrence relation.

Example

8. 𝑎𝑛+1 = 𝑟𝑎𝑛 with constant 𝑟 and 𝑛 ≥ 0 induces a geometric sequence{𝑎𝑛}𝑛≥0 with𝑎𝑛 = 𝑟𝑎𝑛−1 = 𝑟(𝑟𝑎𝑛−2) = 𝑟2𝑎𝑛−2 = · · · = 𝑟𝑛𝑎0, i.e. 𝑎𝑛 = 𝑟𝑛𝑎0 as its solution.

Ioan Despi – AMTH140 15 of 18

Page 47: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Examples

Example

5. 𝐵𝑛+2 = sin(𝐵𝑛+1), 𝑛 ≥ −1, is not a linear recurrence relation becausesin(𝐵𝑛+1) is not a linear function of the dependent function 𝐵𝑛+1.

Example

6. 𝑎𝑛+1 = 𝑛𝑎𝑛, 𝑛 ≥ 0, is not a constant coefficient recurrence relation, thoughit is linear and homogeneous.

Example

7. 𝑓(𝑛 + 1) = 3𝑓(𝑛− 5) + 4𝑓(𝑛− 2), 𝑛 ≥ 5, is a homogeneous, 6th order,linear, constant coefficient recurrence relation. Observe that the difference ofthe highest index (𝑛 + 1) and the lowest index (𝑛− 5) is exactly the order 6 ofthe recurrence relation.

Example

8. 𝑎𝑛+1 = 𝑟𝑎𝑛 with constant 𝑟 and 𝑛 ≥ 0 induces a geometric sequence{𝑎𝑛}𝑛≥0 with𝑎𝑛 = 𝑟𝑎𝑛−1 = 𝑟(𝑟𝑎𝑛−2) = 𝑟2𝑎𝑛−2 = · · · = 𝑟𝑛𝑎0, i.e. 𝑎𝑛 = 𝑟𝑛𝑎0 as its solution.

Ioan Despi – AMTH140 15 of 18

Page 48: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Basic Concepts

The characteristic equation of an order 𝑚, linear, constant coefficientrecurrence relation

𝑐𝑚𝑎𝑛+𝑚 + 𝑐𝑚−1𝑎𝑛+𝑚−1 + · · · + 𝑐1𝑎𝑛+1 + 𝑐0𝑎𝑛 = 𝑔(𝑛), 𝑛 ≥ 0

with 𝑐𝑚𝑐0 ̸= 0 is the following polynomial equation

𝑐𝑚𝜆𝑚 + 𝑐𝑚−1𝜆𝑚−1 + · · · + 𝑐1𝜆 + 𝑐0 = 0 ,

where 𝜆 is just an unknown variable.

Notice that homogeneity does not play any role when buildingcharacteristic equation.

Ioan Despi – AMTH140 16 of 18

Page 49: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Basic Concepts

The characteristic equation of an order 𝑚, linear, constant coefficientrecurrence relation

𝑐𝑚𝑎𝑛+𝑚 + 𝑐𝑚−1𝑎𝑛+𝑚−1 + · · · + 𝑐1𝑎𝑛+1 + 𝑐0𝑎𝑛 = 𝑔(𝑛), 𝑛 ≥ 0

with 𝑐𝑚𝑐0 ̸= 0 is the following polynomial equation

𝑐𝑚𝜆𝑚 + 𝑐𝑚−1𝜆𝑚−1 + · · · + 𝑐1𝜆 + 𝑐0 = 0 ,

where 𝜆 is just an unknown variable.

Notice that homogeneity does not play any role when buildingcharacteristic equation.

Ioan Despi – AMTH140 16 of 18

Page 50: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Examples

Example

9. Recurrence relation

𝑎𝑛+2 + 3𝑎𝑛+1 + 2𝑎𝑛 = 0, 𝑛 ≥ 0

has the characteristic equation 𝜆2 + 3𝜆 + 2 = 0

Example

10. Recurrence relation

𝑓(𝑛 + 1) = 3𝑓(𝑛− 2) + 𝑛2 + 5, 𝑛 ≥ 2

has the characteristic equation 𝜆3 − 3 = 0 because the recurrence relationcan be written via 𝑛 = 𝑘 + 2 as

𝑓(𝑘 + 3) − 3𝑓(𝑘) = (𝑘 + 2)2 + 5

In fact, we have in this case 𝑐𝑚 ≡ 𝑐3 = 1, 𝑐2 = 0, 𝑐1 = 0 and 𝑐0 = −3 in (* * *),and thus the characteristic equation 𝑐3𝜆

3 + 𝑐2𝜆2 + 𝑐1𝜆 + 𝑐0 = 0 becomes

simply 𝜆3 − 3 = 0.

Ioan Despi – AMTH140 17 of 18

Page 51: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Examples

Example

9. Recurrence relation

𝑎𝑛+2 + 3𝑎𝑛+1 + 2𝑎𝑛 = 0, 𝑛 ≥ 0

has the characteristic equation 𝜆2 + 3𝜆 + 2 = 0

Example

10. Recurrence relation

𝑓(𝑛 + 1) = 3𝑓(𝑛− 2) + 𝑛2 + 5, 𝑛 ≥ 2

has the characteristic equation 𝜆3 − 3 = 0 because the recurrence relationcan be written via 𝑛 = 𝑘 + 2 as

𝑓(𝑘 + 3) − 3𝑓(𝑘) = (𝑘 + 2)2 + 5

In fact, we have in this case 𝑐𝑚 ≡ 𝑐3 = 1, 𝑐2 = 0, 𝑐1 = 0 and 𝑐0 = −3 in (* * *),and thus the characteristic equation 𝑐3𝜆

3 + 𝑐2𝜆2 + 𝑐1𝜆 + 𝑐0 = 0 becomes

simply 𝜆3 − 3 = 0.Ioan Despi – AMTH140 17 of 18

Page 52: Ioan Despi - University of New Englandturing.une.edu.au/~amth140/Lectures/Lecture_23/Slides/slides.pdf · Ioan Despi – AMTH140 4 of 18. Basic Definitions A sequence is an ordered

Examples

Note. An alternative way to construct the characteristic equation:Since the highest index in the recurrence relation is 𝑛 + 1 while the lowestindex is 𝑛− 2, their difference (𝑛 + 1) − (𝑛− 2) = 3 must be the order 𝑚, i.e.,𝑚 = 3. Likewise the characteristic equation can also be obtained in followingway.

(i) Remove the non-homogeneous terms 𝑔(𝑛).This way the recurrence relation 𝑓(𝑛+ 1) = 3𝑓(𝑛− 2) + 𝑛2 + 5 becomesthe reduced recurrence relation 𝑓(𝑛 + 1) = 3𝑓(𝑛− 2).

(ii) Find the lowest index 𝐿.Here we thus have 𝐿 = 𝑛− 2.

(iii) For each term in the reduced recurrence relation, if its index is 𝐾 thenreplace the term by 𝜆𝐾−𝐿.For the term 𝑓(𝑛 + 1) we see 𝐾 = 𝑛 + 1 hence𝐾 − 𝐿 = (𝑛 + 1) − (𝑛− 2) = 3. Hence 𝑓(𝑛 + 1) is to be replaced by 𝜆3.Likewise for the term 𝑓(𝑛− 2) on the r.h.s. we see 𝐾 = 𝑛− 2 hence𝐾 − 𝐿 = 0, implying that the term 𝑓(𝑛− 2) is to be replaced by 𝜆0 whichis simply 1. This way the reduced recurrence relation is finally changedinto the characteristic equation 𝜆3 = 3.

Ioan Despi – AMTH140 18 of 18