SlideShare a Scribd company logo
1 of 18
Download to read offline
Counting
Recurrence Relations
 Sequences are ordered lists of elements.
• 1, 2, 3, 5, 8
• 1, 3, 9, 27, 81, …
 Sequences arise throughout mathematics, computer
science, and in many other disciplines, ranging from
botany to music.
 We will introduce the terminology to represent
sequences.
© S. Turaev, CSC 1700 Discrete Mathematics 2
Recurrence Relations
Definition: A sequence is a function from a subset of the
integers (usually either the set 0, 1, 2, 3, 4, … or
1, 2, 3, 4, … ) to a set 𝑆𝑆.
 The notation 𝑎𝑎𝑛𝑛 is used to denote the image of the
integer 𝑛𝑛. We can think of 𝑎𝑎𝑛𝑛 as the equivalent of
𝑓𝑓 𝑛𝑛 where 𝑓𝑓 is a function from 0,1,2, … to 𝑆𝑆. We
call 𝑎𝑎𝑛𝑛 a term of the sequence.
Example: Consider the sequence 𝑎𝑎𝑛𝑛 where 𝑎𝑎𝑛𝑛 = 1/𝑛𝑛.
Then
1,
1
2
,
1
3
,
1
4
, …
© S. Turaev, CSC 1700 Discrete Mathematics 3
Recurrence Relations
Definition: A recurrence relation for the sequence 𝑎𝑎𝑛𝑛 is
an equation that expresses 𝑎𝑎𝑛𝑛 in terms of one or more of
the previous terms of the sequence, namely,
𝑎𝑎0, 𝑎𝑎1, … , 𝑎𝑎𝑛𝑛−1, for all integers 𝑛𝑛 with 𝑛𝑛 ≥ 𝑛𝑛0, where 𝑛𝑛0
is a nonnegative integer.
 A sequence is called a solution of a recurrence relation
if its terms satisfy the recurrence relation.
 The initial conditions for a sequence specify the terms
that precede the first term where the recurrence
relation takes effect.
© S. Turaev, CSC 1700 Discrete Mathematics 4
Recurrence Relations
Example: Let 𝑎𝑎𝑛𝑛 be a sequence that satisfies the
recurrence relation 𝑎𝑎𝑛𝑛 = 𝑎𝑎𝑛𝑛−1 + 3 for 𝑛𝑛 = 1, 2, 3, 4, …
and suppose that 𝑎𝑎0 = 2. What are 𝑎𝑎1, 𝑎𝑎2 and 𝑎𝑎3?
[Here the initial condition is 𝑎𝑎0 = 2.]
Example: Let 𝑎𝑎𝑛𝑛 be a sequence that satisfies the
recurrence relation 𝑎𝑎𝑛𝑛 = 𝑎𝑎𝑛𝑛−1 − 𝑎𝑎𝑛𝑛−2 for 𝑛𝑛 = 2, 3, 4, …
and suppose that 𝑎𝑎0 = 3 and 𝑎𝑎1 = 5. What are 𝑎𝑎2 and
𝑎𝑎3?
[Here the initial conditions are 𝑎𝑎0 = 3 and 𝑎𝑎1 = 5.]
© S. Turaev, CSC 1700 Discrete Mathematics 5
Fibonacci Numbers
Definition: the Fibonacci sequence, 𝑓𝑓0, 𝑓𝑓1, 𝑓𝑓2, … , is
defined by:
 Initial Conditions: 𝑓𝑓0 = 0, 𝑓𝑓1 = 1
 Recurrence Relation: 𝑓𝑓𝑛𝑛 = 𝑓𝑓𝑛𝑛−1 + 𝑓𝑓𝑛𝑛−2
Example: Find 𝑓𝑓4, 𝑓𝑓5, 𝑓𝑓6, 𝑓𝑓7 and 𝑓𝑓8.
© S. Turaev, CSC 1700 Discrete Mathematics 6
Recurrence Relations
 Finding a formula for the 𝑛𝑛th term of the sequence
generated by a recurrence relation is called solving the
recurrence relation.
 Such a formula is called a explicit (closed) formula.
 One technique for finding an explicit formula for the
sequence defined by a recurrence relation is
backtracking.
© S. Turaev, CSC 1700 Discrete Mathematics 7
Recurrence Relations
Example: Let 𝑎𝑎𝑛𝑛 be a sequence that satisfies the
recurrence relation 𝑎𝑎𝑛𝑛 = 𝑎𝑎𝑛𝑛−1 + 3 for 𝑛𝑛 = 2, 3, 4, … and
suppose that 𝑎𝑎1 = 2. Find an explicit formula for the
sequence.
𝑎𝑎𝑛𝑛 = 𝑎𝑎𝑛𝑛−1 + 3
= 𝑎𝑎𝑛𝑛−2 + 3 + 3 = 𝑎𝑎𝑛𝑛−2 + 2 ⋅ 3
= 𝑎𝑎𝑛𝑛−3 + 3 + 2 ⋅ 3 = 𝑎𝑎𝑛𝑛−3 + 3 ⋅ 3
⋯
= 𝑎𝑎2 + 𝑛𝑛 − 2 ⋅ 3 = 𝑎𝑎1 + 3 + 𝑛𝑛 − 2 ⋅ 3
= 𝑎𝑎1 + 𝑛𝑛 − 1 ⋅ 3 = 2 + 𝑛𝑛 − 1 ⋅ 3
= 3 ⋅ 𝑛𝑛 − 1
© S. Turaev, CSC 1700 Discrete Mathematics 8
Recurrence Relations : Backtracking
Example 1: 𝑏𝑏𝑛𝑛 = 5𝑏𝑏𝑛𝑛−1 + 3, 𝑏𝑏1 = 3.
Example 2: 𝑐𝑐𝑛𝑛 = 𝑐𝑐𝑛𝑛−1 + 𝑛𝑛, 𝑏𝑏1 = 4.
Example 3: 𝑑𝑑𝑛𝑛 = 𝑛𝑛 ⋅ 𝑑𝑑𝑛𝑛−1, 𝑑𝑑1 = 6.
© S. Turaev, CSC 1700 Discrete Mathematics 9
Fibonacci Numbers
Definition: the Fibonacci sequence, 𝑓𝑓0, 𝑓𝑓1, 𝑓𝑓2, … , is
defined by:
 Initial Conditions: 𝑓𝑓0 = 0, 𝑓𝑓1 = 1
 Recurrence Relation: 𝑓𝑓𝑛𝑛 = 𝑓𝑓𝑛𝑛−1 + 𝑓𝑓𝑛𝑛−2
