solution of linear homogeneous recurrence relations

60
Solution of Linear Homogeneous Recurrence Relations General Solutions for Homogeneous Problems Ioan Despi [email protected] University of New England September 16, 2013

Upload: others

Post on 15-Apr-2022

21 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Solution of Linear Homogeneous Recurrence Relations

Solution of Linear Homogeneous RecurrenceRelations

General Solutions for Homogeneous Problems

Ioan Despi

[email protected]

University of New England

September 16, 2013

Page 2: Solution of Linear Homogeneous Recurrence Relations

Outline

1 Introduction

2 Main TheoremExamples

3 General Procedure

4 More Examples

Ioan Despi – AMTH140 2 of 15

Page 3: Solution of Linear Homogeneous Recurrence Relations

Introduction

If the characteristic equation associated with a given π‘š-th order linear,constant coefficient, homogeneous recurrence relation has some repeatedroots, then the solution given by

βˆ‘οΈ€π΄π‘–πœ†

𝑛𝑖 will not have π‘š arbitrary

constants.

To see this, we assume for instance πœ†1 = πœ†2, i.e. root πœ†1 is repeated.

Then the solution π‘Žπ‘› =π‘šβˆ‘οΈπ‘–=1

π΄π‘–πœ†π‘›π‘– = (𝐴1 + 𝐴2)πœ†π‘›

2 + 𝐴3πœ†π‘›3 + Β· Β· Β· + π΄π‘šπœ†π‘›

π‘š

has less than π‘š arbitrary constants because 𝐴1 + 𝐴2 comprisesessentially only one arbitrary constant.

To make up for the missing ones, we introduce the following more generaltheorem.

Ioan Despi – AMTH140 3 of 15

Page 4: Solution of Linear Homogeneous Recurrence Relations

Introduction

If the characteristic equation associated with a given π‘š-th order linear,constant coefficient, homogeneous recurrence relation has some repeatedroots, then the solution given by

βˆ‘οΈ€π΄π‘–πœ†

𝑛𝑖 will not have π‘š arbitrary

constants.

To see this, we assume for instance πœ†1 = πœ†2, i.e. root πœ†1 is repeated.

Then the solution π‘Žπ‘› =π‘šβˆ‘οΈπ‘–=1

π΄π‘–πœ†π‘›π‘– = (𝐴1 + 𝐴2)πœ†π‘›

2 + 𝐴3πœ†π‘›3 + Β· Β· Β· + π΄π‘šπœ†π‘›

π‘š

has less than π‘š arbitrary constants because 𝐴1 + 𝐴2 comprisesessentially only one arbitrary constant.

To make up for the missing ones, we introduce the following more generaltheorem.

Ioan Despi – AMTH140 3 of 15

Page 5: Solution of Linear Homogeneous Recurrence Relations

Introduction

If the characteristic equation associated with a given π‘š-th order linear,constant coefficient, homogeneous recurrence relation has some repeatedroots, then the solution given by

βˆ‘οΈ€π΄π‘–πœ†

𝑛𝑖 will not have π‘š arbitrary

constants.

To see this, we assume for instance πœ†1 = πœ†2, i.e. root πœ†1 is repeated.

Then the solution π‘Žπ‘› =

π‘šβˆ‘οΈπ‘–=1

π΄π‘–πœ†π‘›π‘– = (𝐴1 + 𝐴2)πœ†π‘›

2 + 𝐴3πœ†π‘›3 + Β· Β· Β· + π΄π‘šπœ†π‘›

π‘š

has less than π‘š arbitrary constants because 𝐴1 + 𝐴2 comprisesessentially only one arbitrary constant.

To make up for the missing ones, we introduce the following more generaltheorem.

Ioan Despi – AMTH140 3 of 15

Page 6: Solution of Linear Homogeneous Recurrence Relations

Introduction

If the characteristic equation associated with a given π‘š-th order linear,constant coefficient, homogeneous recurrence relation has some repeatedroots, then the solution given by

βˆ‘οΈ€π΄π‘–πœ†

𝑛𝑖 will not have π‘š arbitrary

constants.

To see this, we assume for instance πœ†1 = πœ†2, i.e. root πœ†1 is repeated.

Then the solution π‘Žπ‘› =

π‘šβˆ‘οΈπ‘–=1

π΄π‘–πœ†π‘›π‘– = (𝐴1 + 𝐴2)πœ†π‘›

2 + 𝐴3πœ†π‘›3 + Β· Β· Β· + π΄π‘šπœ†π‘›

π‘š

has less than π‘š arbitrary constants because 𝐴1 + 𝐴2 comprisesessentially only one arbitrary constant.

To make up for the missing ones, we introduce the following more generaltheorem.

Ioan Despi – AMTH140 3 of 15

Page 7: Solution of Linear Homogeneous Recurrence Relations

Theorem

Suppose the characteristic equation of the linear, constant coefficientrecurrence relation

π‘π‘šπ‘Žπ‘›+π‘š + π‘π‘šβˆ’1π‘Žπ‘›+π‘šβˆ’1 + Β· Β· Β· + 𝑐1π‘Žπ‘›+1 + 𝑐0π‘Žπ‘› = 0, π‘π‘šπ‘0 ΜΈ= 0, 𝑛 β‰₯ 0

has the following roots (all roots accounted for)

π‘š1⏞ ⏟ πœ†1, Β· Β· Β· , πœ†1 ,

π‘š2⏞ ⏟ πœ†2, Β· Β· Β· , πœ†2 , Β· Β· Β· ,

π‘šπ‘˜βž ⏟ πœ†π‘˜, Β· Β· Β· , πœ†π‘˜

such that πœ†1, Β· Β· Β· , πœ†π‘˜ are distinct, π‘š1, Β· Β· Β· ,π‘šπ‘˜ β‰₯ 1 and π‘š1 + Β· Β· Β· + π‘šπ‘˜ = π‘š.Then the general solution of the recurrence relation is

π‘Žπ‘› =

π‘˜βˆ‘οΈπ‘–=1

⎑⎣(οΈ‚π‘šπ‘–βˆ’1βˆ‘οΈπ‘—=0

𝐴𝑖,𝑗𝑛𝑗

)οΈ‚πœ†π‘›π‘–

⎀⎦ , 𝑖.𝑒.,

π‘Žπ‘› =(︀𝐴1,0 + 𝐴1,1𝑛 + Β· Β· Β· + 𝐴1,π‘š1βˆ’1𝑛

π‘š1βˆ’1)οΈ€πœ†π‘›1

+(︀𝐴2,0 + 𝐴2,1𝑛 + Β· Β· Β· + 𝐴2,π‘š2βˆ’1𝑛

π‘š2βˆ’1))οΈ€πœ†π‘›2 + Β· Β· Β·

+(οΈ€π΄π‘˜,0 + π΄π‘˜,1𝑛 + Β· Β· Β· + π΄π‘˜,π‘šπ‘˜βˆ’1𝑛

π‘šπ‘˜βˆ’1)οΈ€πœ†π‘›π‘˜

where 𝐴𝑖,𝑗, for 𝑖 = 1, Β· Β· Β· , π‘˜ and 𝑗 = 0, Β· Β· Β· ,π‘šπ‘– βˆ’ 1 are arbitrary constants.

Ioan Despi – AMTH140 4 of 15

Page 8: Solution of Linear Homogeneous Recurrence Relations

Notes

So, if the characteristic equation has a root of, say, πœ† = 3 that occurstwice (called having multiplicity 2) then in the solution 3𝑛 is multipliedby a polynomial of degree one less that the multiplicity.

I that is of degree one, a linear polynomial: (𝐴𝑛+𝐡)3𝑛.

