Chapter 2

Download as pdf or txt
Download as pdf or txt
You are on page 1of 58

Chapter Two

Recurrence Relation

Fikre Bogale(PhD)

Addis Ababa University


Mathematics Department

October 14, 2024

1/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Outline

Outline
Introduction
Definitions on recurrence relation
Examples on recurrence relation

2/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Recurrence Relation

Introduction
There are many counting problems cannot be solved easily
using the methods discussed in the previous chapters.
To solve such problems we have to find relationships
between consecutive terms.
The rule for finding terms from those that precede them
is called a recurrence relation.

Example
1 The number of bacteria in a laboratory doubles every
hour. If a laboratory begins with five bacteria, how many
will be present in n hours?
2 Problem of Compound Interest in a bank.
3/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Recurrence Relation

Introduction
There are many counting problems cannot be solved easily
using the methods discussed in the previous chapters.
To solve such problems we have to find relationships
between consecutive terms.
The rule for finding terms from those that precede them
is called a recurrence relation.

Example
1 The number of bacteria in a laboratory doubles every
hour. If a laboratory begins with five bacteria, how many
will be present in n hours?
2 Problem of Compound Interest in a bank.
3/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Recurrence Relation

Introduction
There are many counting problems cannot be solved easily
using the methods discussed in the previous chapters.
To solve such problems we have to find relationships
between consecutive terms.
The rule for finding terms from those that precede them
is called a recurrence relation.

Example
1 The number of bacteria in a laboratory doubles every
hour. If a laboratory begins with five bacteria, how many
will be present in n hours?
2 Problem of Compound Interest in a bank.
3/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Recurrence Relation

Introduction
There are many counting problems cannot be solved easily
using the methods discussed in the previous chapters.
To solve such problems we have to find relationships
between consecutive terms.
The rule for finding terms from those that precede them
is called a recurrence relation.

Example
1 The number of bacteria in a laboratory doubles every
hour. If a laboratory begins with five bacteria, how many
will be present in n hours?
2 Problem of Compound Interest in a bank.
3/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Recurrence Relation

Definition
A recurrence relation for the sequence {an } is an equation that
expresses an in terms of one or more of the previous terms of
the sequence, namely, a0 , a1 , · · · , an−1 , for all integers n with
n ≥ n0 , where n0 is a non-negative integer.

Example
1 an = an−1 − an−2 , n ≥ 2 where a0 = 3, a1 = 5.
2 an − 2an−1 + 1 = 0
3 an + (n − 2)an−2 = n2 + 1
2
4 an+1 − an = 3, n ≥ 0, where a0 = 1.

4/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Recurrence Relation

Definition
A recurrence relation for the sequence {an } is an equation that
expresses an in terms of one or more of the previous terms of
the sequence, namely, a0 , a1 , · · · , an−1 , for all integers n with
n ≥ n0 , where n0 is a non-negative integer.

Example
1 an = an−1 − an−2 , n ≥ 2 where a0 = 3, a1 = 5.
2 an − 2an−1 + 1 = 0
3 an + (n − 2)an−2 = n2 + 1
2
4 an+1 − an = 3, n ≥ 0, where a0 = 1.

4/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Recurrence Relation
Definition
A sequence {an } is called a solution of a recurrence relation if
its terms satisfy the given recurrence relation.

Example 1
Determine whether the sequence {an } is a solution of the
recurrence relation an = 2an−1 − an−2 , ∀n ≥ 2 where
(a) an = 3n (b) an = 2n (c) an = 5

Solution
(a) The sequence {an } with an = 3n is the solution.
(b) The sequence {an } with an = 2n is not the solution.
(c) The sequence {an } with an = 5 is the solution.
5/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Recurrence Relation
Definition
A sequence {an } is called a solution of a recurrence relation if
its terms satisfy the given recurrence relation.

Example 1
Determine whether the sequence {an } is a solution of the
recurrence relation an = 2an−1 − an−2 , ∀n ≥ 2 where
(a) an = 3n (b) an = 2n (c) an = 5

Solution
(a) The sequence {an } with an = 3n is the solution.
(b) The sequence {an } with an = 2n is not the solution.
(c) The sequence {an } with an = 5 is the solution.
5/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Recurrence Relation
Definition
A sequence {an } is called a solution of a recurrence relation if
its terms satisfy the given recurrence relation.