Example: Find 𝑓𝑓4, 𝑓𝑓5, 𝑓𝑓6, 𝑓𝑓7 and 𝑓𝑓8.
© S. Turaev, CSC 1700 Discrete Mathematics 10
Linear Homogeneous Recurrence Relations
Definition: A linear homogeneous recurrence relation of
degree 𝑘𝑘 with constant coefficients is a recurrence
relation of the form
𝑎𝑎𝑛𝑛 = 𝑟𝑟1 𝑎𝑎𝑛𝑛−1 + 𝑟𝑟2 𝑎𝑎𝑛𝑛−2 + ⋯ + 𝑟𝑟𝑘𝑘 𝑎𝑎𝑛𝑛−𝑘𝑘
where 𝑟𝑟1, 𝑟𝑟2, … , 𝑟𝑟𝑘𝑘 are real numbers, and 𝑟𝑟𝑘𝑘 ≠ 0.
© S. Turaev, CSC 1700 Discrete Mathematics
• it is linear because the right-hand side is a sum of the previous
terms of the sequence each multiplied by a function of 𝑛𝑛.
• it is homogeneous because no terms occur that are not
multiples of the 𝑎𝑎𝑗𝑗s. Each coefficient is a constant.
• the degree is 𝑘𝑘 because 𝑎𝑎𝑛𝑛 is expressed in terms of the
previous 𝑘𝑘 terms of the sequence.
11
Linear Homogeneous Recurrence Relations
 𝑝𝑝𝑛𝑛 = 1.11 𝑝𝑝𝑛𝑛−1
 𝑓𝑓𝑛𝑛 = 𝑓𝑓𝑛𝑛−1 + 𝑓𝑓𝑛𝑛−2
 𝑎𝑎𝑛𝑛 = 𝑎𝑎𝑛𝑛−1 + 𝑎𝑎𝑛𝑛−2
2
 ℎ𝑛𝑛 = 2ℎ𝑛𝑛−1 + 1
 𝑏𝑏𝑛𝑛 = 𝑛𝑛𝑏𝑏𝑛𝑛−1
© S. Turaev, CSC 1700 Discrete Mathematics 12
Linear Homogeneous Recurrence Relations
 𝑝𝑝𝑛𝑛 = 1.11 𝑝𝑝𝑛𝑛−1
 𝑓𝑓𝑛𝑛 = 𝑓𝑓𝑛𝑛−1 + 𝑓𝑓𝑛𝑛−2
 𝑎𝑎𝑛𝑛 = 𝑎𝑎𝑛𝑛−1 + 𝑎𝑎𝑛𝑛−2
2
 ℎ𝑛𝑛 = 2ℎ𝑛𝑛−1 + 1
 𝑏𝑏𝑛𝑛 = 𝑛𝑛𝑏𝑏𝑛𝑛−1
© S. Turaev, CSC 1700 Discrete Mathematics
linear homogeneous recurrence
relation of degree 1
linear homogeneous recurrence
relation of degree 2
not linear
not homogeneous
coefficients are not constants
13
Linear Homogeneous Recurrence Relations
 The basic approach is to look for solutions of the form
𝑎𝑎𝑛𝑛 = 𝑥𝑥 𝑛𝑛
, where 𝑥𝑥 is a constant.
 Note that 𝑎𝑎𝑛𝑛 = 𝑥𝑥 𝑛𝑛
is a solution to the recurrence
relation
𝑎𝑎𝑛𝑛 = 𝑟𝑟1 𝑎𝑎𝑛𝑛−1 + 𝑟𝑟2 𝑎𝑎𝑛𝑛−2 + ⋯ + 𝑟𝑟𝑘𝑘 𝑎𝑎𝑛𝑛−𝑘𝑘
if and only if
𝑥𝑥 𝑛𝑛
= 𝑟𝑟1 𝑥𝑥 𝑛𝑛−1
+ 𝑟𝑟2 𝑥𝑥 𝑛𝑛−2
+ ⋯ + 𝑟𝑟𝑘𝑘 𝑥𝑥 𝑛𝑛−𝑘𝑘
.
© S. Turaev, CSC 1700 Discrete Mathematics 14
Linear Homogeneous Recurrence Relations
 Algebraic manipulation yields the characteristic