If the root was πœ† = 4 of multiplicity 3 then 4𝑛 is multiplied by apolynomial of degree 2: (𝐴𝑛2 + 𝐡𝑛 + 𝐢)4𝑛.

If the root was πœ† = 5 of multiplicity 4 then 5𝑛 is multiplied by apolynomial of degree 3: (𝐴𝑛3 + 𝐡𝑛2 + 𝐢𝑛 + 𝐷)5𝑛.

etc.

Ioan Despi – AMTH140 5 of 15

Page 9: Solution of Linear Homogeneous Recurrence Relations

Notes

So, if the characteristic equation has a root of, say, πœ† = 3 that occurstwice (called having multiplicity 2) then in the solution 3𝑛 is multipliedby a polynomial of degree one less that the multiplicity.

I that is of degree one, a linear polynomial: (𝐴𝑛+𝐡)3𝑛.

If the root was πœ† = 4 of multiplicity 3 then 4𝑛 is multiplied by apolynomial of degree 2: (𝐴𝑛2 + 𝐡𝑛 + 𝐢)4𝑛.

If the root was πœ† = 5 of multiplicity 4 then 5𝑛 is multiplied by apolynomial of degree 3: (𝐴𝑛3 + 𝐡𝑛2 + 𝐢𝑛 + 𝐷)5𝑛.

etc.

Ioan Despi – AMTH140 5 of 15

Page 10: Solution of Linear Homogeneous Recurrence Relations

Notes

So, if the characteristic equation has a root of, say, πœ† = 3 that occurstwice (called having multiplicity 2) then in the solution 3𝑛 is multipliedby a polynomial of degree one less that the multiplicity.

I that is of degree one, a linear polynomial: (𝐴𝑛+𝐡)3𝑛.

If the root was πœ† = 4 of multiplicity 3 then 4𝑛 is multiplied by apolynomial of degree 2: (𝐴𝑛2 + 𝐡𝑛 + 𝐢)4𝑛.

If the root was πœ† = 5 of multiplicity 4 then 5𝑛 is multiplied by apolynomial of degree 3: (𝐴𝑛3 + 𝐡𝑛2 + 𝐢𝑛 + 𝐷)5𝑛.

etc.

Ioan Despi – AMTH140 5 of 15

Page 11: Solution of Linear Homogeneous Recurrence Relations

Notes

So, if the characteristic equation has a root of, say, πœ† = 3 that occurstwice (called having multiplicity 2) then in the solution 3𝑛 is multipliedby a polynomial of degree one less that the multiplicity.

I that is of degree one, a linear polynomial: (𝐴𝑛+𝐡)3𝑛.

If the root was πœ† = 4 of multiplicity 3 then 4𝑛 is multiplied by apolynomial of degree 2: (𝐴𝑛2 + 𝐡𝑛 + 𝐢)4𝑛.

If the root was πœ† = 5 of multiplicity 4 then 5𝑛 is multiplied by apolynomial of degree 3: (𝐴𝑛3 + 𝐡𝑛2 + 𝐢𝑛 + 𝐷)5𝑛.

etc.

Ioan Despi – AMTH140 5 of 15

Page 12: Solution of Linear Homogeneous Recurrence Relations

Notes

So, if the characteristic equation has a root of, say, πœ† = 3 that occurstwice (called having multiplicity 2) then in the solution 3𝑛 is multipliedby a polynomial of degree one less that the multiplicity.

I that is of degree one, a linear polynomial: (𝐴𝑛+𝐡)3𝑛.

If the root was πœ† = 4 of multiplicity 3 then 4𝑛 is multiplied by apolynomial of degree 2: (𝐴𝑛2 + 𝐡𝑛 + 𝐢)4𝑛.

If the root was πœ† = 5 of multiplicity 4 then 5𝑛 is multiplied by apolynomial of degree 3: (𝐴𝑛3 + 𝐡𝑛2 + 𝐢𝑛 + 𝐷)5𝑛.

etc.

Ioan Despi – AMTH140 5 of 15

Page 13: Solution of Linear Homogeneous Recurrence Relations

Example 1

Example

Find a particular solution of

𝑓(𝑛 + 2) + 4𝑓(𝑛 + 1) + 4𝑓(𝑛) = 0, 𝑛 β‰₯ 0

with initial conditions 𝑓(0) = 1 and 𝑓(1) = 2.

Solution. For clarity, we split the solution procedure into three steps below.

(a) The associated characteristic equation is πœ†2 + 4πœ† + 4 = 0 which hasa repeated root πœ†1 = βˆ’2, i.e., π‘š1 = 2, π‘˜ = 1.

(b) The general solution from the theorem in this lecture is thus

𝑓(𝑛) = (𝐴1,0 + 𝐴1,1𝑛)πœ†π‘›1 = (𝐡0 + 𝐡1𝑛)(βˆ’2)𝑛 ,

where 𝐡0 = 𝐴1,0 and 𝐡1 = 𝐴1,1 are arbitrary constants.(c) Constants 𝐡0 and 𝐡1 are to be determined from the initial conditions

𝑓(0) = (𝐡0 + 𝐡1 Γ— 0)(βˆ’2)0 = 1𝑓(1) = (𝐡0 + 𝐡1 Γ— 1)(βˆ’2)1 = 2

⇔ 𝐡0 = 1βˆ’2(𝐡0 + 𝐡1) = 2 .

They are thus 𝐡0 = 1 and 𝐡1 = βˆ’2. Hence the requested particular

solution is 𝑓(𝑛) = (1 βˆ’ 2𝑛)(βˆ’2)𝑛 , 𝑛 β‰₯ 0 .

Ioan Despi – AMTH140 6 of 15

Page 14: Solution of Linear Homogeneous Recurrence Relations

Example 1

Example

Find a particular solution of

𝑓(𝑛 + 2) + 4𝑓(𝑛 + 1) + 4𝑓(𝑛) = 0, 𝑛 β‰₯ 0

with initial conditions 𝑓(0) = 1 and 𝑓(1) = 2.

Solution. For clarity, we split the solution procedure into three steps below.

(a) The associated characteristic equation is πœ†2 + 4πœ† + 4 = 0 which hasa repeated root πœ†1 = βˆ’2, i.e., π‘š1 = 2, π‘˜ = 1.

(b) The general solution from the theorem in this lecture is thus

𝑓(𝑛) = (𝐴1,0 + 𝐴1,1𝑛)πœ†π‘›1 = (𝐡0 + 𝐡1𝑛)(βˆ’2)𝑛 ,

where 𝐡0 = 𝐴1,0 and 𝐡1 = 𝐴1,1 are arbitrary constants.(c) Constants 𝐡0 and 𝐡1 are to be determined from the initial conditions

𝑓(0) = (𝐡0 + 𝐡1 Γ— 0)(βˆ’2)0 = 1𝑓(1) = (𝐡0 + 𝐡1 Γ— 1)(βˆ’2)1 = 2

⇔ 𝐡0 = 1βˆ’2(𝐡0 + 𝐡1) = 2 .

They are thus 𝐡0 = 1 and 𝐡1 = βˆ’2. Hence the requested particular

solution is 𝑓(𝑛) = (1 βˆ’ 2𝑛)(βˆ’2)𝑛 , 𝑛 β‰₯ 0 .

Ioan Despi – AMTH140 6 of 15

Page 15: Solution of Linear Homogeneous Recurrence Relations

Example 1

Example

Find a particular solution of

𝑓(𝑛 + 2) + 4𝑓(𝑛 + 1) + 4𝑓(𝑛) = 0, 𝑛 β‰₯ 0

with initial conditions 𝑓(0) = 1 and 𝑓(1) = 2.