Example 1
Determine whether the sequence {an } is a solution of the
recurrence relation an = 2an−1 − an−2 , ∀n ≥ 2 where
(a) an = 3n (b) an = 2n (c) an = 5

Solution
(a) The sequence {an } with an = 3n is the solution.
(b) The sequence {an } with an = 2n is not the solution.
(c) The sequence {an } with an = 5 is the solution.
5/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Recurrence Relation Model

Example 2 (Compound Interest)


Suppose that a person deposit P0 birr in a saving account at a
bank in I interest rate per year with interest compounded
annually. How much will be in the account after n years.

Solution

P1 = P0 + P0 I = P0 (1 + I )1 (1)
P2 = P1 + P1 I = P1 (1 + I ) = P0 (1 + I )2 (2)
P3 = P2 + P2 I = P2 (1 + I ) = P0 (1 + I )3 (3)

Hence, after n years the person has P0 (1 + I )n birr in the


account.
6/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Recurrence Relation Model

Example 2 (Compound Interest)


Suppose that a person deposit P0 birr in a saving account at a
bank in I interest rate per year with interest compounded
annually. How much will be in the account after n years.

Solution

P1 = P0 + P0 I = P0 (1 + I )1 (1)
P2 = P1 + P1 I = P1 (1 + I ) = P0 (1 + I )2 (2)
P3 = P2 + P2 I = P2 (1 + I ) = P0 (1 + I )3 (3)

Hence, after n years the person has P0 (1 + I )n birr in the


account.
6/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Recurrence Relation Model

Example 2 (Compound Interest)


Suppose that a person deposit P0 birr in a saving account at a
bank in I interest rate per year with interest compounded
annually. How much will be in the account after n years.

Solution

P1 = P0 + P0 I = P0 (1 + I )1 (1)
P2 = P1 + P1 I = P1 (1 + I ) = P0 (1 + I )2 (2)
P3 = P2 + P2 I = P2 (1 + I ) = P0 (1 + I )3 (3)

Hence, after n years the person has P0 (1 + I )n birr in the


account.
6/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Recurrence Relation Model

Example 3
The number of bacteria in a laboratory doubles every hour. If
a laboratory begins with five bacteria, then how many bacteria
will be present in n hours?

Solution
Let an be the no of bacteria at the end of n hours.
a0 = 5,
a1 = 2a0 , a2 = 2a1 = 22 a0 , a3 = 2a2 = 23 a0 , · · · , an = 2n a0
Hence, an = 2n a0 = 5(2)n , ∀n ≥ 0

7/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Types of Recurrence Relation
Consider a recurrence relation
C0 (n)an +C2 (n)an−1 +· · ·+Ck (n)an−k = f (n), where C0 (n) 6= 0 (1)

Constant coefficients
If all Ck (n) are constant numbers, then the recurrence relation
(1) is constant coefficient recurrence relation.

Linear
If the exponent of an−k is 1, then the recurrence relation (1) is
called linear otherwise non-linear.

Homogeneous
The recurrence relation (1) is said to be homogeneous if
f (n) = 0 otherwise non-homogeneous.
8/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Types of Recurrence Relation
Consider a recurrence relation
C0 (n)an +C2 (n)an−1 +· · ·+Ck (n)an−k = f (n), where C0 (n) 6= 0 (1)

Constant coefficients
If all Ck (n) are constant numbers, then the recurrence relation
(1) is constant coefficient recurrence relation.

Linear
If the exponent of an−k is 1, then the recurrence relation (1) is
called linear otherwise non-linear.

Homogeneous
The recurrence relation (1) is said to be homogeneous if
f (n) = 0 otherwise non-homogeneous.
8/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Types of Recurrence Relation
Consider a recurrence relation
C0 (n)an +C2 (n)an−1 +· · ·+Ck (n)an−k = f (n), where C0 (n) 6= 0 (1)

Constant coefficients
If all Ck (n) are constant numbers, then the recurrence relation
(1) is constant coefficient recurrence relation.

Linear
If the exponent of an−k is 1, then the recurrence relation (1) is
called linear otherwise non-linear.