equation:
𝑥𝑥 𝑘𝑘
− 𝑟𝑟1 𝑥𝑥 𝑘𝑘−1
− 𝑟𝑟2 𝑥𝑥 𝑘𝑘−2
− ⋯ − 𝑟𝑟𝑘𝑘 = 0
 The sequence 𝑎𝑎𝑛𝑛 with 𝑎𝑎𝑛𝑛 = 𝑥𝑥 𝑛𝑛
is a solution if and
only if 𝑥𝑥 is a solution to the characteristic equation.
© S. Turaev, CSC 1700 Discrete Mathematics 15
Linear Homogeneous Recurrence Relations
Theorem: If the characteristic equation
𝑥𝑥2
− 𝑟𝑟1 𝑥𝑥 − 𝑟𝑟2 = 0
of the recurrence relation 𝑎𝑎𝑛𝑛 = 𝑟𝑟1 𝑎𝑎𝑛𝑛−1 + 𝑟𝑟2 𝑎𝑎𝑛𝑛−2 has two
distinct roots, 𝑥𝑥1 and 𝑥𝑥2, then
𝑎𝑎𝑛𝑛 = 𝑝𝑝𝑥𝑥1
𝑛𝑛
+ 𝑞𝑞𝑥𝑥2
𝑛𝑛
where 𝑝𝑝 and 𝑞𝑞 depend on the initial conditions, is the
explicit formula for the sequence.
© S. Turaev, CSC 1700 Discrete Mathematics 16
Linear Homogeneous Recurrence Relations
Theorem: If the characteristic equation
𝑥𝑥2
− 𝑟𝑟1 𝑥𝑥 − 𝑟𝑟2 = 0
of the recurrence relation 𝑎𝑎𝑛𝑛 = 𝑟𝑟1 𝑎𝑎𝑛𝑛−1 + 𝑟𝑟2 𝑎𝑎𝑛𝑛−2 has a
single root, 𝑥𝑥, then
𝑎𝑎𝑛𝑛 = 𝑝𝑝𝑥𝑥 𝑛𝑛
+ 𝑞𝑞𝑞𝑞𝑥𝑥 𝑛𝑛
where 𝑝𝑝 and 𝑞𝑞 depend on the initial conditions, is the
explicit formula for the sequence.
© S. Turaev, CSC 1700 Discrete Mathematics 17
Linear Homogeneous Recurrence Relations
Example 1: Find an explicit formula for the sequence
defined by 𝑎𝑎𝑛𝑛 = 4𝑎𝑎𝑛𝑛−1 + 5𝑎𝑎𝑛𝑛−2 with the initial
conditions 𝑎𝑎1 = 2 and 𝑎𝑎2 = 6.
Example 2: Find an explicit formula for the sequence
defined by 𝑏𝑏𝑛𝑛 = −6𝑏𝑏𝑛𝑛−1 − 9𝑏𝑏𝑛𝑛−2 with the initial
conditions 𝑏𝑏1 = 2.5 and 𝑏𝑏2 = 4.7.
Example 3 (Fibonacci sequence): Find an explicit formula
for the sequence defined by 𝑓𝑓𝑛𝑛 = 𝑓𝑓𝑛𝑛−1 + 𝑓𝑓𝑛𝑛−2 with the
initial conditions 𝑓𝑓0 = 0 and 𝑓𝑓1 = 1.
© S. Turaev, CSC 1700 Discrete Mathematics 18

More Related Content

What's hot

systems of linear equations & matrices
systems of linear equations & matricessystems of linear equations & matrices
systems of linear equations & matricesStudent
 
Intro to Discrete Mathematics
Intro to Discrete MathematicsIntro to Discrete Mathematics
Intro to Discrete Mathematicsasad faraz
 
Theory of automata and formal language
Theory of automata and formal languageTheory of automata and formal language
Theory of automata and formal languageRabia Khalid
 
Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notationsNikhil Sharma
 
Principle of mathematical induction
Principle of mathematical inductionPrinciple of mathematical induction
Principle of mathematical inductionKriti Varshney
 
Discrete Math Presentation(Rules of Inference)
Discrete Math Presentation(Rules of Inference)Discrete Math Presentation(Rules of Inference)
Discrete Math Presentation(Rules of Inference)Ikhtiar Khan Sohan
 
Minimum spanning tree (mst)
Minimum spanning tree (mst)Minimum spanning tree (mst)
Minimum spanning tree (mst)Pradeep Behera
 
Generating functions solve recurrence
Generating functions solve recurrenceGenerating functions solve recurrence
Generating functions solve recurrenceHae Morgia
 
Linear differential equation with constant coefficient
Linear differential equation with constant coefficientLinear differential equation with constant coefficient
Linear differential equation with constant coefficientSanjay Singh
 
0/1 knapsack
0/1 knapsack0/1 knapsack
0/1 knapsackAmin Omi
 
Asymptotic analysis
Asymptotic analysisAsymptotic analysis
Asymptotic analysisSoujanya V
 
Matrix chain multiplication
Matrix chain multiplicationMatrix chain multiplication
Matrix chain multiplicationRespa Peter
 
Gaussian Elimination Method
Gaussian Elimination MethodGaussian Elimination Method
Gaussian Elimination MethodAndi Firdaus
 
NFA or Non deterministic finite automata
NFA or Non deterministic finite automataNFA or Non deterministic finite automata
NFA or Non deterministic finite automatadeepinderbedi
 

