0% found this document useful (0 votes)
17 views

Chapter 8a

Uploaded by

dekud9556
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Chapter 8a

Uploaded by

dekud9556
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 54

Applications of Recurrence Relations

Solving Linear Recurrence Relations

Discrete Mathematics
Advanced Counting Techniques

Prof. Steven Evans

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

8.1: Applications of Recurrence Relations

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

The Tower of Hanoi

Example
A popular puzzle of the late ninetheen century invented by the
French mathematician Édouard Lucas, called the Tower of Hanoi,
consists of three pegs mounted on a board together with disks of
different sizes. Initially these disks are placed ont he first peg in
order of size, with the largest on the bottom. The rules of the
puzzle allow disks to be moved on eat a time from one peg to
another as long as a disk is never placed on top of a smaller disk.
The goal of the puzzle is to have all the disks on the second peg in
order of size, with the largest on the bottom.

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

Tower of Hanoi

1
2
3
4
5
6

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

Tower of Hanoi

1
2
3
4
6 5

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

The Tower of Hanoi

Example
Let Hn denote the number of moves needed to solve the Tower of
Hanoi problems with n disks. Set up a recurrence relation for the
sequence {Hn }.

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

Codeword enumeration
Example
A computer system considers a string of decimal digits a valid
codeword if it contains an even number of 0 digits. For instance,
1230407869 is valid, whereas 120987045608 is not valid. Let an be
the number of valid n-digit codewords. Find a recurrence relation
for an .

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

Codeword enumeration
Example
A computer system considers a string of decimal digits a valid
codeword if it contains an even number of 0 digits. For instance,
1230407869 is valid, whereas 120987045608 is not valid. Let an be
the number of valid n-digit codewords. Find a recurrence relation
for an .
Note that a1 = 9 because there are 10 one-digit strings, and only
one, namely, the string 0, which is not valid. Then, a valid string
of n digits can be obstained by appending a valid string of n − 1
digits with a digit other than 0. Also, a valid string of n digits can
be obstained by appending a 0 to a string of length n − 1 that is
not valid. Summing these two cases, we find:

an = 9an−1 + (10n−1 − an−1 )


= 8an−1 + 10n−1 .
Prof. Steven Evans Discrete Mathematics
Applications of Recurrence Relations
Solving Linear Recurrence Relations

Associations

Example
Find a recurrence relation for Cn , the number of ways to
parenthesize the product of n + 1 numbers x0 , . . . , xn to specify
the order of multiplication. For example, C3 = 5:

((x0 x1 )x2 )x3 , (x0 (x1 x2 ))x3 , (x0 x1 )(x2 x3 ),


x0 ((x1 x2 )x3 ), x0 (x1 (x2 x3 )).

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

Associations

Example
Find a recurrence relation for Cn , the number of ways to
parenthesize the product of n + 1 numbers x0 , . . . , xn to specify
the order of multiplication. For example, C3 = 5:

((x0 x1 )x2 )x3 , (x0 (x1 x2 ))x3 , (x0 x1 )(x2 x3 ),


x0 ((x1 x2 )x3 ), x0 (x1 (x2 x3 )).

This recurrence relation can be solved using the method of


generating functions,
 which we’ll come to in a bit. It can be shown
1 2n
that Cn = n+1 n . The sequence {Cn } is the sequence of Catalan
numbers, named after Eugène Charles Catalan.

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

8.2: Solving Linear Recurrence Relations

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

Linear homogeneous recurrences

Definition
A linear homogeneous recurrence relation of degree k with
constant coefficients is a recurrence relation of the form

an = c1 an−1 + · · · + ck an−k ,

where c1 , . . . , ck are real numbers and ck 6= 0.

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

Linear homogeneous recurrences

Definition
A linear homogeneous recurrence relation of degree k with
constant coefficients is a recurrence relation of the form

an = c1 an−1 + · · · + ck an−k ,

where c1 , . . . , ck are real numbers and ck 6= 0.

Example
The recurrence relation Pn = (1.11)Pn−1 is a linear homogeneous
recurrence relation of degree one. The recurrence relation
fn = fn−1 + fn−2 is a linear homogeneous recurrence relation of
degree two. The recurrence relation an = an−5 is a linear
homogeneous recurrence relation of degree five.

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

Solving L.H.R.R.w.C.C.

The basic approach for solving linear homogeneous recurrence


relations is to look for solutions of the form an = r n , where r is a
constant. Note that an = r n is a solution of the recurrence relation
an = c1 an−1 + · · · + ck an−k if and only if

r n = c1 r n−1 + · · · + ck r n−k .

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