Homogeneous
The recurrence relation (1) is said to be homogeneous if
f (n) = 0 otherwise non-homogeneous.
8/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Example
1 an = 3an−1 − 2an−2 , ∀n ≥ 3
2
2 an = an−1 + an−2 , ∀n ≥ 2
3 an = (n − 2) an−1 + n2 + 1
2

2
4 an = an−1 − 2an−2
5 an − 2an−1 − 1 = 0

Solution
1 Constant coefficient, linear and homogeneous
2 Constant coefficient, non-linear and homogeneous
3 non-Constant coefficient, linear and non-homogeneous
4 Constant coefficient, non-linear and homogeneous
5 Constant coefficient, linear and non-homogeneous

9/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Example
1 an = 3an−1 − 2an−2 , ∀n ≥ 3
2
2 an = an−1 + an−2 , ∀n ≥ 2
3 an = (n − 2) an−1 + n2 + 1
2

2
4 an = an−1 − 2an−2
5 an − 2an−1 − 1 = 0

Solution
1 Constant coefficient, linear and homogeneous
2 Constant coefficient, non-linear and homogeneous
3 non-Constant coefficient, linear and non-homogeneous
4 Constant coefficient, non-linear and homogeneous
5 Constant coefficient, linear and non-homogeneous

9/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Solving Linear Homogeneous Recurrence Relations
with Constant Coefficients
Consider a recurrence relation

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

The basic approach for solving such kind of recurrence


relations is to look for solutions of the form an = r n , where r
is a constant.
Note
an = r n is a solution of the recurrence relation

an = c1 an−1 + c2 an−2 + · · · + ck an−k (1)

if and only if

r n = c1 r n−1 + c2 r n−2 + · · · + ck r n−k (2)


10/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Solving Linear Homogeneous Recurrence Relations
with Constant Coefficients
If we divide both sides of equation (2) by an = r n−k we obtain
a characteristic equation
r k − c1 r k−1 − c2 r k−2 − · · · − ck = 0
Suppose
an + c1 a1 n − 1 + c2 an−2 + · · · + ck an−k = 0, n ≥ k
is the given k th order LHRRWCC. The essential steps in
solving are the following
Step1
Write the characteristic equation of the difference equation
which is the k th degree polynomial equation:

r k + c1 r k−1 + c2 r k−2 + · · · ck−1 r + ck = 0


11/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Solving Homogeneous Recurrence Relations

Step 2
Solve the characteristic (auxiliary) equation found in step 1
and determine all the characteristic roots of this equation.

Step 3
Write the general solution of the difference equation based on
any one of the following two cases.

Case 1
If there are k distinct characteristic roots, say r1 , r2 , r3 , · · · , rk
to the equation obtained in step 1, then the general solution is
of the form: an = α1 r1n + α2 r2n + α3 r3n + · · · + αk rkn

12/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Solving Homogeneous Recurrence Relations

Step 2
Solve the characteristic (auxiliary) equation found in step 1
and determine all the characteristic roots of this equation.

Step 3
Write the general solution of the difference equation based on
any one of the following two cases.

Case 1
If there are k distinct characteristic roots, say r1 , r2 , r3 , · · · , rk
to the equation obtained in step 1, then the general solution is
of the form: an = α1 r1n + α2 r2n + α3 r3n + · · · + αk rkn

12/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Solving Homogeneous Recurrence Relations

Step 2
Solve the characteristic (auxiliary) equation found in step 1
and determine all the characteristic roots of this equation.

Step 3
Write the general solution of the difference equation based on
any one of the following two cases.

Case 1
If there are k distinct characteristic roots, say r1 , r2 , r3 , · · · , rk
to the equation obtained in step 1, then the general solution is
of the form: an = α1 r1n + α2 r2n + α3 r3n + · · · + αk rkn

12/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Steps in Solving Recurrence Relation

Case 2
If there is a root r of multiplicity m, 2 ≤ m ≤ k, for the
auxiliary equation obtained in step 1, then the part of the
general solution that involves the root r has the form:

α0 r n + α1 nr n + α2 n2 r n + · · · + αm−1 nm−1 r n

In addition to the repeated root r , if r1 , r2 , · · · rk−m are