Solution. For clarity, we split the solution procedure into three steps below.

(a) The associated characteristic equation is πœ†2 + 4πœ† + 4 = 0 which hasa repeated root πœ†1 = βˆ’2, i.e., π‘š1 = 2, π‘˜ = 1.

(b) The general solution from the theorem in this lecture is thus

𝑓(𝑛) = (𝐴1,0 + 𝐴1,1𝑛)πœ†π‘›1 = (𝐡0 + 𝐡1𝑛)(βˆ’2)𝑛 ,

where 𝐡0 = 𝐴1,0 and 𝐡1 = 𝐴1,1 are arbitrary constants.

(c) Constants 𝐡0 and 𝐡1 are to be determined from the initial conditions

𝑓(0) = (𝐡0 + 𝐡1 Γ— 0)(βˆ’2)0 = 1𝑓(1) = (𝐡0 + 𝐡1 Γ— 1)(βˆ’2)1 = 2

⇔ 𝐡0 = 1βˆ’2(𝐡0 + 𝐡1) = 2 .

They are thus 𝐡0 = 1 and 𝐡1 = βˆ’2. Hence the requested particular

solution is 𝑓(𝑛) = (1 βˆ’ 2𝑛)(βˆ’2)𝑛 , 𝑛 β‰₯ 0 .

Ioan Despi – AMTH140 6 of 15

Page 16: Solution of Linear Homogeneous Recurrence Relations

Example 1

Example

Find a particular solution of

𝑓(𝑛 + 2) + 4𝑓(𝑛 + 1) + 4𝑓(𝑛) = 0, 𝑛 β‰₯ 0

with initial conditions 𝑓(0) = 1 and 𝑓(1) = 2.

Solution. For clarity, we split the solution procedure into three steps below.

(a) The associated characteristic equation is πœ†2 + 4πœ† + 4 = 0 which hasa repeated root πœ†1 = βˆ’2, i.e., π‘š1 = 2, π‘˜ = 1.

(b) The general solution from the theorem in this lecture is thus

𝑓(𝑛) = (𝐴1,0 + 𝐴1,1𝑛)πœ†π‘›1 = (𝐡0 + 𝐡1𝑛)(βˆ’2)𝑛 ,

where 𝐡0 = 𝐴1,0 and 𝐡1 = 𝐴1,1 are arbitrary constants.(c) Constants 𝐡0 and 𝐡1 are to be determined from the initial conditions

𝑓(0) = (𝐡0 + 𝐡1 Γ— 0)(βˆ’2)0 = 1𝑓(1) = (𝐡0 + 𝐡1 Γ— 1)(βˆ’2)1 = 2

⇔ 𝐡0 = 1βˆ’2(𝐡0 + 𝐡1) = 2 .

They are thus 𝐡0 = 1 and 𝐡1 = βˆ’2. Hence the requested particular

solution is 𝑓(𝑛) = (1 βˆ’ 2𝑛)(βˆ’2)𝑛 , 𝑛 β‰₯ 0 .Ioan Despi – AMTH140 6 of 15

Page 17: Solution of Linear Homogeneous Recurrence Relations

Example 2

Example

Find the general solution of

π‘Žπ‘›+3 βˆ’ 3π‘Žπ‘›+2 + 4π‘Žπ‘› = 0 , 𝑛 β‰₯ 0

Solution.

The associated characteristic equation is 𝐹 (πœ†)def= πœ†3 βˆ’ 3πœ†2 + 4 = 0 .

Although there are formulae to give explicit roots for a third orderpolynomial in terms of its coefficients, we are taking a shortcut here byguessing one root πœ†1 = βˆ’1.

I We can check that πœ†1 = βˆ’1 is indeed a root by verifying𝐹 (βˆ’1) = (βˆ’1)3 βˆ’ 3(βˆ’1)2 + 4 = 0.

To find the remaining roots, we first factorise 𝐹 (πœ†) by performing a long

division:

Ioan Despi – AMTH140 7 of 15

Page 18: Solution of Linear Homogeneous Recurrence Relations

Example 2

Example

Find the general solution of

π‘Žπ‘›+3 βˆ’ 3π‘Žπ‘›+2 + 4π‘Žπ‘› = 0 , 𝑛 β‰₯ 0

Solution.

The associated characteristic equation is 𝐹 (πœ†)def= πœ†3 βˆ’ 3πœ†2 + 4 = 0 .

Although there are formulae to give explicit roots for a third orderpolynomial in terms of its coefficients, we are taking a shortcut here byguessing one root πœ†1 = βˆ’1.

I We can check that πœ†1 = βˆ’1 is indeed a root by verifying𝐹 (βˆ’1) = (βˆ’1)3 βˆ’ 3(βˆ’1)2 + 4 = 0.

To find the remaining roots, we first factorise 𝐹 (πœ†) by performing a long

division:

Ioan Despi – AMTH140 7 of 15

Page 19: Solution of Linear Homogeneous Recurrence Relations

Example 2

Example

Find the general solution of

π‘Žπ‘›+3 βˆ’ 3π‘Žπ‘›+2 + 4π‘Žπ‘› = 0 , 𝑛 β‰₯ 0

Solution.

The associated characteristic equation is 𝐹 (πœ†)def= πœ†3 βˆ’ 3πœ†2 + 4 = 0 .

Although there are formulae to give explicit roots for a third orderpolynomial in terms of its coefficients, we are taking a shortcut here byguessing one root πœ†1 = βˆ’1.

I We can check that πœ†1 = βˆ’1 is indeed a root by verifying𝐹 (βˆ’1) = (βˆ’1)3 βˆ’ 3(βˆ’1)2 + 4 = 0.

To find the remaining roots, we first factorise 𝐹 (πœ†) by performing a long

division:

Ioan Despi – AMTH140 7 of 15

Page 20: Solution of Linear Homogeneous Recurrence Relations

Example 2

Example

Find the general solution of

π‘Žπ‘›+3 βˆ’ 3π‘Žπ‘›+2 + 4π‘Žπ‘› = 0 , 𝑛 β‰₯ 0

Solution.

The associated characteristic equation is 𝐹 (πœ†)def= πœ†3 βˆ’ 3πœ†2 + 4 = 0 .

Although there are formulae to give explicit roots for a third orderpolynomial in terms of its coefficients, we are taking a shortcut here byguessing one root πœ†1 = βˆ’1.

I We can check that πœ†1 = βˆ’1 is indeed a root by verifying𝐹 (βˆ’1) = (βˆ’1)3 βˆ’ 3(βˆ’1)2 + 4 = 0.

To find the remaining roots, we first factorise 𝐹 (πœ†) by performing a long

division:

Ioan Despi – AMTH140 7 of 15

Page 21: Solution of Linear Homogeneous Recurrence Relations

Example 2

Example

Find the general solution of

π‘Žπ‘›+3 βˆ’ 3π‘Žπ‘›+2 + 4π‘Žπ‘› = 0 , 𝑛 β‰₯ 0

Solution.

The associated characteristic equation is 𝐹 (πœ†)def= πœ†3 βˆ’ 3πœ†2 + 4 = 0 .

Although there are formulae to give explicit roots for a third orderpolynomial in terms of its coefficients, we are taking a shortcut here byguessing one root πœ†1 = βˆ’1.

I We can check that πœ†1 = βˆ’1 is indeed a root by verifying𝐹 (βˆ’1) = (βˆ’1)3 βˆ’ 3(βˆ’1)2 + 4 = 0.

To find the remaining roots, we first factorise 𝐹 (πœ†) by performing a long

division:

Ioan Despi – AMTH140 7 of 15

Page 22: Solution of Linear Homogeneous Recurrence Relations

Example 2