Solving L.H.R.R.w.C.C.

The basic approach for solving linear homogeneous recurrence


relations is to look for solutions of the form an = r n , where r is a
constant. Note that an = r n is a solution of the recurrence relation
an = c1 an−1 + · · · + ck an−k if and only if

r n = c1 r n−1 + · · · + ck r n−k .

When both sides of this equation are divided by r n−k and the
right-hand side is subtracted from the left, we obtain the equation

r k − c1 r k−1 − · · · − ck−1 r − ck = 0.

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

Solving L.H.R.R.w.C.C.

r k − c1 r k−1 − · · · − ck−1 r − ck = 0.
Consequently, the sequence {an } with an = r n is a solution if and
only if r is a solution of this last equation. We call this the
characteristic equation of the recurrence relation. The solutions of
this equation are called the characteristic roots of the recurrence
relation. As we will see, these characteristic roots can be used to
give an explicit formula for all the solutions of the currence relation.

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

Solving L.H.R.R.w.C.C.

Theorem
Let c1 and c2 be real numbers. Suppose that r 2 − c1 r − c2 = 0 has
two distinct roots r1 and r2 . Then, the sequence {an } is a solution
of the recurrence relation an = c1 an−1 + c2 an−2 if and only if
an = α1 r1n + α2 r2n for n = 0, 1, 2, . . . where α1 and α2 are
constants.

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

Solving L.H.R.R.w.C.C.

Theorem
Let c1 and c2 be real numbers. Suppose that r 2 − c1 r − c2 = 0 has
two distinct roots r1 and r2 . Then, the sequence {an } is a solution
of the recurrence relation an = c1 an−1 + c2 an−2 if and only if
an = α1 r1n + α2 r2n for n = 0, 1, 2, . . . where α1 and α2 are
constants.

We must do two things to prove the theorem. First, it must be


shown that if r1 and r2 are the roots of the characteristic equation,
and α1 and α2 are constants, then the sequence {an } with
an = α1 r1n + α2 r2n is a solution of the recurrence relation. Second,
it must be shown that if the sequence {an } is a solution, then
an = α1 r1n + α2 r2n for some constants α1 and α2 .

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

Solving L.H.R.R.w.C.C.

Proof, continued
First we will show that equations of this form are solutions to the
recurrence. Because r1 and r2 satisfy r 2 − c1 r − c2 = 0, it follows
that r12 = c1 r2 + c2 and r22 = c1 r2 + c2 . From these equations, we
see

c1 an−1 + c2 an−2 = c1 (α1 r1n−1 + α2 r2n−1 ) + c2 (α1 r1n−2 + α2 r2n−2 )

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

Solving L.H.R.R.w.C.C.

Proof, continued
First we will show that equations of this form are solutions to the
recurrence. Because r1 and r2 satisfy r 2 − c1 r − c2 = 0, it follows
that r12 = c1 r2 + c2 and r22 = c1 r2 + c2 . From these equations, we
see

c1 an−1 + c2 an−2 = c1 (α1 r1n−1 + α2 r2n−1 ) + c2 (α1 r1n−2 + α2 r2n−2 )


= α1 r1n−2 (c1 r1 + c2 ) + α2 r2n−2 (c1 r2 + c2 )

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

Solving L.H.R.R.w.C.C.

Proof, continued
First we will show that equations of this form are solutions to the
recurrence. Because r1 and r2 satisfy r 2 − c1 r − c2 = 0, it follows
that r12 = c1 r2 + c2 and r22 = c1 r2 + c2 . From these equations, we
see

c1 an−1 + c2 an−2 = c1 (α1 r1n−1 + α2 r2n−1 ) + c2 (α1 r1n−2 + α2 r2n−2 )


= α1 r1n−2 (c1 r1 + c2 ) + α2 r2n−2 (c1 r2 + c2 )
= α1 r1n−2 r12 + α2 r2n−2 r22

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

Solving L.H.R.R.w.C.C.

Proof, continued
First we will show that equations of this form are solutions to the
recurrence. Because r1 and r2 satisfy r 2 − c1 r − c2 = 0, it follows
that r12 = c1 r2 + c2 and r22 = c1 r2 + c2 . From these equations, we
see

c1 an−1 + c2 an−2 = c1 (α1 r1n−1 + α2 r2n−1 ) + c2 (α1 r1n−2 + α2 r2n−2 )


= α1 r1n−2 (c1 r1 + c2 ) + α2 r2n−2 (c1 r2 + c2 )
= α1 r1n−2 r12 + α2 r2n−2 r22
= α1 r1n + α2 r2n
= an .

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