the k − m remaining distinct roots, then the general
solution is
an = α0 r n + α1 nr n + α2 n2 r n + · · · + αm−1 nm−1 r n
+β1 r1n + β2 r2n + · · · + βk−m rk−m
n

13/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Steps in Solving Recurrence Relation

Case 2
If there is a root r of multiplicity m, 2 ≤ m ≤ k, for the
auxiliary equation obtained in step 1, then the part of the
general solution that involves the root r has the form:

α0 r n + α1 nr n + α2 n2 r n + · · · + αm−1 nm−1 r n

In addition to the repeated root r , if r1 , r2 , · · · rk−m are


the k − m remaining distinct roots, then the general
solution is
an = α0 r n + α1 nr n + α2 n2 r n + · · · + αm−1 nm−1 r n
+β1 r1n + β2 r2n + · · · + βk−m rk−m
n

13/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Steps in Solving Recurrence Relation

Step 4
Use the initial conditions to determine the constants
α0 , α1 , · · · , αm−1 , β1 , β2 , · · · , βk−m in the general solution.

Step 5
Replace the specific values of the arbitrary constant obtained
in step 4 and write the unique (particular) solution.

14/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Steps in Solving Recurrence Relation

Step 4
Use the initial conditions to determine the constants
α0 , α1 , · · · , αm−1 , β1 , β2 , · · · , βk−m in the general solution.

Step 5
Replace the specific values of the arbitrary constant obtained
in step 4 and write the unique (particular) solution.

14/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Solving k th order Recurrence Relation
Solving First Order
Let cn an + cn−1 an−1 = 0 be 1st order homogeneous recurrence
relation.
Then

cn r + cn−1 = 0 is characteristic equation


−cn−1
r =
cn
 c n
n−1
Hence, an = αr n = α is the solution of relation
cn

Example
Solve the recurrence relation

an = 4an−1 , with a0 = 5 15/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Solving k th order Recurrence Relation
Solving First Order
Let cn an + cn−1 an−1 = 0 be 1st order homogeneous recurrence
relation.
Then

cn r + cn−1 = 0 is characteristic equation


−cn−1
r =
cn
 c n
n−1
Hence, an = αr n = α is the solution of relation
cn

Example
Solve the recurrence relation

an = 4an−1 , with a0 = 5 15/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Solving k th order Recurrence Relation
Solving Second Order
Let cn an + cn−1 an−1 + cn−2 an−2 = 0 be 2nd order homogeneous
recurrence relation.Then

cn r 2 + cn−1 r + cn−2 = 0 is characteristic equation

Now there are two possibilities of the solution of the


characteristic equation.
Case 1
If r1 and r2 are distinct roots of the characteristic equation
r 2 − c1 r − c2 = 0 of the recurrence relation
an = c1 an−1 + c2 an−2 , then the general solution has a form:

an = α1 r1n + α2 r2n
16/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Solving k th order Recurrence Relation
Solving Second Order
Let cn an + cn−1 an−1 + cn−2 an−2 = 0 be 2nd order homogeneous
recurrence relation.Then

cn r 2 + cn−1 r + cn−2 = 0 is characteristic equation

Now there are two possibilities of the solution of the


characteristic equation.
Case 1
If r1 and r2 are distinct roots of the characteristic equation
r 2 − c1 r − c2 = 0 of the recurrence relation
an = c1 an−1 + c2 an−2 , then the general solution has a form:

an = α1 r1n + α2 r2n
16/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Solving k th order Recurrence Relation
Solving Second Order
Let cn an + cn−1 an−1 + cn−2 an−2 = 0 be 2nd order homogeneous
recurrence relation.Then

cn r 2 + cn−1 r + cn−2 = 0 is characteristic equation

Now there are two possibilities of the solution of the


characteristic equation.
Case 1
If r1 and r2 are distinct roots of the characteristic equation
r 2 − c1 r − c2 = 0 of the recurrence relation
an = c1 an−1 + c2 an−2 , then the general solution has a form:

an = α1 r1n + α2 r2n
16/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Solving Linear Homogeneous Recurrence Relations
with Constant Coefficients
Example
Find the solution of the following recurrence relations
1 an = 5an−1 − 6an−2
2 an = an−1 + 2an−2 with a0 = 2 and a1 = 7

