Logic Lecture Slides
Logic Lecture Slides
Logic Lecture Slides
Section 6.7
Recurrence Relations and Their Solution
Let F0 = 1, F1 = 1, F2 = 2, F3 = 3, F4 = 5, etc.
The Fibonacci sequence
Let F0 = 1, F1 = 1, F2 = 2, F3 = 3, F4 = 5, etc.
We find that
Fn = Fn−1 + Fn−2
for all n ≥ 2.
The necessary initial conditions are F0 = 1, F1 = 1.
The Fibonacci sequence
Let F0 = 1, F1 = 1, F2 = 2, F3 = 3, F4 = 5, etc.
We find that
Fn = Fn−1 + Fn−2
for all n ≥ 2.
The necessary initial conditions are F0 = 1, F1 = 1.
2, 1, 3, 4, 7, 11, . . .
2, 1, 3, 4, 7, 11, . . .
with C0 = C1 = 1.
The first eleven terms are
Three leaves:
Four leaves:
Figure : Complete binary trees with one, two, three and four leaves
Definitions
Definition
A recurrence relation of the form
Definition
x m − c1 x m−1 − c2 x m−2 − · · · − cm = 0
is called the characteristic equation of the recurrence relation
Definition
x m − c1 x m−1 − c2 x m−2 − · · · − cm = 0
is called the characteristic equation of the recurrence relation
Definition
x m − c1 x m−1 − c2 x m−2 − · · · − cm = 0
is called the characteristic equation of the recurrence relation
Definition
x m − c1 x m−1 − c2 x m−2 − · · · − cm = 0
is called the characteristic equation of the recurrence relation
Theorem
The sequence an = r n is a solution of the recurrence
x m − c1 x m−1 − c2 x m−2 − · · · − cm = 0
Theorem
If (an ) and (bn ) satisfy a homogeneous linear recurrence
relation with constant coefficients, then (an ) + (bn ) and k (an )
satisfy the same recurrence relation.
General Solution — Distinct Roots
Theorem
Let the roots r1 , r2 , r3 , . . . , rm of the characteristic equation be
distinct. Then an = k1 r1n + k2 r2n + k3 r3n + · · · km rmn 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 k1 , k2 , k3 . . . , km .
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
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