πœ†2 βˆ’4πœ† +4

βŽ πœ† + 1 πœ†3 βˆ’3πœ†2 +4

πœ†3 + πœ†2

βˆ’4πœ†2 0βˆ’4πœ†2 βˆ’4πœ†

4πœ† +44πœ† +4

0

which implies πœ†3 βˆ’ 3πœ†2 + 4 = (πœ† + 1)(πœ†2 βˆ’ 4πœ† + 4) = (πœ† + 1)(πœ†βˆ’ 2)2.

Therefore all the roots, counting the corresponding multiplicity, areβˆ’1 , 2 , 2, i.e. πœ†1 = βˆ’1, π‘š1 = 1 and πœ†2 = 2, π‘š2 = 2.

Hence the general solution reads (with 𝐴 = 𝐴1,0, 𝐡 = 𝐴2,0, 𝐢 = 𝐴2,1)

π‘Žπ‘› = 𝐴(βˆ’1)𝑛 + (𝐡 + 𝐢𝑛)2𝑛 , 𝑛 β‰₯ 0 .

Ioan Despi – AMTH140 8 of 15

Page 23: Solution of Linear Homogeneous Recurrence Relations

Example 2

πœ†2 βˆ’4πœ† +4

βŽ πœ† + 1 πœ†3 βˆ’3πœ†2 +4

πœ†3 + πœ†2

βˆ’4πœ†2 0βˆ’4πœ†2 βˆ’4πœ†

4πœ† +44πœ† +4

0

which implies πœ†3 βˆ’ 3πœ†2 + 4 = (πœ† + 1)(πœ†2 βˆ’ 4πœ† + 4) = (πœ† + 1)(πœ†βˆ’ 2)2.Therefore all the roots, counting the corresponding multiplicity, areβˆ’1 , 2 , 2, i.e. πœ†1 = βˆ’1, π‘š1 = 1 and πœ†2 = 2, π‘š2 = 2.

Hence the general solution reads (with 𝐴 = 𝐴1,0, 𝐡 = 𝐴2,0, 𝐢 = 𝐴2,1)

π‘Žπ‘› = 𝐴(βˆ’1)𝑛 + (𝐡 + 𝐢𝑛)2𝑛 , 𝑛 β‰₯ 0 .

Ioan Despi – AMTH140 8 of 15

Page 24: Solution of Linear Homogeneous Recurrence Relations

Example 2

πœ†2 βˆ’4πœ† +4

βŽ πœ† + 1 πœ†3 βˆ’3πœ†2 +4

πœ†3 + πœ†2

βˆ’4πœ†2 0βˆ’4πœ†2 βˆ’4πœ†

4πœ† +44πœ† +4

0

which implies πœ†3 βˆ’ 3πœ†2 + 4 = (πœ† + 1)(πœ†2 βˆ’ 4πœ† + 4) = (πœ† + 1)(πœ†βˆ’ 2)2.Therefore all the roots, counting the corresponding multiplicity, areβˆ’1 , 2 , 2, i.e. πœ†1 = βˆ’1, π‘š1 = 1 and πœ†2 = 2, π‘š2 = 2.

Hence the general solution reads (with 𝐴 = 𝐴1,0, 𝐡 = 𝐴2,0, 𝐢 = 𝐴2,1)

π‘Žπ‘› = 𝐴(βˆ’1)𝑛 + (𝐡 + 𝐢𝑛)2𝑛 , 𝑛 β‰₯ 0 .

Ioan Despi – AMTH140 8 of 15

Page 25: Solution of Linear Homogeneous Recurrence Relations

Example 3

Example

Find the particular solution of

𝑒𝑛+3 + 3𝑒𝑛+2 + 3𝑒𝑛+1 + 𝑒𝑛 = 0 , 𝑛 β‰₯ 0

satisfying the initial conditions 𝑒0 = 1, 𝑒1 = 1 and 𝑒2 = βˆ’7.

Solution.

(a) The associated characteristic equation πœ†3 + 3πœ†2 + 3πœ†+ 1 ≑ (πœ†+ 1)3 = 0 has

roots πœ†1 = βˆ’1 with multiplicity π‘š1 = 3.

(b) The general solution then reads for arbitrary constants 𝐴, 𝐡 and 𝐢

𝑒𝑛 = (𝐴+𝐡𝑛+ 𝐢𝑛2)(βˆ’1)𝑛 , 𝑛 β‰₯ 0

(c) To determine 𝐴,𝐡 and 𝐢 through the use of the initial conditions, we set 𝑛 inthe solution expression in (b) to 0, 1 and 2 respectively, then

𝑒0 gives 𝐴 = 1𝑒1 gives (𝐴+𝐡 + 𝐢)(βˆ’1) = 1𝑒2 gives 𝐴+ 2𝐡 + 4𝐢 = βˆ’7 .

The solution of these 3 equations, 𝐴 = 1, 𝐡 = 0, 𝐢 = βˆ’2. , finally produces

the required particular solution 𝑒𝑛 = (1βˆ’ 2𝑛2)(βˆ’1)𝑛 , 𝑛 β‰₯ 0

Ioan Despi – AMTH140 9 of 15

Page 26: Solution of Linear Homogeneous Recurrence Relations

Example 3

Example

Find the particular solution of

𝑒𝑛+3 + 3𝑒𝑛+2 + 3𝑒𝑛+1 + 𝑒𝑛 = 0 , 𝑛 β‰₯ 0

satisfying the initial conditions 𝑒0 = 1, 𝑒1 = 1 and 𝑒2 = βˆ’7.

Solution.

(a) The associated characteristic equation πœ†3 + 3πœ†2 + 3πœ†+ 1 ≑ (πœ†+ 1)3 = 0 has

roots πœ†1 = βˆ’1 with multiplicity π‘š1 = 3.

(b) The general solution then reads for arbitrary constants 𝐴, 𝐡 and 𝐢

𝑒𝑛 = (𝐴+𝐡𝑛+ 𝐢𝑛2)(βˆ’1)𝑛 , 𝑛 β‰₯ 0

(c) To determine 𝐴,𝐡 and 𝐢 through the use of the initial conditions, we set 𝑛 inthe solution expression in (b) to 0, 1 and 2 respectively, then

𝑒0 gives 𝐴 = 1𝑒1 gives (𝐴+𝐡 + 𝐢)(βˆ’1) = 1𝑒2 gives 𝐴+ 2𝐡 + 4𝐢 = βˆ’7 .

The solution of these 3 equations, 𝐴 = 1, 𝐡 = 0, 𝐢 = βˆ’2. , finally produces

the required particular solution 𝑒𝑛 = (1βˆ’ 2𝑛2)(βˆ’1)𝑛 , 𝑛 β‰₯ 0

Ioan Despi – AMTH140 9 of 15

Page 27: Solution of Linear Homogeneous Recurrence Relations

Example 3

Example

Find the particular solution of

𝑒𝑛+3 + 3𝑒𝑛+2 + 3𝑒𝑛+1 + 𝑒𝑛 = 0 , 𝑛 β‰₯ 0

satisfying the initial conditions 𝑒0 = 1, 𝑒1 = 1 and 𝑒2 = βˆ’7.

Solution.

(a) The associated characteristic equation πœ†3 + 3πœ†2 + 3πœ†+ 1 ≑ (πœ†+ 1)3 = 0 has

roots πœ†1 = βˆ’1 with multiplicity π‘š1 = 3.

(b) The general solution then reads for arbitrary constants 𝐴, 𝐡 and 𝐢

𝑒𝑛 = (𝐴+𝐡𝑛+ 𝐢𝑛2)(βˆ’1)𝑛 , 𝑛 β‰₯ 0