Solution
1 Let an = r n be a solution of the recurrence relation. Then

r n − 5r n−1 + 6r n−2 = 0
r 2 − 5r + 6 = 0, divided by r n−2
r1 = 3 and r2 = 2

Hence, an = α1 (3)n + α2 (2)n is the solution of the RR.


17/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Solving Linear Homogeneous Recurrence Relations
with Constant Coefficients
Example
Find the solution of the following recurrence relations
1 an = 5an−1 − 6an−2
2 an = an−1 + 2an−2 with a0 = 2 and a1 = 7

Solution
1 Let an = r n be a solution of the recurrence relation. Then

r n − 5r n−1 + 6r n−2 = 0
r 2 − 5r + 6 = 0, divided by r n−2
r1 = 3 and r2 = 2

Hence, an = α1 (3)n + α2 (2)n is the solution of the RR.


17/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Solving k th order Recurrence Relation
Case 2
If r1 and r2 are equal roots of the characteristic equation, then
the general solution has a form:

an = α1 r1n + α2 nr1n = (α1 + α2 n)r1n

Example
Solve the following recurrence relation
1 an = −3an−1 + 10an−2 , n ≥ 2
2 an = 4an−1 − 4an−2 , n ≥ 2 with a0 = 6 and a1 = 8

Solutions
1 an = α1 (2)n + α2 (−5)n
2 an = 6(2)n − 2n(2)n = (3 − n)(2)n+1
18/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Solving k th order Recurrence Relation
Case 2
If r1 and r2 are equal roots of the characteristic equation, then
the general solution has a form:

an = α1 r1n + α2 nr1n = (α1 + α2 n)r1n

Example
Solve the following recurrence relation
1 an = −3an−1 + 10an−2 , n ≥ 2
2 an = 4an−1 − 4an−2 , n ≥ 2 with a0 = 6 and a1 = 8

Solutions
1 an = α1 (2)n + α2 (−5)n
2 an = 6(2)n − 2n(2)n = (3 − n)(2)n+1
18/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Solving k th order Recurrence Relation
Case 2
If r1 and r2 are equal roots of the characteristic equation, then
the general solution has a form:

an = α1 r1n + α2 nr1n = (α1 + α2 n)r1n

Example
Solve the following recurrence relation
1 an = −3an−1 + 10an−2 , n ≥ 2
2 an = 4an−1 − 4an−2 , n ≥ 2 with a0 = 6 and a1 = 8

Solutions
1 an = α1 (2)n + α2 (−5)n
2 an = 6(2)n − 2n(2)n = (3 − n)(2)n+1
18/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Solving k th order Recurrence Relation

Solving k nd order
Let cn an + cn−1 an−1 + cn−2 an−2 + · · · + cn−k an−k = 0 be k th
order recurrence relation.Then

cn r k + cn−1 r k−1 + · · · + cn−k = 0 is characteristic equation

Case 1
If the characteristic equation has k distinct roots r1 , r2 , · · · , rk ,
then
an = α1 r1n + α2 r2n + · · · + αk rkn
is the general solution of the given recurrence relation.
Where α1 , α2 , · · · , αk are arbitrary constants which are
determined by initial conditions.
19/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Solving k th order Recurrence Relation

Solving k nd order
Let cn an + cn−1 an−1 + cn−2 an−2 + · · · + cn−k an−k = 0 be k th
order recurrence relation.Then

cn r k + cn−1 r k−1 + · · · + cn−k = 0 is characteristic equation

Case 1
If the characteristic equation has k distinct roots r1 , r2 , · · · , rk ,
then
an = α1 r1n + α2 r2n + · · · + αk rkn
is the general solution of the given recurrence relation.
Where α1 , α2 , · · · , αk are arbitrary constants which are
determined by initial conditions.
19/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Solving k th order Recurrence Relation
Case 2
If r1 = r2 = · · · = rm where m < k, then the general solution
becomes
an = (α1 +α2 n +α3 n2 · · ·+αm nm−1 )r1n +αm+1 rm+1 n
+· · ·+αk rkn
where ri 6= rj , ∀i, j > m

