04 - Recurrence
04 - Recurrence
06/05/2020
Outline
Rules:
One disk moved at each step;
A disk cannot be placed on top of a smaller one.
Goal: Move n disks from peg 1 to peg 3.
Definition
The characteristic equation of the recurrence relation (1) is
x2 − x − 1 = 0 .
√
1± 5
This relation has 2 characteristic roots: 2 .
Theorem
Suppose that the equation (in x ) x 2 − c1 x − c2 = 0 has two distinct roots
r1 and r2 . Then the solutions to the relation an = c1 an−1 + c2 an−2 all have
the form an = αr1n + βr2n where α, β are constants.
an = α3n + βn3n .
which yield α = β = 1.
Hence an = 3n + n3n .
H.-T. Nguyen Recurrence relations 06/05/2020 13 / 20
General case
Theorem
Suppose that the equation (2) has k distinct roots r1 , r2 , . . . , rk . Then the
solution to the relation (1) has the form
an = α1 r1n + · · · + αk rkn ,
Theorem
Suppose that the equation (2) has t roots r1 , r2 , . . . , rt with multiplicities
m1 , . . . , mt (mi ≥ 1 and m1 + · · · + mt = k) Then the solution to the
relation (1) has the form
an = p1 (n)r1n + · · · + pt (n)rtn
Theorem
(p)
If (an ) is a particular solution to the non-homogeneous relation (3), then
(p) (h) (h)
every solution of (3) has the form (an + an ), where (an ) is a solution
to the associated homogeneous relation.
Theorem
Suppose that F (n) has the form F (n) = Q(n)s n , where Q is a polynomial
of degree t and s is a real number.
1 If s is not a root of the characteristic equation of the associated
homogeneous relation, then there is a particular solution of the form
p(n)s n , where p is a polynomial of degree not exceeding t.
Theorem
Suppose that F (n) has the form F (n) = Q(n)s n , where Q is a polynomial
of degree t and s is a real number.
1 If s is not a root of the characteristic equation of the associated
homogeneous relation, then there is a particular solution of the form
p(n)s n , where p is a polynomial of degree not exceeding t.
2 If s is a root of multiplicity m of the characteristic equation of the
associated omogeneous relation, then there is a particular solution of
the form nm p(n)s n , where p is a polynomial of degree not exceeding t.
an = an−1 + n , a1 = 1 .
an = an−1 + n , a1 = 1 .