(c) To determine 𝐴,𝐡 and 𝐢 through the use of the initial conditions, we set 𝑛 inthe solution expression in (b) to 0, 1 and 2 respectively, then

𝑒0 gives 𝐴 = 1𝑒1 gives (𝐴+𝐡 + 𝐢)(βˆ’1) = 1𝑒2 gives 𝐴+ 2𝐡 + 4𝐢 = βˆ’7 .

The solution of these 3 equations, 𝐴 = 1, 𝐡 = 0, 𝐢 = βˆ’2. , finally produces

the required particular solution 𝑒𝑛 = (1βˆ’ 2𝑛2)(βˆ’1)𝑛 , 𝑛 β‰₯ 0

Ioan Despi – AMTH140 9 of 15

Page 28: Solution of Linear Homogeneous Recurrence Relations

Example 3

Example

Find the particular solution of

𝑒𝑛+3 + 3𝑒𝑛+2 + 3𝑒𝑛+1 + 𝑒𝑛 = 0 , 𝑛 β‰₯ 0

satisfying the initial conditions 𝑒0 = 1, 𝑒1 = 1 and 𝑒2 = βˆ’7.

Solution.

(a) The associated characteristic equation πœ†3 + 3πœ†2 + 3πœ†+ 1 ≑ (πœ†+ 1)3 = 0 has

roots πœ†1 = βˆ’1 with multiplicity π‘š1 = 3.

(b) The general solution then reads for arbitrary constants 𝐴, 𝐡 and 𝐢

𝑒𝑛 = (𝐴+𝐡𝑛+ 𝐢𝑛2)(βˆ’1)𝑛 , 𝑛 β‰₯ 0

(c) To determine 𝐴,𝐡 and 𝐢 through the use of the initial conditions, we set 𝑛 inthe solution expression in (b) to 0, 1 and 2 respectively, then

𝑒0 gives 𝐴 = 1𝑒1 gives (𝐴+𝐡 + 𝐢)(βˆ’1) = 1𝑒2 gives 𝐴+ 2𝐡 + 4𝐢 = βˆ’7 .

The solution of these 3 equations, 𝐴 = 1, 𝐡 = 0, 𝐢 = βˆ’2. , finally produces

the required particular solution 𝑒𝑛 = (1βˆ’ 2𝑛2)(βˆ’1)𝑛 , 𝑛 β‰₯ 0Ioan Despi – AMTH140 9 of 15

Page 29: Solution of Linear Homogeneous Recurrence Relations

General Procedure

The general process for solving linear homogeneous recurrence relations withconstant coefficients is like this:

1 Find the characteristic equation.

2 Find the characteristic roots.

3 Find the general solution.

4 Use the initial conditions to find the specific solution.

Ioan Despi – AMTH140 10 of 15

Page 30: Solution of Linear Homogeneous Recurrence Relations

General Procedure

The general process for solving linear homogeneous recurrence relations withconstant coefficients is like this:

1 Find the characteristic equation.

2 Find the characteristic roots.

3 Find the general solution.

4 Use the initial conditions to find the specific solution.

Ioan Despi – AMTH140 10 of 15

Page 31: Solution of Linear Homogeneous Recurrence Relations

General Procedure

The general process for solving linear homogeneous recurrence relations withconstant coefficients is like this:

1 Find the characteristic equation.

2 Find the characteristic roots.

3 Find the general solution.

4 Use the initial conditions to find the specific solution.

Ioan Despi – AMTH140 10 of 15

Page 32: Solution of Linear Homogeneous Recurrence Relations

General Procedure

The general process for solving linear homogeneous recurrence relations withconstant coefficients is like this:

1 Find the characteristic equation.

2 Find the characteristic roots.

3 Find the general solution.

4 Use the initial conditions to find the specific solution.

Ioan Despi – AMTH140 10 of 15

Page 33: Solution of Linear Homogeneous Recurrence Relations

More Examples

Example

Solve the following (shifted Fibonacci) recurrence relation:

𝑓𝑛 = π‘“π‘›βˆ’1 + π‘“π‘›βˆ’2, 𝑓0 = 0, and 𝑓1 = 1

Solution.

1 The characteristic equation is πœ†2 βˆ’ πœ†βˆ’ 1 = 0

2 The roots are πœ†1 = 1+√5

2 and πœ†2 = 1βˆ’βˆš5

2

3 The general solution is 𝑓𝑛 = 𝐴(︁

1+√5

2

)︁𝑛

+ 𝐡(︁

1βˆ’βˆš5

2

)︁𝑛

4 Use the initial conditions to find the specific solution

𝑓𝑛 = 1√5

(︁1+

√5

2

)︁𝑛

βˆ’ 1√5

(︁1βˆ’

√5

2

)︁𝑛

Ioan Despi – AMTH140 11 of 15

Page 34: Solution of Linear Homogeneous Recurrence Relations

More Examples

Example

Solve the following (shifted Fibonacci) recurrence relation:

𝑓𝑛 = π‘“π‘›βˆ’1 + π‘“π‘›βˆ’2, 𝑓0 = 0, and 𝑓1 = 1

Solution.

1 The characteristic equation is πœ†2 βˆ’ πœ†βˆ’ 1 = 0

2 The roots are πœ†1 = 1+√5

2 and πœ†2 = 1βˆ’βˆš5

2

3 The general solution is 𝑓𝑛 = 𝐴(︁

1+√5

2

)︁𝑛

+ 𝐡(︁

1βˆ’βˆš5

2

)︁𝑛

4 Use the initial conditions to find the specific solution

𝑓𝑛 = 1√5

(︁1+

√5

2

)︁𝑛

βˆ’ 1√5

(︁1βˆ’

√5

2

)︁𝑛

Ioan Despi – AMTH140 11 of 15

Page 35: Solution of Linear Homogeneous Recurrence Relations

More Examples

Example

Solve the following (shifted Fibonacci) recurrence relation:

𝑓𝑛 = π‘“π‘›βˆ’1 + π‘“π‘›βˆ’2, 𝑓0 = 0, and 𝑓1 = 1

Solution.

1 The characteristic equation is πœ†2 βˆ’ πœ†βˆ’ 1 = 0

2 The roots are πœ†1 = 1+√5

2 and πœ†2 = 1βˆ’βˆš5

2

3 The general solution is 𝑓𝑛 = 𝐴(︁

1+√5

2

)︁𝑛

+ 𝐡(︁

1βˆ’βˆš5

2

)︁𝑛

4 Use the initial conditions to find the specific solution

𝑓𝑛 = 1√5

(︁1+

√5

2

)︁𝑛

βˆ’ 1√5

(︁1βˆ’

√5

2

)︁𝑛

Ioan Despi – AMTH140 11 of 15

Page 36: Solution of Linear Homogeneous Recurrence Relations

More Examples

Example

Solve the following (shifted Fibonacci) recurrence relation:

𝑓𝑛 = π‘“π‘›βˆ’1 + π‘“π‘›βˆ’2, 𝑓0 = 0, and 𝑓1 = 1

Solution.

1 The characteristic equation is πœ†2 βˆ’ πœ†βˆ’ 1 = 0

2 The roots are πœ†1 = 1+√5

2 and πœ†2 = 1βˆ’βˆš5

2

3 The general solution is 𝑓𝑛 = 𝐴(︁

1+√5

2

)︁𝑛

+ 𝐡(︁

1βˆ’βˆš5

2

)︁𝑛

4 Use the initial conditions to find the specific solution

𝑓𝑛 = 1√5

(︁1+

√5

2

)︁𝑛

βˆ’ 1√5

(︁1βˆ’

√5

2

)︁𝑛

Ioan Despi – AMTH140 11 of 15

Page 37: Solution of Linear Homogeneous Recurrence Relations

More Examples

Example

Solve the following (shifted Fibonacci) recurrence relation:

𝑓𝑛 = π‘“π‘›βˆ’1 + π‘“π‘›βˆ’2, 𝑓0 = 0, and 𝑓1 = 1

Solution.

1 The characteristic equation is πœ†2 βˆ’ πœ†βˆ’ 1 = 0

2 The roots are πœ†1 = 1+√5

2 and πœ†2 = 1βˆ’βˆš5

2

3 The general solution is 𝑓𝑛 = 𝐴(︁

1+√5

2

)︁𝑛

+ 𝐡(︁

1βˆ’βˆš5

2

)︁𝑛

4 Use the initial conditions to find the specific solution

𝑓𝑛 = 1√5

(︁1+

√5

2

)︁𝑛

βˆ’ 1√5

(︁1βˆ’

√5

2

)︁𝑛

Ioan Despi – AMTH140 11 of 15

Page 38: Solution of Linear Homogeneous Recurrence Relations

More Examples

Example

Solve the following recurrence relation:

π‘Žπ‘› = 2(π‘Žπ‘›βˆ’1 βˆ’ π‘Žπ‘›βˆ’2)

with initial conditions π‘Ž0 = π‘Ž1 = 1

Solution.

1 The characteristic equation is πœ†2 βˆ’ 2πœ† + 2 = 0

2 The roots are πœ†1 = 1 + 𝑖 and πœ†2 = 1 βˆ’ 𝑖.

3 The general solution is π‘Žπ‘› = 𝐴 (1 + 𝑖)𝑛

+ 𝐡 (1 βˆ’ 𝑖)𝑛

4 Use the initial conditions to find the specific solution 𝐴 = 1/2, 𝐡 = 1/2,i.e., π‘Žπ‘› = 1

2 (1 + 𝑖)𝑛

+ 12 (1 βˆ’ 𝑖)

𝑛

Ioan Despi – AMTH140 12 of 15

Page 39: Solution of Linear Homogeneous Recurrence Relations

More Examples

Example

Solve the following recurrence relation:

π‘Žπ‘› = 2(π‘Žπ‘›βˆ’1 βˆ’ π‘Žπ‘›βˆ’2)

with initial conditions π‘Ž0 = π‘Ž1 = 1

Solution.

1 The characteristic equation is πœ†2 βˆ’ 2πœ† + 2 = 0

2 The roots are πœ†1 = 1 + 𝑖 and πœ†2 = 1 βˆ’ 𝑖.

3 The general solution is π‘Žπ‘› = 𝐴 (1 + 𝑖)𝑛

+ 𝐡 (1 βˆ’ 𝑖)𝑛

4 Use the initial conditions to find the specific solution 𝐴 = 1/2, 𝐡 = 1/2,i.e., π‘Žπ‘› = 1

2 (1 + 𝑖)𝑛

+ 12 (1 βˆ’ 𝑖)

𝑛

Ioan Despi – AMTH140 12 of 15

Page 40: Solution of Linear Homogeneous Recurrence Relations

More Examples

Example

Solve the following recurrence relation:

π‘Žπ‘› = 2(π‘Žπ‘›βˆ’1 βˆ’ π‘Žπ‘›βˆ’2)

with initial conditions π‘Ž0 = π‘Ž1 = 1

Solution.

1 The characteristic equation is πœ†2 βˆ’ 2πœ† + 2 = 0

2 The roots are πœ†1 = 1 + 𝑖 and πœ†2 = 1 βˆ’ 𝑖.

3 The general solution is π‘Žπ‘› = 𝐴 (1 + 𝑖)𝑛

+ 𝐡 (1 βˆ’ 𝑖)𝑛

4 Use the initial conditions to find the specific solution 𝐴 = 1/2, 𝐡 = 1/2,i.e., π‘Žπ‘› = 1

2 (1 + 𝑖)𝑛

+ 12 (1 βˆ’ 𝑖)

𝑛

Ioan Despi – AMTH140 12 of 15

Page 41: Solution of Linear Homogeneous Recurrence Relations

More Examples

Example

Solve the following recurrence relation:

π‘Žπ‘› = 2(π‘Žπ‘›βˆ’1 βˆ’ π‘Žπ‘›βˆ’2)

with initial conditions π‘Ž0 = π‘Ž1 = 1

Solution.

1 The characteristic equation is πœ†2 βˆ’ 2πœ† + 2 = 0

2 The roots are πœ†1 = 1 + 𝑖 and πœ†2 = 1 βˆ’ 𝑖.

3 The general solution is π‘Žπ‘› = 𝐴 (1 + 𝑖)𝑛

+ 𝐡 (1 βˆ’ 𝑖)𝑛

4 Use the initial conditions to find the specific solution 𝐴 = 1/2, 𝐡 = 1/2,i.e., π‘Žπ‘› = 1

2 (1 + 𝑖)𝑛

+ 12 (1 βˆ’ 𝑖)

𝑛

Ioan Despi – AMTH140 12 of 15

Page 42: Solution of Linear Homogeneous Recurrence Relations

More Examples

Example

Solve the following recurrence relation:

π‘Žπ‘› = 2(π‘Žπ‘›βˆ’1 βˆ’ π‘Žπ‘›βˆ’2)

with initial conditions π‘Ž0 = π‘Ž1 = 1

Solution.

1 The characteristic equation is πœ†2 βˆ’ 2πœ† + 2 = 0

2 The roots are πœ†1 = 1 + 𝑖 and πœ†2 = 1 βˆ’ 𝑖.

3 The general solution is π‘Žπ‘› = 𝐴 (1 + 𝑖)𝑛

+ 𝐡 (1 βˆ’ 𝑖)𝑛

4 Use the initial conditions to find the specific solution 𝐴 = 1/2, 𝐡 = 1/2,i.e., π‘Žπ‘› = 1

2 (1 + 𝑖)𝑛

+ 12 (1 βˆ’ 𝑖)

𝑛

Ioan Despi – AMTH140 12 of 15

Page 43: Solution of Linear Homogeneous Recurrence Relations

More Examples

Example

Solve the following recurrence relation:

π‘Žπ‘› = 6π‘Žπ‘›βˆ’1 βˆ’ 9π‘Žπ‘›βˆ’2

with initial conditions π‘Ž0 = 3 and π‘Ž1 = 10

Solution.

1 The characteristic equation is πœ†2 βˆ’ 6πœ† + 9 = 0

2 The roots for (πœ†βˆ’ 3)2 = 0 are πœ†1 = πœ†2 = 3, so π‘š1 = 2.

3 The general solution is π‘Žπ‘› = (𝐴 + 𝐡𝑛)3𝑛

4 Use the initial conditions to find the specific solutionπ‘Žπ‘› =

(οΈ€3 + 1

3𝑛)οΈ€

3𝑛 = 3𝑛+1 + 𝑛3π‘›βˆ’1

Ioan Despi – AMTH140 13 of 15

Page 44: Solution of Linear Homogeneous Recurrence Relations

More Examples

Example

Solve the following recurrence relation:

π‘Žπ‘› = 6π‘Žπ‘›βˆ’1 βˆ’ 9π‘Žπ‘›βˆ’2

with initial conditions π‘Ž0 = 3 and π‘Ž1 = 10

Solution.

1 The characteristic equation is πœ†2 βˆ’ 6πœ† + 9 = 0

2 The roots for (πœ†βˆ’ 3)2 = 0 are πœ†1 = πœ†2 = 3, so π‘š1 = 2.

3 The general solution is π‘Žπ‘› = (𝐴 + 𝐡𝑛)3𝑛

4 Use the initial conditions to find the specific solutionπ‘Žπ‘› =

(οΈ€3 + 1

3𝑛)οΈ€

3𝑛 = 3𝑛+1 + 𝑛3π‘›βˆ’1

Ioan Despi – AMTH140 13 of 15

Page 45: Solution of Linear Homogeneous Recurrence Relations

More Examples

Example

Solve the following recurrence relation:

π‘Žπ‘› = 6π‘Žπ‘›βˆ’1 βˆ’ 9π‘Žπ‘›βˆ’2

with initial conditions π‘Ž0 = 3 and π‘Ž1 = 10

Solution.

1 The characteristic equation is πœ†2 βˆ’ 6πœ† + 9 = 0

2 The roots for (πœ†βˆ’ 3)2 = 0 are πœ†1 = πœ†2 = 3, so π‘š1 = 2.

3 The general solution is π‘Žπ‘› = (𝐴 + 𝐡𝑛)3𝑛

4 Use the initial conditions to find the specific solutionπ‘Žπ‘› =

(οΈ€3 + 1

3𝑛)οΈ€

3𝑛 = 3𝑛+1 + 𝑛3π‘›βˆ’1

Ioan Despi – AMTH140 13 of 15

Page 46: Solution of Linear Homogeneous Recurrence Relations

More Examples

Example

Solve the following recurrence relation:

π‘Žπ‘› = 6π‘Žπ‘›βˆ’1 βˆ’ 9π‘Žπ‘›βˆ’2

with initial conditions π‘Ž0 = 3 and π‘Ž1 = 10

Solution.

1 The characteristic equation is πœ†2 βˆ’ 6πœ† + 9 = 0

2 The roots for (πœ†βˆ’ 3)2 = 0 are πœ†1 = πœ†2 = 3, so π‘š1 = 2.

3 The general solution is π‘Žπ‘› = (𝐴 + 𝐡𝑛)3𝑛

4 Use the initial conditions to find the specific solutionπ‘Žπ‘› =

(οΈ€3 + 1

3𝑛)οΈ€

3𝑛 = 3𝑛+1 + 𝑛3π‘›βˆ’1

Ioan Despi – AMTH140 13 of 15

Page 47: Solution of Linear Homogeneous Recurrence Relations

More Examples

Example

Solve the following recurrence relation:

π‘Žπ‘› = 6π‘Žπ‘›βˆ’1 βˆ’ 9π‘Žπ‘›βˆ’2

with initial conditions π‘Ž0 = 3 and π‘Ž1 = 10

Solution.

1 The characteristic equation is πœ†2 βˆ’ 6πœ† + 9 = 0

2 The roots for (πœ†βˆ’ 3)2 = 0 are πœ†1 = πœ†2 = 3, so π‘š1 = 2.

3 The general solution is π‘Žπ‘› = (𝐴 + 𝐡𝑛)3𝑛

4 Use the initial conditions to find the specific solutionπ‘Žπ‘› =

(οΈ€3 + 1

3𝑛)οΈ€

3𝑛 = 3𝑛+1 + 𝑛3π‘›βˆ’1

Ioan Despi – AMTH140 13 of 15

Page 48: Solution of Linear Homogeneous Recurrence Relations

More Examples

Example

Solve the following recurrence relation:

2π‘Žπ‘›+3 = π‘Žπ‘›+2 + 2π‘Žπ‘›+1 βˆ’ π‘Žπ‘›

with initial conditions π‘Ž0 = 0, π‘Ž1 = 1 and π‘Ž2 = 2

Solution.

1 The characteristic equation is 2πœ†3 βˆ’ πœ†2 βˆ’ 2πœ† + 1 = 0

2 The roots are πœ†1 = 1, πœ†2 = βˆ’1, πœ†3 = 1/2

3 The general solution is π‘Žπ‘› = 𝐴(1)𝑛 + 𝐡(βˆ’1)𝑛 + 𝐢( 12 )𝑛

4 Use the initial conditions to find the specific solution 𝐴 = 5/2, 𝐡 = 1/6,𝐢 = βˆ’8/3, so π‘Žπ‘› = 5

2 + 16 (βˆ’1)𝑛 βˆ’ 8

3 ( 12 )𝑛

Ioan Despi – AMTH140 14 of 15

Page 49: Solution of Linear Homogeneous Recurrence Relations

More Examples

Example

Solve the following recurrence relation:

2π‘Žπ‘›+3 = π‘Žπ‘›+2 + 2π‘Žπ‘›+1 βˆ’ π‘Žπ‘›

with initial conditions π‘Ž0 = 0, π‘Ž1 = 1 and π‘Ž2 = 2

Solution.

1 The characteristic equation is 2πœ†3 βˆ’ πœ†2 βˆ’ 2πœ† + 1 = 0

2 The roots are πœ†1 = 1, πœ†2 = βˆ’1, πœ†3 = 1/2

3 The general solution is π‘Žπ‘› = 𝐴(1)𝑛 + 𝐡(βˆ’1)𝑛 + 𝐢( 12 )𝑛

4 Use the initial conditions to find the specific solution 𝐴 = 5/2, 𝐡 = 1/6,𝐢 = βˆ’8/3, so π‘Žπ‘› = 5

2 + 16 (βˆ’1)𝑛 βˆ’ 8

3 ( 12 )𝑛

Ioan Despi – AMTH140 14 of 15

Page 50: Solution of Linear Homogeneous Recurrence Relations

More Examples

Example

Solve the following recurrence relation:

2π‘Žπ‘›+3 = π‘Žπ‘›+2 + 2π‘Žπ‘›+1 βˆ’ π‘Žπ‘›

with initial conditions π‘Ž0 = 0, π‘Ž1 = 1 and π‘Ž2 = 2

Solution.

1 The characteristic equation is 2πœ†3 βˆ’ πœ†2 βˆ’ 2πœ† + 1 = 0

2 The roots are πœ†1 = 1, πœ†2 = βˆ’1, πœ†3 = 1/2

3 The general solution is π‘Žπ‘› = 𝐴(1)𝑛 + 𝐡(βˆ’1)𝑛 + 𝐢( 12 )𝑛

4 Use the initial conditions to find the specific solution 𝐴 = 5/2, 𝐡 = 1/6,𝐢 = βˆ’8/3, so π‘Žπ‘› = 5

2 + 16 (βˆ’1)𝑛 βˆ’ 8

3 ( 12 )𝑛

Ioan Despi – AMTH140 14 of 15

Page 51: Solution of Linear Homogeneous Recurrence Relations

More Examples

Example

Solve the following recurrence relation:

2π‘Žπ‘›+3 = π‘Žπ‘›+2 + 2π‘Žπ‘›+1 βˆ’ π‘Žπ‘›

with initial conditions π‘Ž0 = 0, π‘Ž1 = 1 and π‘Ž2 = 2

Solution.

1 The characteristic equation is 2πœ†3 βˆ’ πœ†2 βˆ’ 2πœ† + 1 = 0

2 The roots are πœ†1 = 1, πœ†2 = βˆ’1, πœ†3 = 1/2

3 The general solution is π‘Žπ‘› = 𝐴(1)𝑛 + 𝐡(βˆ’1)𝑛 + 𝐢( 12 )𝑛

4 Use the initial conditions to find the specific solution 𝐴 = 5/2, 𝐡 = 1/6,𝐢 = βˆ’8/3, so π‘Žπ‘› = 5

2 + 16 (βˆ’1)𝑛 βˆ’ 8

3 ( 12 )𝑛

Ioan Despi – AMTH140 14 of 15

Page 52: Solution of Linear Homogeneous Recurrence Relations

More Examples