Example
Solve the following recurrence relation
1 an+3 − an+2 − 4an+1 + 4an = 0, n ≥ 0
2 an = −3an−1 − 3an−2 − an−3
3 an+3 − 3an+1 + 2an = 0
Solution (1)an = α1 2n + α2 (−2)n + α3
(2)an = α1 (−1)n + α2 n(−1)n + α3 n2 (−1)n
(3)an = α1 + α2 n + α3 (−2)n 20/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Solving k th order Recurrence Relation
Case 2
If r1 = r2 = · · · = rm where m < k, then the general solution
becomes
an = (α1 +α2 n +α3 n2 · · ·+αm nm−1 )r1n +αm+1 rm+1 n
+· · ·+αk rkn
where ri 6= rj , ∀i, j > m

Example
Solve the following recurrence relation
1 an+3 − an+2 − 4an+1 + 4an = 0, n ≥ 0
2 an = −3an−1 − 3an−2 − an−3
3 an+3 − 3an+1 + 2an = 0
Solution (1)an = α1 2n + α2 (−2)n + α3
(2)an = α1 (−1)n + α2 n(−1)n + α3 n2 (−1)n
(3)an = α1 + α2 n + α3 (−2)n 20/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Solving k th order Recurrence Relation
Case 2
If r1 = r2 = · · · = rm where m < k, then the general solution
becomes
an = (α1 +α2 n +α3 n2 · · ·+αm nm−1 )r1n +αm+1 rm+1 n
+· · ·+αk rkn
where ri 6= rj , ∀i, j > m

Example
Solve the following recurrence relation
1 an+3 − an+2 − 4an+1 + 4an = 0, n ≥ 0
2 an = −3an−1 − 3an−2 − an−3
3 an+3 − 3an+1 + 2an = 0
Solution (1)an = α1 2n + α2 (−2)n + α3
(2)an = α1 (−1)n + α2 n(−1)n + α3 n2 (−1)n
(3)an = α1 + α2 n + α3 (−2)n 20/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Solving non-homogeneous recurrence relation

Definition
The k th order non-homogeneous recurrence relation has the
form

cn an + cn−1 an−1 + · · · + cn−k an−k = f (n), where f (n) 6= 0

and then the recurrence relation

cn an + cn−1 an−1 + · · · + cn−k an−k = 0

is called the associated (corresponding) homogeneous


recurrence relation

21/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Solving non-homogeneous recurrence relation

Definition
The k th order non-homogeneous recurrence relation has the
form

cn an + cn−1 an−1 + · · · + cn−k an−k = f (n), where f (n) 6= 0

and then the recurrence relation

cn an + cn−1 an−1 + · · · + cn−k an−k = 0

is called the associated (corresponding) homogeneous


recurrence relation

21/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Solving non-homogeneous recurrence relation
General Solution
The general solution of the k th order non-homogeneous
recurrence relation has the form

an = an(h) + an(p) ,
(h)
where an is the general solution of the associated
(p)
homogeneous recurrence relation and an is a particular
solution for the given non-homogeneous recurrence relation.

To solve non-homogeneous recurrence relation there is no


general method for finding such a solution that works for every
f (n).
There are techniques that works for certain types of functions
f (n) such as polynomials and powers of constant numbers.
22/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Solving non-homogeneous recurrence relation
General Solution
The general solution of the k th order non-homogeneous
recurrence relation has the form

an = an(h) + an(p) ,
(h)
where an is the general solution of the associated
(p)
homogeneous recurrence relation and an is a particular
solution for the given non-homogeneous recurrence relation.

To solve non-homogeneous recurrence relation there is no


general method for finding such a solution that works for every
f (n).
There are techniques that works for certain types of functions
f (n) such as polynomials and powers of constant numbers.
22/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Solving non-homogeneous recurrence relation
Steps in solving non-homogeneous recurrence relation
Step 1
(h)
Find the general solution an of the associated homogeneous
recurrence relation.

Step 2
(p)
Find the particular solution an of the non-homogeneous
recurrence relation.
(p)
To find the particular solution an

If f (n) is polynomial of degree k, then the particular solution


has a form

an(p) = β1 nk + β2 nk−1 + · · · + βk
23/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Solving non-homogeneous recurrence relation