What's hot (20)

systems of linear equations & matrices
systems of linear equations & matricessystems of linear equations & matrices
systems of linear equations & matrices
 
Intro to Discrete Mathematics
Intro to Discrete MathematicsIntro to Discrete Mathematics
Intro to Discrete Mathematics
 
Theory of automata and formal language
Theory of automata and formal languageTheory of automata and formal language
Theory of automata and formal language
 
Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notations
 
Recurrence relation
Recurrence relationRecurrence relation
Recurrence relation
 
Principle of mathematical induction
Principle of mathematical inductionPrinciple of mathematical induction
Principle of mathematical induction
 
Discrete Math Presentation(Rules of Inference)
Discrete Math Presentation(Rules of Inference)Discrete Math Presentation(Rules of Inference)
Discrete Math Presentation(Rules of Inference)
 
Minimum spanning tree (mst)
Minimum spanning tree (mst)Minimum spanning tree (mst)
Minimum spanning tree (mst)
 
Generating functions solve recurrence
Generating functions solve recurrenceGenerating functions solve recurrence
Generating functions solve recurrence
 
Trees
Trees Trees
Trees
 
Linear differential equation with constant coefficient
Linear differential equation with constant coefficientLinear differential equation with constant coefficient
Linear differential equation with constant coefficient
 
Regular expressions
Regular expressionsRegular expressions
Regular expressions
 
0/1 knapsack
0/1 knapsack0/1 knapsack
0/1 knapsack
 
Asymptotic Notation
Asymptotic NotationAsymptotic Notation
Asymptotic Notation
 
Asymptotic analysis
Asymptotic analysisAsymptotic analysis
Asymptotic analysis
 
Knapsack Problem
Knapsack ProblemKnapsack Problem
Knapsack Problem
 
Matrix chain multiplication
Matrix chain multiplicationMatrix chain multiplication
Matrix chain multiplication
 
Gaussian Elimination Method
Gaussian Elimination MethodGaussian Elimination Method
Gaussian Elimination Method
 
Graph theory presentation
Graph theory presentationGraph theory presentation
Graph theory presentation
 
NFA or Non deterministic finite automata
NFA or Non deterministic finite automataNFA or Non deterministic finite automata
NFA or Non deterministic finite automata
 

Similar to Recurrence Relations Guide

Relations digraphs
Relations  digraphsRelations  digraphs
Relations digraphsIIUM
 
Integers and matrices (slides)
Integers and matrices (slides)Integers and matrices (slides)
Integers and matrices (slides)IIUM
 
Relations and Functions.pdf
Relations and Functions.pdfRelations and Functions.pdf
Relations and Functions.pdfGhanshyamGUPTA61
 
sequence and series.docx
sequence and series.docxsequence and series.docx
sequence and series.docxGetachew Mulaw
 
Semana 13 ecuaciones polinomiales ii álgebra-uni ccesa007
Semana 13   ecuaciones polinomiales ii  álgebra-uni ccesa007Semana 13   ecuaciones polinomiales ii  álgebra-uni ccesa007
Semana 13 ecuaciones polinomiales ii álgebra-uni ccesa007Demetrio Ccesa Rayme
 
11.3 Geometric Sequences and Series
11.3 Geometric Sequences and Series11.3 Geometric Sequences and Series
11.3 Geometric Sequences and Seriessmiller5
 
Counting i (slides)
Counting i (slides)Counting i (slides)
Counting i (slides)IIUM
 
Comparative analysis of x^3+y^3=z^3 and x^2+y^2=z^2 in the Interconnected Sets
Comparative analysis of x^3+y^3=z^3 and x^2+y^2=z^2 in the Interconnected Sets Comparative analysis of x^3+y^3=z^3 and x^2+y^2=z^2 in the Interconnected Sets
Comparative analysis of x^3+y^3=z^3 and x^2+y^2=z^2 in the Interconnected Sets Vladimir Godovalov
 
Lesson 1a_Sequence.pptx
Lesson 1a_Sequence.pptxLesson 1a_Sequence.pptx
Lesson 1a_Sequence.pptxBaldonMarcelo1
 
Arithmetic sequences and arithmetic means
Arithmetic sequences and arithmetic meansArithmetic sequences and arithmetic means
Arithmetic sequences and arithmetic meansDenmar Marasigan
 
Sistemas de ecuaciones lineales
Sistemas de ecuaciones linealesSistemas de ecuaciones lineales
Sistemas de ecuaciones linealesRokiFernandez1
 
Cauchy-Euler Equation.pptx
Cauchy-Euler Equation.pptxCauchy-Euler Equation.pptx
Cauchy-Euler Equation.pptxSalarBasheer
 
Semana 29 sucesiones reales álgebra uni ccesa007
Semana 29 sucesiones reales  álgebra uni ccesa007Semana 29 sucesiones reales  álgebra uni ccesa007
Semana 29 sucesiones reales álgebra uni ccesa007Demetrio Ccesa Rayme
 
Binary Operations.pptx
Binary Operations.pptxBinary Operations.pptx
Binary Operations.pptxSoyaMathew1
 
ePortfolio- Mathematics
ePortfolio- MathematicsePortfolio- Mathematics
ePortfolio- Mathematicsreadsw346
 
Section 9: Equivalence Relations & Cosets
Section 9: Equivalence Relations & CosetsSection 9: Equivalence Relations & Cosets
Section 9: Equivalence Relations & CosetsKevin Johnson
 