Solving L.H.R.R.w.C.C.

Proof, continued
Now, suppose that {an } is a solution of the recurrence and that
the initial conditions a0 = C0 and a1 = C1 hold. We can solve for
candidate values for α1 and α2 by substituting into the equation
an = α1 r1n + α2 r2n :

a0 = C0 = α1 + α2 ,
a1 = C1 = α1 r1 + α2 r2 .

Solving this linear system for α1 and α2 gives


C1 − C0 r2
α1 = ,
r1 − r2
C0 r1 − C1
α2 = .
r1 − r2
Prof. Steven Evans Discrete Mathematics
Applications of Recurrence Relations
Solving Linear Recurrence Relations

Solving L.H.R.R.w.C.C.

Proof, continued

C1 − C0 r2
α1 = ,
r1 − r2
C0 r1 − C1
α2 = .
r1 − r2
(Note that it is now critical that r1 6= r2 .)

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

Solving L.H.R.R.w.C.C.

Proof, continued

C1 − C0 r2
α1 = ,
r1 − r2
C0 r1 − C1
α2 = .
r1 − r2
(Note that it is now critical that r1 6= r2 .) Hence, we have
produced the formula α1 r1n + α2 r2n which solves the recurrence and
satisfies the two initial condiitons. By uniqueness of solutions to
LHRRwCC with full initial conditions, it follows that this formula
expresses the sequence {an }.

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

L.H.R.R.w.C.C.s

Example
Find an explicit formula for the Fibonacci numbers.

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

L.H.R.R.w.C.C.s

Example
Find an explicit formula for the Fibonacci numbers.

Recall that the Fibonacci numbers are characterized by f0 = 0,


f1 = 1, and fn = fn−1 +√fn−2 . The roots of the
√ characteristic
equation are r1 = (1 + 5)/2 and r2 = (1 − 5)/2. Hence,
√ !n √ !n
1+ 5 1− 5
fn = α1 + α2 .
2 2

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

L.H.R.R.w.C.C.s

√ !n √ !n
1+ 5 1− 5
fn = α1 + α2 .
2 2
To solve for the constants, we substitute the known values f0 = 0
and f1 = 1 to get. . .

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

L.H.R.R.w.C.C.s

√ !n √ !n
1+ 5 1− 5
fn = α1 + α2 .
2 2
To solve for the constants, we substitute the known values f0 = 0
and f1 = 1 to get. . .
√ √
α1 = 1/ 5, α2 = −1/ 5.

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

L.H.R.R.w.C.C.s

√ !n √ !n
1+ 5 1− 5
fn = α1 + α2 .
2 2
To solve for the constants, we substitute the known values f0 = 0
and f1 = 1 to get. . .
√ √
α1 = 1/ 5, α2 = −1/ 5.

Consequently:
√ !n √ !n
1 1+ 5 −1 1− 5
fn = √ +√ .
5 2 5 2

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

L.H.R.R.w.C.C.s

Theorem
Let c1 and c2 be real numbers with c2 6= 0. Suppose that
r 2 − c1 r − c2 = 0 has only one root r0 . A sequence an is a solution
of the recurrence relation an = c1 an−1 + c2 an−2 if and only if
an = α1 r0n + α2 nr0n , where α1 and α2 are constants.

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

L.H.R.R.w.C.C.s

Theorem
Let c1 and c2 be real numbers with c2 6= 0. Suppose that
r 2 − c1 r − c2 = 0 has only one root r0 . A sequence an is a solution
of the recurrence relation an = c1 an−1 + c2 an−2 if and only if
an = α1 r0n + α2 nr0n , where α1 and α2 are constants.

Example
What is the solution of the recurrence relation an = 6an−1 − 9an−2
with initial conditions a0 = 1 and a1 = 6?

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

L.H.R.R.w.C.C.s

Theorem
Let c1 and c2 be real numbers with c2 6= 0. Suppose that
r 2 − c1 r − c2 = 0 has only one root r0 . A sequence an is a solution
of the recurrence relation an = c1 an−1 + c2 an−2 if and only if
an = α1 r0n + α2 nr0n , where α1 and α2 are constants.

Example
What is the solution of the recurrence relation an = 6an−1 − 9an−2
with initial conditions a0 = 1 and a1 = 6?

Solution: The sole root of the characteristic equation is 3, hence


an takes the form an = α1 3n + α2 n3n .

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

L.H.R.R.w.C.C.s