Example
1 Solve the non-homogeneous recurrence relation
an = 3an−1 + 2n.

Solution
Since the given recurrence relation an − 3an−1 = 2n is
non-homogeneous with f (n) = 2n.
(h)
The sequence an = α(3)n is the general solution of the
associated homogeneous RR.
(p)
Let an = β1 n + β2 be a particular solution. Then
(p)
an = −n − 3/2 is particular solution.
3
Hence, an = α(3)n − n − is the solution of the given
2
recurrence relation.
24/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Solving non-homogeneous recurrence relation
Example
1 Solve the non-homogeneous recurrence relation

an = an−1 + 2an−2 + n + 1

Solution
Since the given recurrence relation an − an−1 − 2an−2 = n + 1
is non-homogeneous with f (n) = n + 1.
(h)
The sequence an = α1 (−1)n + α2 (2)n is the general solution
of the associated homogeneous rec. r/n.
(p)
Let an = β1 n + β2 be a particular solution. Then
(p) 1 7
an = − n − is particular solution.
2 4
1 7
Hence, an = α1 (−1)n + α2 (2)n − n − is the solution of the
2 4
given recurrence relation. 25/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Solving non-homogeneous recurrence relation

If f (n) = kr n , n ≥ 1 where r , k are non-zero constants. Then


depending on r there are two different forms of particular
solutions.
Case 1
If r is not a root of a characteristic equation of the associated
homogeneous recurrence relation, then the particular solution
has the form an(p) = βr n , for some constant β.

Case 2
If r is a root of a characteristic equation of the associated
homogeneous recurrence relation, then the particular solution
has the form an(p) = βnr n , for some constant β.

26/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Solving non-homogeneous recurrence relation
Example
Solve the following non-homogeneous recurrence relation:

(a) an + 4an−1 − 21an−2 = 5(4)n , n ≥ 2


(b) an = 5an−1 − 6an−2 + 2n

Solution
(a) an = α1 (−7)n + α2 (3)n is the solution of associated
homogeneous recurrence relation.
(p)
Let an = β(4)n be a particular solution of the given
recurrence relation. Then
(p) 80
an = (4)n is a particular solution.
11
80
Hence, an = α1 (−7)n + α2 (3)n + (4)n is the general
11
solution of the recurrence relation.
27/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


(b) an = α1 (2)n + α2 (3)n is the solution of associated
homogeneous recurrence relation.
Since r = 2 is the solution of the characteristic equation
of the homogeneous recurrence relation.
(p)
Let an = βn(2)n be a particular solution of the given
recurrence relation. Then
(p)
an = −n(2)n+1 is a particular solution.
Hence, an = α1 (3)n + α2 (2)n − n(2)n+1 is the general
solution of the recurrence relation.

28/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


System of Linear Recurrence Relations
For two sequences an and bn , we will solve recurrence
relations of the form
(
an = pan−1 + qbn−1
ab = ran−1 + sbn−1

where p, q, r and s are arbitrary constants.


Example
Solve the system of recurrence relations
(
an + 2an−1 − 4bn−1 = 0 (1)
ab + 5an−1 − 7bn−1 = 0 (2)
with the initail condition a1 = 4 and b1 = 1.
29/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


Solution
1
From (1) we have, bn−1 = (an + 2an−1 ) (3)
4
Substituting (3) in to (2) gives,
1 1
(an+1 + 2an ) + 5an−1 − 7( (an+1 + 2an )) = 0
4 4
After simplification, we obtain

an+1 − 5an + 6an−1 = 0

Thus, an = α(2)n + β(3)n , where α and β are constants,


is the general solution to RR.
Substituting it in to (3) gives,
1
bn = (an+1 + 2an )
4
30/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


This implies that
1
bn = (α2n+1 + β3n+1 + 2(α(2)n + β(3)n ))
4
1
= (4α2n + 5β3n )
4
Using the given initial condition we have,

2α + 3β = 4
15
2α + β = 1
4
Solving this we get α = 8 and β = −4.
Hence,
(
an = 2n+3 − 4(3)n
bn = 2n+3 − 5(3)n (n ≥ 1)
31/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation


End

End of Chapter Two!!!

32/32

Fikre Bogale(PhD) Chapter Two Recurrence Relation

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