Similar to Recurrence Relations Guide (20)

Relations digraphs
Relations  digraphsRelations  digraphs
Relations digraphs
 
Integers and matrices (slides)
Integers and matrices (slides)Integers and matrices (slides)
Integers and matrices (slides)
 
Relations and Functions.pdf
Relations and Functions.pdfRelations and Functions.pdf
Relations and Functions.pdf
 
sequence and series.docx
sequence and series.docxsequence and series.docx
sequence and series.docx
 
co.pptx
co.pptxco.pptx
co.pptx
 
Semana 13 ecuaciones polinomiales ii álgebra-uni ccesa007
Semana 13   ecuaciones polinomiales ii  álgebra-uni ccesa007Semana 13   ecuaciones polinomiales ii  álgebra-uni ccesa007
Semana 13 ecuaciones polinomiales ii álgebra-uni ccesa007
 
11.3 Geometric Sequences and Series
11.3 Geometric Sequences and Series11.3 Geometric Sequences and Series
11.3 Geometric Sequences and Series
 
Counting i (slides)
Counting i (slides)Counting i (slides)
Counting i (slides)
 
Comparative analysis of x^3+y^3=z^3 and x^2+y^2=z^2 in the Interconnected Sets
Comparative analysis of x^3+y^3=z^3 and x^2+y^2=z^2 in the Interconnected Sets Comparative analysis of x^3+y^3=z^3 and x^2+y^2=z^2 in the Interconnected Sets
Comparative analysis of x^3+y^3=z^3 and x^2+y^2=z^2 in the Interconnected Sets
 
Lesson 1a_Sequence.pptx
Lesson 1a_Sequence.pptxLesson 1a_Sequence.pptx
Lesson 1a_Sequence.pptx
 
MT102 Лекц 10
MT102 Лекц 10MT102 Лекц 10
MT102 Лекц 10
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
 
Arithmetic sequences and arithmetic means
Arithmetic sequences and arithmetic meansArithmetic sequences and arithmetic means
Arithmetic sequences and arithmetic means
 
Sistemas de ecuaciones lineales
Sistemas de ecuaciones linealesSistemas de ecuaciones lineales
Sistemas de ecuaciones lineales
 
Cauchy-Euler Equation.pptx
Cauchy-Euler Equation.pptxCauchy-Euler Equation.pptx
Cauchy-Euler Equation.pptx
 
Semana 29 sucesiones reales álgebra uni ccesa007
Semana 29 sucesiones reales  álgebra uni ccesa007Semana 29 sucesiones reales  álgebra uni ccesa007
Semana 29 sucesiones reales álgebra uni ccesa007
 
Binary Operations.pptx
Binary Operations.pptxBinary Operations.pptx
Binary Operations.pptx
 
ePortfolio- Mathematics
ePortfolio- MathematicsePortfolio- Mathematics
ePortfolio- Mathematics
 
Section 9: Equivalence Relations & Cosets
Section 9: Equivalence Relations & CosetsSection 9: Equivalence Relations & Cosets
Section 9: Equivalence Relations & Cosets
 

More from IIUM

How to use_000webhost
How to use_000webhostHow to use_000webhost
How to use_000webhostIIUM
 
Chapter 2
Chapter 2Chapter 2
Chapter 2IIUM
 
Chapter 1
Chapter 1Chapter 1
Chapter 1IIUM
 
Kreydle internship-multimedia
Kreydle internship-multimediaKreydle internship-multimedia
Kreydle internship-multimediaIIUM
 
03phpbldgblock
03phpbldgblock03phpbldgblock
03phpbldgblockIIUM
 
Chap2 practice key
Chap2 practice keyChap2 practice key
Chap2 practice keyIIUM
 
Group p1
Group p1Group p1
Group p1IIUM
 
Tutorial import n auto pilot blogspot friendly seo
Tutorial import n auto pilot blogspot friendly seoTutorial import n auto pilot blogspot friendly seo
Tutorial import n auto pilot blogspot friendly seoIIUM
 
Visual sceneperception encycloperception-sage-oliva2009
Visual sceneperception encycloperception-sage-oliva2009Visual sceneperception encycloperception-sage-oliva2009
Visual sceneperception encycloperception-sage-oliva2009IIUM
 
03 the htm_lforms
03 the htm_lforms03 the htm_lforms
03 the htm_lformsIIUM
 
Exercise on algo analysis answer
Exercise on algo analysis   answerExercise on algo analysis   answer
Exercise on algo analysis answerIIUM
 
Redo midterm
Redo midtermRedo midterm
Redo midtermIIUM
 
Heaps
HeapsHeaps
HeapsIIUM
 
Report format
Report formatReport format
Report formatIIUM
 
Edpuzzle guidelines
Edpuzzle guidelinesEdpuzzle guidelines
Edpuzzle guidelinesIIUM
 
Final Exam Paper
Final Exam PaperFinal Exam Paper
Final Exam PaperIIUM
 
Final Exam Paper
Final Exam PaperFinal Exam Paper
Final Exam PaperIIUM
 
Group assignment 1 s21516
Group assignment 1 s21516Group assignment 1 s21516
Group assignment 1 s21516IIUM
 
Avl tree-rotations
Avl tree-rotationsAvl tree-rotations
Avl tree-rotationsIIUM
 
Week12 graph
Week12   graph Week12   graph
Week12 graph IIUM
 