Theorem
Let c1 and c2 be real numbers with c2 6= 0. Suppose that
r 2 − c1 r − c2 = 0 has only one root r0 . A sequence an is a solution
of the recurrence relation an = c1 an−1 + c2 an−2 if and only if
an = α1 r0n + α2 nr0n , where α1 and α2 are constants.

Example
What is the solution of the recurrence relation an = 6an−1 − 9an−2
with initial conditions a0 = 1 and a1 = 6?

Solution: The sole root of the characteristic equation is 3, hence


an takes the form an = α1 3n + α2 n3n . Using the initial conditions,
one finds α1 = α2 = 1, and hence an = 3n + n3n .

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

L.H.R.R.w.C.C.s

Theorem
Let c1 , . . . , ck be real numbers. Suppose that the characteristic
equation
r k − c1 r k−1 − · · · − ck = 0
has k distinct roots r1 , . . . , rk . Then, a sequence {an } is a solution
of the recurrence

an = c1 an−1 + · · · + ck an−k

if and only if
an = α1 r1n + α2 r2n + · · · + αk rkn ,
where α1 , . . . , αk are constants.

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

L.H.R.R.w.C.C.s
Theorem
Let c1 , . . . , ck ∈ R, and suppose that the equation

r k − c1 r k−1 − · · · − ck = 0

has t distinct roots r1 , . . . , rt with multiplicities m1 , . . . , mt ≥ 1


respectively. Then, {an } is a solution of the recurrence

an = c1 an−1 + · · · + ck an−k

if and only if it has the form


t m
X Xi −1

an = αi,j nj rin ,
i=1 j=0

where the αi,j are constants.


Prof. Steven Evans Discrete Mathematics
Applications of Recurrence Relations
Solving Linear Recurrence Relations

L.N.R.R.w.C.C.s

Definition
The recurrence relation an = 3an−1 + 2n is an example of a linear
nonhomogeneous recurrence relation with constant coefficients,
that is, a recurrence relation of the form

an = c1 an−1 + · · · + ck an−k + F (n),

where c1 , . . . , ck are real numbers and F (n) is a function not


identically zero depending only on n.

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

L.N.R.R.w.C.C.s

Definition
The recurrence relation an = 3an−1 + 2n is an example of a linear
nonhomogeneous recurrence relation with constant coefficients,
that is, a recurrence relation of the form

an = c1 an−1 + · · · + ck an−k + F (n),

where c1 , . . . , ck are real numbers and F (n) is a function not


identically zero depending only on n. The same recurrence with
F (n) omitted is called the associated homogeneous recurrence
relation. It plays an important role in the solution of the
nonhomogeneous recurrence relation.

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

L.N.R.R.w.C.C.s

Theorem
(p)
If {an } is a particular solution of the nonhomogeneous linear
recurrence relation with constant coefficients

an = c1 an−1 + · · · + ck an−k F (n),


(p) (h) (h)
then every solution is of the form {an + an }, where {an } is a
solution of the associated homogeneous recurrence relation.

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

L.N.R.R.w.C.C.s

Proof
Suppose that {bn } is a solution of the nonhomogeneous recurrence
(p)
relation. Substituting both it and {an } into the recurrence
relation formula and subtracting, one finds
(p) (p) (p)
bn − an = c1 (bn−1 an−1 ) + · · · + ck (bn−k − an−k ) + (F (n) − F (n)).

(p)
It follows that {bn − an } is a solution of the associated
(p) (h)
homogeneous linear recurrence, and hence bn = an + an .

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

L.N.R.R.w.C.C.s

Example
Find all solutions of the recurrence relation an = 3an−1 + 2n.
What is the solution with a1 = 3?

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

L.N.R.R.w.C.C.s

Example
Find all solutions of the recurrence relation an = 3an−1 + 2n.
What is the solution with a1 = 3?

The associated homogeneous recurrence is an = 3an−1 , which is


(h)
solved by an = α3n for any constant α.

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

L.N.R.R.w.C.C.s

Example
Find all solutions of the recurrence relation an = 3an−1 + 2n.
What is the solution with a1 = 3?

The associated homogeneous recurrence is an = 3an−1 , which is


(h)
solved by an = α3n for any constant α.
Because F (n) = 2n is a polynomial in n of degree 1, a reasonable
trial solution is pn = cn + d for constants c and d. Suppose that
there is a such a solution pn ; then,

an = 3an−1 + 2n
cn + d = 3(c(n − 1) + d) + 2n
0n + 0 = (2c + 2)n + (2d − 3c).

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

L.N.R.R.w.C.C.s

Solution, continued
It follows that c = −1 and d = −3/2, and hence all solutions take
the form
(p) (h) 3
an = an + an = −n − + α3n .
2
To satisfy the initial condition, we set α = 11/6.

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