Example

Solve the following recurrence relation:

2π‘Žπ‘›+3 = π‘Žπ‘›+2 + 2π‘Žπ‘›+1 βˆ’ π‘Žπ‘›

with initial conditions π‘Ž0 = 0, π‘Ž1 = 1 and π‘Ž2 = 2

Solution.

1 The characteristic equation is 2πœ†3 βˆ’ πœ†2 βˆ’ 2πœ† + 1 = 0

2 The roots are πœ†1 = 1, πœ†2 = βˆ’1, πœ†3 = 1/2

3 The general solution is π‘Žπ‘› = 𝐴(1)𝑛 + 𝐡(βˆ’1)𝑛 + 𝐢( 12 )𝑛

4 Use the initial conditions to find the specific solution 𝐴 = 5/2, 𝐡 = 1/6,𝐢 = βˆ’8/3, so π‘Žπ‘› = 5

2 + 16 (βˆ’1)𝑛 βˆ’ 8

3 ( 12 )𝑛

Ioan Despi – AMTH140 14 of 15

Page 53: Solution of Linear Homogeneous Recurrence Relations

More Examples

Example

How many binary strings (strings of ’0’s and ’1’s) of 𝑛 bits have no twoconsecutive zeros?

Solution.

Let π‘Žπ‘› be the number of such strings.

Clearly, π‘Ž0 = 0, π‘Ž1 = 2, and π‘Ž2 = 3.

An 𝑛 bit such string

I begins with (1 , and ends with any π‘›βˆ’ 1 bit string, or

I begins with (0, 1 , and ends with any π‘›βˆ’ 2 bit string.

So π‘Žπ‘› = π‘Žπ‘›βˆ’1 + π‘Žπ‘›βˆ’2 .

The characteristic equation is πœ†2 βˆ’ πœ†βˆ’ 1, etc.

Ioan Despi – AMTH140 15 of 15

Page 54: Solution of Linear Homogeneous Recurrence Relations

More Examples

Example

How many binary strings (strings of ’0’s and ’1’s) of 𝑛 bits have no twoconsecutive zeros?

Solution.

Let π‘Žπ‘› be the number of such strings.

Clearly, π‘Ž0 = 0, π‘Ž1 = 2, and π‘Ž2 = 3.

An 𝑛 bit such string

I begins with (1 , and ends with any π‘›βˆ’ 1 bit string, or

I begins with (0, 1 , and ends with any π‘›βˆ’ 2 bit string.

So π‘Žπ‘› = π‘Žπ‘›βˆ’1 + π‘Žπ‘›βˆ’2 .

The characteristic equation is πœ†2 βˆ’ πœ†βˆ’ 1, etc.

Ioan Despi – AMTH140 15 of 15

Page 55: Solution of Linear Homogeneous Recurrence Relations

More Examples

Example

How many binary strings (strings of ’0’s and ’1’s) of 𝑛 bits have no twoconsecutive zeros?

Solution.

Let π‘Žπ‘› be the number of such strings.

Clearly, π‘Ž0 = 0, π‘Ž1 = 2, and π‘Ž2 = 3.

An 𝑛 bit such string

I begins with (1 , and ends with any π‘›βˆ’ 1 bit string, or

I begins with (0, 1 , and ends with any π‘›βˆ’ 2 bit string.

So π‘Žπ‘› = π‘Žπ‘›βˆ’1 + π‘Žπ‘›βˆ’2 .

The characteristic equation is πœ†2 βˆ’ πœ†βˆ’ 1, etc.

Ioan Despi – AMTH140 15 of 15

Page 56: Solution of Linear Homogeneous Recurrence Relations

More Examples

Example

How many binary strings (strings of ’0’s and ’1’s) of 𝑛 bits have no twoconsecutive zeros?

Solution.

Let π‘Žπ‘› be the number of such strings.

Clearly, π‘Ž0 = 0, π‘Ž1 = 2, and π‘Ž2 = 3.

An 𝑛 bit such string

I begins with (1 , and ends with any π‘›βˆ’ 1 bit string, or

I begins with (0, 1 , and ends with any π‘›βˆ’ 2 bit string.

So π‘Žπ‘› = π‘Žπ‘›βˆ’1 + π‘Žπ‘›βˆ’2 .

The characteristic equation is πœ†2 βˆ’ πœ†βˆ’ 1, etc.

Ioan Despi – AMTH140 15 of 15

Page 57: Solution of Linear Homogeneous Recurrence Relations

More Examples

Example

How many binary strings (strings of ’0’s and ’1’s) of 𝑛 bits have no twoconsecutive zeros?

Solution.

Let π‘Žπ‘› be the number of such strings.

Clearly, π‘Ž0 = 0, π‘Ž1 = 2, and π‘Ž2 = 3.

An 𝑛 bit such string

I begins with (1 , and ends with any π‘›βˆ’ 1 bit string, or

I begins with (0, 1 , and ends with any π‘›βˆ’ 2 bit string.

So π‘Žπ‘› = π‘Žπ‘›βˆ’1 + π‘Žπ‘›βˆ’2 .

The characteristic equation is πœ†2 βˆ’ πœ†βˆ’ 1, etc.

Ioan Despi – AMTH140 15 of 15

Page 58: Solution of Linear Homogeneous Recurrence Relations

More Examples

Example

How many binary strings (strings of ’0’s and ’1’s) of 𝑛 bits have no twoconsecutive zeros?

Solution.

Let π‘Žπ‘› be the number of such strings.

Clearly, π‘Ž0 = 0, π‘Ž1 = 2, and π‘Ž2 = 3.

An 𝑛 bit such string

I begins with (1 , and ends with any π‘›βˆ’ 1 bit string, or

I begins with (0, 1 , and ends with any π‘›βˆ’ 2 bit string.

So π‘Žπ‘› = π‘Žπ‘›βˆ’1 + π‘Žπ‘›βˆ’2 .

The characteristic equation is πœ†2 βˆ’ πœ†βˆ’ 1, etc.

Ioan Despi – AMTH140 15 of 15

Page 59: Solution of Linear Homogeneous Recurrence Relations

More Examples

Example

How many binary strings (strings of ’0’s and ’1’s) of 𝑛 bits have no twoconsecutive zeros?

Solution.

Let π‘Žπ‘› be the number of such strings.

Clearly, π‘Ž0 = 0, π‘Ž1 = 2, and π‘Ž2 = 3.

An 𝑛 bit such string

I begins with (1 , and ends with any π‘›βˆ’ 1 bit string, or

I begins with (0, 1 , and ends with any π‘›βˆ’ 2 bit string.

So π‘Žπ‘› = π‘Žπ‘›βˆ’1 + π‘Žπ‘›βˆ’2 .

The characteristic equation is πœ†2 βˆ’ πœ†βˆ’ 1, etc.

Ioan Despi – AMTH140 15 of 15

Page 60: Solution of Linear Homogeneous Recurrence Relations

More Examples

Example

How many binary strings (strings of ’0’s and ’1’s) of 𝑛 bits have no twoconsecutive zeros?

Solution.

Let π‘Žπ‘› be the number of such strings.

Clearly, π‘Ž0 = 0, π‘Ž1 = 2, and π‘Ž2 = 3.

An 𝑛 bit such string

I begins with (1 , and ends with any π‘›βˆ’ 1 bit string, or

I begins with (0, 1 , and ends with any π‘›βˆ’ 2 bit string.

So π‘Žπ‘› = π‘Žπ‘›βˆ’1 + π‘Žπ‘›βˆ’2 .

The characteristic equation is πœ†2 βˆ’ πœ†βˆ’ 1, etc.

Ioan Despi – AMTH140 15 of 15