More from IIUM (20)

How to use_000webhost
How to use_000webhostHow to use_000webhost
How to use_000webhost
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
Kreydle internship-multimedia
Kreydle internship-multimediaKreydle internship-multimedia
Kreydle internship-multimedia
 
03phpbldgblock
03phpbldgblock03phpbldgblock
03phpbldgblock
 
Chap2 practice key
Chap2 practice keyChap2 practice key
Chap2 practice key
 
Group p1
Group p1Group p1
Group p1
 
Tutorial import n auto pilot blogspot friendly seo
Tutorial import n auto pilot blogspot friendly seoTutorial import n auto pilot blogspot friendly seo
Tutorial import n auto pilot blogspot friendly seo
 
Visual sceneperception encycloperception-sage-oliva2009
Visual sceneperception encycloperception-sage-oliva2009Visual sceneperception encycloperception-sage-oliva2009
Visual sceneperception encycloperception-sage-oliva2009
 
03 the htm_lforms
03 the htm_lforms03 the htm_lforms
03 the htm_lforms
 
Exercise on algo analysis answer
Exercise on algo analysis   answerExercise on algo analysis   answer
Exercise on algo analysis answer
 
Redo midterm
Redo midtermRedo midterm
Redo midterm
 
Heaps
HeapsHeaps
Heaps
 
Report format
Report formatReport format
Report format
 
Edpuzzle guidelines
Edpuzzle guidelinesEdpuzzle guidelines
Edpuzzle guidelines
 
Final Exam Paper
Final Exam PaperFinal Exam Paper
Final Exam Paper
 
Final Exam Paper
Final Exam PaperFinal Exam Paper
Final Exam Paper
 
Group assignment 1 s21516
Group assignment 1 s21516Group assignment 1 s21516
Group assignment 1 s21516
 
Avl tree-rotations
Avl tree-rotationsAvl tree-rotations
Avl tree-rotations
 
Week12 graph
Week12   graph Week12   graph
Week12 graph
 

Recently uploaded

Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxnelietumpap1
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 

Recently uploaded (20)

Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptx
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 

Recurrence Relations Guide

  • 2. Recurrence Relations  Sequences are ordered lists of elements. • 1, 2, 3, 5, 8 • 1, 3, 9, 27, 81, …  Sequences arise throughout mathematics, computer science, and in many other disciplines, ranging from botany to music.  We will introduce the terminology to represent sequences. © S. Turaev, CSC 1700 Discrete Mathematics 2
  • 3. Recurrence Relations Definition: A sequence is a function from a subset of the integers (usually either the set 0, 1, 2, 3, 4, … or 1, 2, 3, 4, … ) to a set 𝑆𝑆.  The notation 𝑎𝑎𝑛𝑛 is used to denote the image of the integer 𝑛𝑛. We can think of 𝑎𝑎𝑛𝑛 as the equivalent of 𝑓𝑓 𝑛𝑛 where 𝑓𝑓 is a function from 0,1,2, … to 𝑆𝑆. We call 𝑎𝑎𝑛𝑛 a term of the sequence. Example: Consider the sequence 𝑎𝑎𝑛𝑛 where 𝑎𝑎𝑛𝑛 = 1/𝑛𝑛. Then 1, 1 2 , 1 3 , 1 4 , … © S. Turaev, CSC 1700 Discrete Mathematics 3
  • 4. Recurrence Relations Definition: A recurrence relation for the sequence 𝑎𝑎𝑛𝑛 is an equation that expresses 𝑎𝑎𝑛𝑛 in terms of one or more of the previous terms of the sequence, namely, 𝑎𝑎0, 𝑎𝑎1, … , 𝑎𝑎𝑛𝑛−1, for all integers 𝑛𝑛 with 𝑛𝑛 ≥ 𝑛𝑛0, where 𝑛𝑛0 is a nonnegative integer.  A sequence is called a solution of a recurrence relation if its terms satisfy the recurrence relation.  The initial conditions for a sequence specify the terms that precede the first term where the recurrence relation takes effect. © S. Turaev, CSC 1700 Discrete Mathematics 4
  • 5. Recurrence Relations Example: Let 𝑎𝑎𝑛𝑛 be a sequence that satisfies the recurrence relation 𝑎𝑎𝑛𝑛 = 𝑎𝑎𝑛𝑛−1 + 3 for 𝑛𝑛 = 1, 2, 3, 4, … and suppose that 𝑎𝑎0 = 2. What are 𝑎𝑎1, 𝑎𝑎2 and 𝑎𝑎3? [Here the initial condition is 𝑎𝑎0 = 2.] Example: Let 𝑎𝑎𝑛𝑛 be a sequence that satisfies the recurrence relation 𝑎𝑎𝑛𝑛 = 𝑎𝑎𝑛𝑛−1 − 𝑎𝑎𝑛𝑛−2 for 𝑛𝑛 = 2, 3, 4, … and suppose that 𝑎𝑎0 = 3 and 𝑎𝑎1 = 5. What are 𝑎𝑎2 and 𝑎𝑎3? [Here the initial conditions are 𝑎𝑎0 = 3 and 𝑎𝑎1 = 5.] © S. Turaev, CSC 1700 Discrete Mathematics 5
  • 6. Fibonacci Numbers Definition: the Fibonacci sequence, 𝑓𝑓0, 𝑓𝑓1, 𝑓𝑓2, … , is defined by:  Initial Conditions: 𝑓𝑓0 = 0, 𝑓𝑓1 = 1  Recurrence Relation: 𝑓𝑓𝑛𝑛 = 𝑓𝑓𝑛𝑛−1 + 𝑓𝑓𝑛𝑛−2 Example: Find 𝑓𝑓4, 𝑓𝑓5, 𝑓𝑓6, 𝑓𝑓7 and 𝑓𝑓8. © S. Turaev, CSC 1700 Discrete Mathematics 6
  • 7. Recurrence Relations  Finding a formula for the 𝑛𝑛th term of the sequence generated by a recurrence relation is called solving the recurrence relation.  Such a formula is called a explicit (closed) formula.  One technique for finding an explicit formula for the sequence defined by a recurrence relation is backtracking. © S. Turaev, CSC 1700 Discrete Mathematics 7
  • 8. Recurrence Relations Example: Let 𝑎𝑎𝑛𝑛 be a sequence that satisfies the recurrence relation 𝑎𝑎𝑛𝑛 = 𝑎𝑎𝑛𝑛−1 + 3 for 𝑛𝑛 = 2, 3, 4, … and suppose that 𝑎𝑎1 = 2. Find an explicit formula for the sequence. 𝑎𝑎𝑛𝑛 = 𝑎𝑎𝑛𝑛−1 + 3 = 𝑎𝑎𝑛𝑛−2 + 3 + 3 = 𝑎𝑎𝑛𝑛−2 + 2 ⋅ 3 = 𝑎𝑎𝑛𝑛−3 + 3 + 2 ⋅ 3 = 𝑎𝑎𝑛𝑛−3 + 3 ⋅ 3 ⋯ = 𝑎𝑎2 + 𝑛𝑛 − 2 ⋅ 3 = 𝑎𝑎1 + 3 + 𝑛𝑛 − 2 ⋅ 3 = 𝑎𝑎1 + 𝑛𝑛 − 1 ⋅ 3 = 2 + 𝑛𝑛 − 1 ⋅ 3 = 3 ⋅ 𝑛𝑛 − 1 © S. Turaev, CSC 1700 Discrete Mathematics 8
  • 9. Recurrence Relations : Backtracking Example 1: 𝑏𝑏𝑛𝑛 = 5𝑏𝑏𝑛𝑛−1 + 3, 𝑏𝑏1 = 3. Example 2: 𝑐𝑐𝑛𝑛 = 𝑐𝑐𝑛𝑛−1 + 𝑛𝑛, 𝑏𝑏1 = 4. Example 3: 𝑑𝑑𝑛𝑛 = 𝑛𝑛 ⋅ 𝑑𝑑𝑛𝑛−1, 𝑑𝑑1 = 6. © S. Turaev, CSC 1700 Discrete Mathematics 9
  • 10. Fibonacci Numbers Definition: the Fibonacci sequence, 𝑓𝑓0, 𝑓𝑓1, 𝑓𝑓2, … , is defined by:  Initial Conditions: 𝑓𝑓0 = 0, 𝑓𝑓1 = 1  Recurrence Relation: 𝑓𝑓𝑛𝑛 = 𝑓𝑓𝑛𝑛−1 + 𝑓𝑓𝑛𝑛−2 Example: Find 𝑓𝑓4, 𝑓𝑓5, 𝑓𝑓6, 𝑓𝑓7 and 𝑓𝑓8. © S. Turaev, CSC 1700 Discrete Mathematics 10
  • 11. Linear Homogeneous Recurrence Relations Definition: A linear homogeneous recurrence relation of degree 𝑘𝑘 with constant coefficients is a recurrence relation of the form 𝑎𝑎𝑛𝑛 = 𝑟𝑟1 𝑎𝑎𝑛𝑛−1 + 𝑟𝑟2 𝑎𝑎𝑛𝑛−2 + ⋯ + 𝑟𝑟𝑘𝑘 𝑎𝑎𝑛𝑛−𝑘𝑘 where 𝑟𝑟1, 𝑟𝑟2, … , 𝑟𝑟𝑘𝑘 are real numbers, and 𝑟𝑟𝑘𝑘 ≠ 0. © S. Turaev, CSC 1700 Discrete Mathematics • it is linear because the right-hand side is a sum of the previous terms of the sequence each multiplied by a function of 𝑛𝑛. • it is homogeneous because no terms occur that are not multiples of the 𝑎𝑎𝑗𝑗s. Each coefficient is a constant. • the degree is 𝑘𝑘 because 𝑎𝑎𝑛𝑛 is expressed in terms of the previous 𝑘𝑘 terms of the sequence. 11
  • 12. Linear Homogeneous Recurrence Relations  𝑝𝑝𝑛𝑛 = 1.11 𝑝𝑝𝑛𝑛−1  𝑓𝑓𝑛𝑛 = 𝑓𝑓𝑛𝑛−1 + 𝑓𝑓𝑛𝑛−2  𝑎𝑎𝑛𝑛 = 𝑎𝑎𝑛𝑛−1 + 𝑎𝑎𝑛𝑛−2 2  ℎ𝑛𝑛 = 2ℎ𝑛𝑛−1 + 1  𝑏𝑏𝑛𝑛 = 𝑛𝑛𝑏𝑏𝑛𝑛−1 © S. Turaev, CSC 1700 Discrete Mathematics 12
  • 13. Linear Homogeneous Recurrence Relations  𝑝𝑝𝑛𝑛 = 1.11 𝑝𝑝𝑛𝑛−1  𝑓𝑓𝑛𝑛 = 𝑓𝑓𝑛𝑛−1 + 𝑓𝑓𝑛𝑛−2  𝑎𝑎𝑛𝑛 = 𝑎𝑎𝑛𝑛−1 + 𝑎𝑎𝑛𝑛−2 2  ℎ𝑛𝑛 = 2ℎ𝑛𝑛−1 + 1  𝑏𝑏𝑛𝑛 = 𝑛𝑛𝑏𝑏𝑛𝑛−1 © S. Turaev, CSC 1700 Discrete Mathematics linear homogeneous recurrence relation of degree 1 linear homogeneous recurrence relation of degree 2 not linear not homogeneous coefficients are not constants 13
  • 14. Linear Homogeneous Recurrence Relations  The basic approach is to look for solutions of the form 𝑎𝑎𝑛𝑛 = 𝑥𝑥 𝑛𝑛 , where 𝑥𝑥 is a constant.  Note that 𝑎𝑎𝑛𝑛 = 𝑥𝑥 𝑛𝑛 is a solution to the recurrence relation 𝑎𝑎𝑛𝑛 = 𝑟𝑟1 𝑎𝑎𝑛𝑛−1 + 𝑟𝑟2 𝑎𝑎𝑛𝑛−2 + ⋯ + 𝑟𝑟𝑘𝑘 𝑎𝑎𝑛𝑛−𝑘𝑘 if and only if 𝑥𝑥 𝑛𝑛 = 𝑟𝑟1 𝑥𝑥 𝑛𝑛−1 + 𝑟𝑟2 𝑥𝑥 𝑛𝑛−2 + ⋯ + 𝑟𝑟𝑘𝑘 𝑥𝑥 𝑛𝑛−𝑘𝑘 . © S. Turaev, CSC 1700 Discrete Mathematics 14
  • 15. Linear Homogeneous Recurrence Relations  Algebraic manipulation yields the characteristic equation: 𝑥𝑥 𝑘𝑘 − 𝑟𝑟1 𝑥𝑥 𝑘𝑘−1 − 𝑟𝑟2 𝑥𝑥 𝑘𝑘−2 − ⋯ − 𝑟𝑟𝑘𝑘 = 0  The sequence 𝑎𝑎𝑛𝑛 with 𝑎𝑎𝑛𝑛 = 𝑥𝑥 𝑛𝑛 is a solution if and only if 𝑥𝑥 is a solution to the characteristic equation. © S. Turaev, CSC 1700 Discrete Mathematics 15
  • 16. Linear Homogeneous Recurrence Relations Theorem: If the characteristic equation 𝑥𝑥2 − 𝑟𝑟1 𝑥𝑥 − 𝑟𝑟2 = 0 of the recurrence relation 𝑎𝑎𝑛𝑛 = 𝑟𝑟1 𝑎𝑎𝑛𝑛−1 + 𝑟𝑟2 𝑎𝑎𝑛𝑛−2 has two distinct roots, 𝑥𝑥1 and 𝑥𝑥2, then 𝑎𝑎𝑛𝑛 = 𝑝𝑝𝑥𝑥1 𝑛𝑛 + 𝑞𝑞𝑥𝑥2 𝑛𝑛 where 𝑝𝑝 and 𝑞𝑞 depend on the initial conditions, is the explicit formula for the sequence. © S. Turaev, CSC 1700 Discrete Mathematics 16
  • 17. Linear Homogeneous Recurrence Relations Theorem: If the characteristic equation 𝑥𝑥2 − 𝑟𝑟1 𝑥𝑥 − 𝑟𝑟2 = 0 of the recurrence relation 𝑎𝑎𝑛𝑛 = 𝑟𝑟1 𝑎𝑎𝑛𝑛−1 + 𝑟𝑟2 𝑎𝑎𝑛𝑛−2 has a single root, 𝑥𝑥, then 𝑎𝑎𝑛𝑛 = 𝑝𝑝𝑥𝑥 𝑛𝑛 + 𝑞𝑞𝑞𝑞𝑥𝑥 𝑛𝑛 where 𝑝𝑝 and 𝑞𝑞 depend on the initial conditions, is the explicit formula for the sequence. © S. Turaev, CSC 1700 Discrete Mathematics 17
  • 18. Linear Homogeneous Recurrence Relations Example 1: Find an explicit formula for the sequence defined by 𝑎𝑎𝑛𝑛 = 4𝑎𝑎𝑛𝑛−1 + 5𝑎𝑎𝑛𝑛−2 with the initial conditions 𝑎𝑎1 = 2 and 𝑎𝑎2 = 6. Example 2: Find an explicit formula for the sequence defined by 𝑏𝑏𝑛𝑛 = −6𝑏𝑏𝑛𝑛−1 − 9𝑏𝑏𝑛𝑛−2 with the initial conditions 𝑏𝑏1 = 2.5 and 𝑏𝑏2 = 4.7. Example 3 (Fibonacci sequence): Find an explicit formula for the sequence defined by 𝑓𝑓𝑛𝑛 = 𝑓𝑓𝑛𝑛−1 + 𝑓𝑓𝑛𝑛−2 with the initial conditions 𝑓𝑓0 = 0 and 𝑓𝑓1 = 1. © S. Turaev, CSC 1700 Discrete Mathematics 18