L.N.R.R.w.C.C.s
Example
Find all solutions of the recurrence relation

an = 5an−1 − 6an−2 + 7n .

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

L.N.R.R.w.C.C.s
Example
Find all solutions of the recurrence relation

an = 5an−1 − 6an−2 + 7n .

The solutions of the associated homogeneous recurrence are


(h)
an = α1 3n + α2 2n .

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

L.N.R.R.w.C.C.s
Example
Find all solutions of the recurrence relation

an = 5an−1 − 6an−2 + 7n .

The solutions of the associated homogeneous recurrence are


(h)
an = α1 3n + α2 2n .
(p)
Because F (n) = 7n , a reasonable trial solution is an = C · 7n .
Making the substitution and solving for C gives C = 49/20, and
(p)
hence an = (49/20) · 7n is a particular solution.

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

L.N.R.R.w.C.C.s
Example
Find all solutions of the recurrence relation

an = 5an−1 − 6an−2 + 7n .

The solutions of the associated homogeneous recurrence are


(h)
an = α1 3n + α2 2n .
(p)
Because F (n) = 7n , a reasonable trial solution is an = C · 7n .
Making the substitution and solving for C gives C = 49/20, and
(p)
hence an = (49/20) · 7n is a particular solution. Hence, a
complete parametrization of solutions is:

an = α1 · 3n + α2 · 2n + (49/20) · 7n .
Prof. Steven Evans Discrete Mathematics
Applications of Recurrence Relations
Solving Linear Recurrence Relations

L.N.R.R.w.C.C.s
Theorem
Suppose that {an } satisfies the linear nonhomogeneous recurrence
relation
an = c1 an−1 + · · · + ck an−k + F (n),
where c1 , . . . , ck are real numbers and

F (n) = (bt nt + · · · + b1 n + b0 )s n ,

where b0 , . . . , bt and s are real numbers. When s is not a root of


the characteristic equation of the associated linear homogeneous
recurrence, there is a particular solution of the form
(pt nt + · · · + p1 n + p0 )s n . When s is a root of this characteristic
equation and its multiplicity is m, there is a particular solution of
the form
nm (pt nt + · · · + p1 n + p0 )s n .
Prof. Steven Evans Discrete Mathematics
Applications of Recurrence Relations
Solving Linear Recurrence Relations

L.N.R.R.w.C.C.s

Example
What form does a particular solution of the linear
nonhomogeneous recurrence

an = 6an−1 − 9an−2 + F (n)

have when F (n) = 3n , F (n) = n3n , F (n) = n2 2n , and


F (n) = (n2 + 1)3n ?

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

L.N.R.R.w.C.C.s

Example
What form does a particular solution of the linear
nonhomogeneous recurrence

an = 6an−1 − 9an−2 + F (n)

have when F (n) = 3n , F (n) = n3n , F (n) = n2 2n , and


F (n) = (n2 + 1)3n ?
(p)
F (n) an
3n p0 n2 3n

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

L.N.R.R.w.C.C.s

Example
What form does a particular solution of the linear
nonhomogeneous recurrence

an = 6an−1 − 9an−2 + F (n)

have when F (n) = 3n , F (n) = n3n , F (n) = n2 2n , and


F (n) = (n2 + 1)3n ?
(p)
F (n) an
3n p0 n2 3n
n3n n2 (p1 n + p0 )3n

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

L.N.R.R.w.C.C.s

Example
What form does a particular solution of the linear
nonhomogeneous recurrence

an = 6an−1 − 9an−2 + F (n)

have when F (n) = 3n , F (n) = n3n , F (n) = n2 2n , and


F (n) = (n2 + 1)3n ?
(p)
F (n) an
3n p0 n2 3n
n3n n2 (p1 n + p0 )3n
n 2 2n (p2 n2 + p1 n + p0 )2n

Prof. Steven Evans Discrete Mathematics


Applications of Recurrence Relations
Solving Linear Recurrence Relations

L.N.R.R.w.C.C.s

Example
What form does a particular solution of the linear
nonhomogeneous recurrence

an = 6an−1 − 9an−2 + F (n)

have when F (n) = 3n , F (n) = n3n , F (n) = n2 2n , and


F (n) = (n2 + 1)3n ?
(p)
F (n) an
3n p0 n2 3n
n3n n2 (p1 n + p0 )3n
n 2 2n (p2 n2 + p1 n + p0 )2n
(n2 + 1)3n n2 (p2 n2 + p1 n + p0 )3n

Prof. Steven Evans Discrete Mathematics

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy