solution of linear homogeneous recurrence relations
TRANSCRIPT
Solution of Linear Homogeneous RecurrenceRelations
General Solutions for Homogeneous Problems
Ioan Despi
University of New England
September 16, 2013
Outline
1 Introduction
2 Main TheoremExamples
3 General Procedure
4 More Examples
Ioan Despi β AMTH140 2 of 15
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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