SlideShare uma empresa Scribd logo
1 de 25
Baixar para ler offline
TOPIC ON LINEAR RECURRENCE RELATIONS
WITH CONSTANT COEFFICIENTS:-
HOMOGEOUS SOLUTIONS,PARTICULAR
SOLUTIONS, TOTAL SOLUTIONS AND
SOLVING RECURRENCE RELATION USING
GENERATING FUNCTIONS
 Introduction to Linear recurrence relations:- order and
degree of recurrence relations.
 Linear recurrence relations with constant coefficients
 Homogenous solutions
 Paticular solutions for homogenous difference
equations
 Particular solutions for non-homogenous difference
equations
 Total solution and example
 Generating functions
 A recurrence relation is a functional relation between the
independent variable x, dependent variable f(x) and the
differences of various order of f (x). A recurrence relation is also
called a difference equation, and we will use these two terms
interchangeably.
 Example1: The equation f (x + 3h) + 3f (x + 2h) + 6f (x + h) + 9f
(x) = 0 is a recurrence relation.
 It can also be written as
 ar+3 + 3ar+2 + 6ar+1 + 9ar = 0 yk+3 + 3yk+2 + 6yk+1 + 9yk = 0
 Example2: The Fibonacci sequence is defined by the recurrence
relation ar = ar-2 + ar-1, r≥2,with the initial conditions a0=1 and a1=1.
 The order of the recurrence relation or difference
equation is defined to be the difference between the
highest and lowest subscripts of f(x) or ar=yk.
 Example1: The equation 13ar+20ar-1=0 is a first order
recurrence relation.
 Example2: The equation 8f (x) + 4f (x + 1) + 8f (x+2) =
k (x)
 The degree of a difference equation is defined to be the
highest power of f (x) or ar=yk
 Example1: The equation y3
k+3+2y2
k+2+2yk+1=0 has the degree
3, as the highest power of yk is 3.
 Example2: The equation a4
r+3a3
r-1+6a2
r-2+4ar-3 =0 has the
degree 4, as the highest power of ar is 4.
 Example3: The equation yk+3 +2yk+2 +4yk+1+2yk= k(x) has the
degree 1, because the highest power of yk is 1 and its order is
3.
 Example4: The equation f (x+2h) - 4f(x+h) +2f(x) = 0 has the
degree1 and its order is 2.
 A Recurrence Relations is called linear if its degree is one.
 The general form of linear recurrence relation with constant
coefficient is
 C0 yn+r+C1 yn+r-1+C2 yn+r-2+⋯+Cr yn=R (n)
 Where C0,C1,C2......Cn are constant and R (n) is same function of
independent variable n.
 A solution of a recurrence relation in any function which satisfies
the given equation.
 The equation is said to be linear non-homogeneous difference
equation if R (n) ≠ 0.
 Example: Solve the difference equation
yK+4+4yK+3+8yK+2+8yK+1+4yK=0.
 Solution: The characteristics equation is s4+4s3+8s2+8s+4=0
(s2+2s+2) (s2+2s+2)=0 s = -1±i,-1±i
 Therefore, the homogeneous solution of the equation is given by
 yK=(C1+C2 K)(-1+i)K+(C3 +C4 K)(-1-i)K
 A linear homogeneous difference equation with constant coefficients is
given by
 C0 yn+C1 yn-1+C2 yn-2+⋯......+Cr yn-r=0 ....... equation (i)
 Where C0,C1,C2.....Cn are constants.
 The solution of the equation (i) is of the form , where ∝1 is the
characteristics root and A is constant.
 Substitute the values of A ∝K for yn in equation (1), we have
 C0 A∝K+C1 A∝K-1+C2 A∝K-2+⋯....+Cr A∝K-r=0.......equation (ii)
 After simplifying equation (ii), we have
 C0 ∝r+C1 ∝r-1+C2 ∝r-2+⋯Cr=0..........equation (iii)
 The equation (iii) is called the characteristics equation of the difference
equation.
 If ∝1 is one of the roots of the characteristics equation, then is a
homogeneous solution to the difference equation.
 To find the solution of the linear homogeneous difference equations, we
have the three cases that are discussed as follows:
 Case1 If the characteristics equation has repeated real roots.
 If ∝1=∝2, then (A1+A2 K) is also a solution.
 If ∝1=∝2=∝3 then (A1+A2 K+A3 K2) is also a solution.
 Similarly, if root ∝1 is repeated n times, then.
 (A1+A2 K+A3 K2+......+An Kn-1)
 The solution to the homogeneous equation.
 Case2: If the characteristics equation has one imaginary root.
 If α+iβ is the root of the characteristics equation, then α-iβ is also
the root, where α and β are real.
 Thus, (α+iβ)K and (α-iβ)K are solutions of the equations. This
implies
 (α+iβ)K A1+(α-iβ)K A2
 Is also a solution to the characteristics equation, where A1 and
A2 are constants which are to be determined.
 Case3: If the characteristics equation has repeated imaginary
roots.
 When the characteristics equation has repeated imaginary
roots,
 (C1+C2 k) (α+iβ)K +(C3+C4 K)(α-iβ)K
 Is the solution to the homogeneous equation
Example1: Solve the difference equation ar-3ar-1+2ar-2 =0
 Solution: The characteristics equation is given by
 s2-3s-1+2s-2 => s2-3s+2=0 or (s-1)(s-2)=0
⇒ s = 1, 2
 Therefore, the homogeneous solution of the equation is
given by
 ar=C 1 +C2.2r or c C 1 (1)K+C2(2)K
 Example2: Solve the difference equation 9yK+2-6yK+1+yK=0.
 Solution: The characteristics equation is
 9s2-6s+1=0 or (3s-1)2=0
⇒ s =1/3,1/3
 Therefore, the homogeneous solution of the equation is given by
yK=(C1+C2 k)(1/3)k
 Example3: Solve the difference equation yK-yK-1-yK-2=0.
 Solution: The characteristics equation is s2-s-1=0
s=1+√5
 2
 Therefore, the homogeneous solution of the equation is
 .
 C1 (1+√5) and C2(1-√5 )
2 2
 (A) Homogeneous Linear Difference Equations and
Particular Solution:
 We can find the particular solution of the difference equation when the
equation is of homogeneous linear type by putting the values of the
initial conditions in the homogeneous solutions.
 Example1: Solve the difference equation 2ar-5ar-1+2ar-2=0 and find
particular solutions such that a0=0 and a1=1.
 Solution: The characteristics equation is 2s2-5s+2=0
(2s-1)(s-2)=0
s = and 2.
 Therefore, the homogeneous solution of the equation is given by
 ar(h)= C1+C2 .2r..........equation (i)
 Putting r=0 and r=1 in equation (i), we get
a0=C1+C2=0...........equation (a)
a1= C1+2C2=1...........equation.(b)
 Solving eq (a) and (b), we have
C1=-2/3and C2=2/3
 Hence, the particular solution is
 Ar(p) =-2/3(1/2)r+2/3.2r
 Example2: Solve the difference equation ar-4ar-1+4ar-2=0
and find particular solutions such that a0=0 and a1=6.
 Solution: The characteristics equation is
s2-4s+4=0 or (s-2)2=0 s = 2, 2
 Therefore, the homogeneous solution of the equation is
given by
ar(n)=(C1+C2 r).2r.............. equation (i)
 Putting r = 0 and r = 1 in equation (i), we get
a0=(C1+0).20 = 1 ∴C1=1
a1=(C1+C2).2=6 ∴C1+C2=3⇒C2=2
 Hence, the particular solution is
ar(P)=(1+2r).2r.
 . Theorems that give us a method for solving non-
homogeneous recurrences are listed below:-
 Theorem 1:- If f(n) is a solution to the associated
homogeneous recurrence, and g(n) is a solution to the non-
homogeneous recurrence, then f(n) + g(n) is also a solution
to the non-homogeneous recurrence.
 Theorem 2:- Suppose the non-homogeneous term is of the
form p(n)sn, where p(n) is a polynomial of degree r and s is a
constant. If s is not a root of the characteristic equation, then
there is a particular solution of the form q(n)sn , where q is a
polynomial of degree at most r. If s is a root of the
characteristic equation of multiplicity t, then there is a
particular solution of the form nt q(n)sn, where q is a
polynomial of degree at most r.
 Theorem 3:- If the non-homogeneous term is of
the form p 1(n) s1
n +p 2(n)s2
n+ · · · + p m(n)sm
n,
then there is a particular solution of the form f
1(n) + f2(n) + · · · + f m(n) where, for each i, f
i(n) is a particular solution to the non
homogeneous recurence a n= α 1a n-1 + α 2a n-2 + · · ·
+ α kan-k + pi(n)si
n
 Procedure for solving non-homogeneous recurrences. 1. Write
down the associated homogeneous recurrence and find its general
solution.
 2. Find a particular solution the non-homogeneous recurrence.
This may involve solving several simpler non-homogeneous
recurrences (using this same procedure).
 3. Add all of the above solutions together to obtain the general
solution to the non-homogeneous recurrence.
 4. Use the initial conditions to get a system of k equations in k
unknowns, then solve it to obtain the solution you want.
 Example 15 Solve an = 4a n-1−4a n-2+n. 2n +3n +4, n ≥ 2, a0 = 0, a1 =
1. The associated homogeneous recurrence is an = 4a n-1 − 4a n-2 . Its
characteristic equation is x2 = 4x − 4, or (x − 2)2 = 0. Thus, 2 is the
only root and it has multiplicity 2. The general solution to the
associated homogeneous recurrence is c 12n + c 2n2n .
 To
find a particular solution to the non-homogeneous recurrence, we add
together particular solutions to the three “simpler” non-homogeneous
recurrences: • a n= 4a n-1 − 4a n-2 + n2n , (i)
 a n= 4a n-1 − 4a n-2 + 3n , and (ii)
a n= 4a n-1− 4a n-2 + 4. (iii)
Let’s find a particular solution to
equation (iii) first. The non homogeneous term is 4 = 4 · 1 n , and
since 1 is not a root of the characteristic equation, Theorem 2 says
there is a particular solution of the form c1n . To determine c, plug
c1n=c into the non-homogeneous recurrence and get 16 c =
4c − 4c + 4 = 4. Thus, a particular solution to the recurrence under
consideration is a n = 4
 . Now let’s do the same for equation (ii). The
non-homogeneous term is 3n = 1 · 3n . Since 3 is
not a root of the characteristic equation, Theorem
5 says there is a particular solution of the form
c3n . To determine c, plug c3n into the non-
homogeneous recurrence and get c3n = 4c3n-1−
4c3n-2 + 3n . After dividing by the common factor
of 3n-2 , we have 9c = 12c − 4c + 9, or c = 9.
Thus, a particular solution to the recurrence under
consideration is an = 9 · 3n .
 Let’s find a particular solution to equation
(i). The non homogeneous term is n2n .
Since 2 is a root of the characteristic
equation with multiplicity 2, NHLRR 2 says
there is a particular solution of the form n2
(un + v)2n .
 To determine u and v, plug this expression
into the non homogeneous recurrence and get
n2 (un+v)2n = 4(n−1)2 (u(n−1)+v)2n-1
−4(n−2) 2 (u(n−2)+v)2n-2 +n2n .
 After dividing both sides by 2n − 2 and doing a bit of algebra this
becomes
 4un3+ 4vn2 = 8u(n − 1)3 + 8v(n − 1)2
 −4u(n − 2)3 − 4v(n − 2)2 + 4n
 = 8u(n 3 − 3n 2 + 3n − 1) + 8v(n 2 − 2n + 1) −4u(n 3
− 6n2 + 2n − 8) − 4v(n2− 4n + 4) + 4n
 = (8u − 4u)n 3 + (−24u + 8v + 24u − 4v)n2 +(24u −
16v − 48u + 16v + 4)n + (−8u + 8v + 32u − 16v)
 Equating coefficients of like powers of n on the LHS and RHS
gives: 4u = 4u,
 4v = (−24u + 8v + 24u − 4v)
 0 = (24u − 16v − 48u + 16v + 4) = −24u + 4
 0 = (−8u + 8v + 32u − 16v) = −24u − 8v
 The first two equations tell us nothing. The
third equation implies u = 1/6. Substituting
this value into the last equation and solving
gives v = 1/2. Thus, a particular solution to
the given recurrence is n2 ( 1/6 n + 1/2 )2n
. By Theorem 6, combining the three
particular solutions just obtained gives a
particular solution to an = 4a n-1 − 4a n-2+
n2n+ 3n + 4. It is 4 + 9 · 3n + n2 ( 1/6 n
+ 1 /2 )2n .
 The total solution or the general solution of a non-
homogeneous linear difference equation with constant
coefficients is the sum of the homogeneous solution
and a particular solution. If no initial conditions are
given, obtain n linear equations in n unknowns and
solve them, if possible to get total solutions.
 If y(h) denotes the homogeneous solution of the
recurrence relation and y(p) indicates the particular
solution of the recurrence relation then, the total
solution or the general solution y of the recurrence
relation is given by
y =y(h)+y(p).
 in the previous example, to find total solution we have
to combine the homogenous solution and particular
solution and then solve them using initial conditions
as shown:-
 The general solution is c 12n + c 2n2n + 4 + 9 · 3n + n2 (
1/6 n + 1/2 )2n . To determine the constants, use the
initial conditions. a0 = 0 ⇒ c 1 + 4 + 9 = 0
a1 = 1 ⇒ 2c 1+ 2c 2 + 4 + 27 + (1/6 + 1/2)2 = 1 The
first equation says c1 = −13. Plugging this into the
second equation gives c2 = −8/3. Thus, the solution to
the recurrence is an = (−13)2n + (−8/3)n2n + 4 + 9 · 3n +
n2 ( 1 6 n + 1 2 )2n .
 Generating function is a method to solve the
recurrence relations.
 Let us consider, the sequence a0, a1, a2....ar of
real numbers. For some interval of real numbers
containing zero values at t is given, the function
G(t) is defined by the series
G(t)= a0,
a1t+a2 t2+⋯+ar tr+............equation (i)
 This function G(t) is called the generating
function of the sequence ar.
 Example: Solve the recurrence relation ar+2-3ar+1+2ar=0
 By the method of generating functions with the initial
conditions a0=2 and a1=3.
 Solution: Let us assume that
 Multiply equation (i) by tr and summing from r = 0 to ∞, we
have
 (a2+a3 t+a4 t2+⋯)-3(a1+a2 t+a3 t2+⋯)+2(a0+a1 t+a2 t2+⋯)=0
[∴ G(t)=a0+a1 t+a2 t2+⋯]
 +2G(t)=0............equation (ii)
 Put t=1 on both sides of equation (iii) to find A. Hence
-1=- A ∴ A = 1
 Put t= 1/2 on both sides of equation (iii) to find B. Hence
1/2 =1/2 B ∴ B = 1
 Thus G (t) = .Hence,ar=1+2r.
Linear Recurrence Relations Guide

Mais conteúdo relacionado

Mais procurados

CMSC 56 | Lecture 11: Mathematical Induction
CMSC 56 | Lecture 11: Mathematical InductionCMSC 56 | Lecture 11: Mathematical Induction
CMSC 56 | Lecture 11: Mathematical Inductionallyn joy calcaben
 
Exact Differential Equations
Exact Differential EquationsExact Differential Equations
Exact Differential EquationsPrasad Enagandula
 
Homogeneous Linear Differential Equations
 Homogeneous Linear Differential Equations Homogeneous Linear Differential Equations
Homogeneous Linear Differential EquationsAMINULISLAM439
 
Quadratic Function Presentation
Quadratic Function PresentationQuadratic Function Presentation
Quadratic Function PresentationRyanWatt
 
System of linear equations
System of linear equationsSystem of linear equations
System of linear equationsDiler4
 
Solving systems of Linear Equations
Solving systems of Linear EquationsSolving systems of Linear Equations
Solving systems of Linear Equationsswartzje
 
Differential equations of first order
Differential equations of first orderDifferential equations of first order
Differential equations of first ordervishalgohel12195
 
Linear dependence & independence vectors
Linear dependence & independence vectorsLinear dependence & independence vectors
Linear dependence & independence vectorsRakib Hossain
 
Partial Derivatives
Partial DerivativesPartial Derivatives
Partial DerivativesAman Singh
 
Differential Equations Lecture: Non-Homogeneous Linear Differential Equations
Differential Equations Lecture: Non-Homogeneous Linear Differential EquationsDifferential Equations Lecture: Non-Homogeneous Linear Differential Equations
Differential Equations Lecture: Non-Homogeneous Linear Differential Equationsbullardcr
 
Generating functions
Generating functionsGenerating functions
Generating functionssweetysweety8
 
Eigenvalues and Eigenvectors
Eigenvalues and EigenvectorsEigenvalues and Eigenvectors
Eigenvalues and EigenvectorsVinod Srivastava
 
Straight Lines ( Especially For XI )
Straight Lines ( Especially For XI ) Straight Lines ( Especially For XI )
Straight Lines ( Especially For XI ) Atit Gaonkar
 
Binomial Theorem
Binomial TheoremBinomial Theorem
Binomial Theoremitutor
 
Quadratic Formula Presentation
Quadratic Formula PresentationQuadratic Formula Presentation
Quadratic Formula Presentationanjuli1580
 

Mais procurados (20)

CMSC 56 | Lecture 11: Mathematical Induction
CMSC 56 | Lecture 11: Mathematical InductionCMSC 56 | Lecture 11: Mathematical Induction
CMSC 56 | Lecture 11: Mathematical Induction
 
Exact Differential Equations
Exact Differential EquationsExact Differential Equations
Exact Differential Equations
 
Solution of linear system of equations
Solution of linear system of equationsSolution of linear system of equations
Solution of linear system of equations
 
Polynomials
PolynomialsPolynomials
Polynomials
 
Homogeneous Linear Differential Equations
 Homogeneous Linear Differential Equations Homogeneous Linear Differential Equations
Homogeneous Linear Differential Equations
 
Quadratic Function Presentation
Quadratic Function PresentationQuadratic Function Presentation
Quadratic Function Presentation
 
Graph theory
Graph theoryGraph theory
Graph theory
 
System of linear equations
System of linear equationsSystem of linear equations
System of linear equations
 
Solving systems of Linear Equations
Solving systems of Linear EquationsSolving systems of Linear Equations
Solving systems of Linear Equations
 
Chapter 17 - Multivariable Calculus
Chapter 17 - Multivariable CalculusChapter 17 - Multivariable Calculus
Chapter 17 - Multivariable Calculus
 
Differential equations of first order
Differential equations of first orderDifferential equations of first order
Differential equations of first order
 
Linear dependence & independence vectors
Linear dependence & independence vectorsLinear dependence & independence vectors
Linear dependence & independence vectors
 
Bisection method
Bisection methodBisection method
Bisection method
 
Partial Derivatives
Partial DerivativesPartial Derivatives
Partial Derivatives
 
Differential Equations Lecture: Non-Homogeneous Linear Differential Equations
Differential Equations Lecture: Non-Homogeneous Linear Differential EquationsDifferential Equations Lecture: Non-Homogeneous Linear Differential Equations
Differential Equations Lecture: Non-Homogeneous Linear Differential Equations
 
Generating functions
Generating functionsGenerating functions
Generating functions
 
Eigenvalues and Eigenvectors
Eigenvalues and EigenvectorsEigenvalues and Eigenvectors
Eigenvalues and Eigenvectors
 
Straight Lines ( Especially For XI )
Straight Lines ( Especially For XI ) Straight Lines ( Especially For XI )
Straight Lines ( Especially For XI )
 
Binomial Theorem
Binomial TheoremBinomial Theorem
Binomial Theorem
 
Quadratic Formula Presentation
Quadratic Formula PresentationQuadratic Formula Presentation
Quadratic Formula Presentation
 

Semelhante a Linear Recurrence Relations Guide

Daa linear recurrences
Daa linear recurrencesDaa linear recurrences
Daa linear recurrencesAtul Verma
 
Higher Differential Equation
Higher Differential Equation Higher Differential Equation
Higher Differential Equation Abdul Hannan
 
Impact of Linear Homogeneous Recurrent Relation Analysis
Impact of Linear Homogeneous Recurrent Relation AnalysisImpact of Linear Homogeneous Recurrent Relation Analysis
Impact of Linear Homogeneous Recurrent Relation Analysisijtsrd
 
Week 8 [compatibility mode]
Week 8 [compatibility mode]Week 8 [compatibility mode]
Week 8 [compatibility mode]Hazrul156
 
Recurrence equations
Recurrence equationsRecurrence equations
Recurrence equationsTarun Gehlot
 
RecurrenceRelations.ppt
RecurrenceRelations.pptRecurrenceRelations.ppt
RecurrenceRelations.pptMumitAhmed1
 
pdf of recurrence relation which is used in statistics
pdf of recurrence relation which is used in statisticspdf of recurrence relation which is used in statistics
pdf of recurrence relation which is used in statisticspranjaltarte
 
Higher order ODE with applications
Higher order ODE with applicationsHigher order ODE with applications
Higher order ODE with applicationsPratik Gadhiya
 
Maths Notes - Differential Equations
Maths Notes - Differential EquationsMaths Notes - Differential Equations
Maths Notes - Differential EquationsJames McMurray
 
Analysis Of Algorithms Ii
Analysis Of Algorithms IiAnalysis Of Algorithms Ii
Analysis Of Algorithms IiSri Prasanna
 
Power Series - Legendre Polynomial - Bessel's Equation
Power Series - Legendre Polynomial - Bessel's EquationPower Series - Legendre Polynomial - Bessel's Equation
Power Series - Legendre Polynomial - Bessel's EquationArijitDhali
 
Elementary Differential Equations 11th Edition Boyce Solutions Manual
Elementary Differential Equations 11th Edition Boyce Solutions ManualElementary Differential Equations 11th Edition Boyce Solutions Manual
Elementary Differential Equations 11th Edition Boyce Solutions ManualMiriamKennedys
 
Solving recurrences
Solving recurrencesSolving recurrences
Solving recurrencesWaqas Akram
 
Solving recurrences
Solving recurrencesSolving recurrences
Solving recurrencesWaqas Akram
 

Semelhante a Linear Recurrence Relations Guide (20)

Daa linear recurrences
Daa linear recurrencesDaa linear recurrences
Daa linear recurrences
 
Higher Differential Equation
Higher Differential Equation Higher Differential Equation
Higher Differential Equation
 
160280102031 c2 aem
160280102031 c2 aem160280102031 c2 aem
160280102031 c2 aem
 
Impact of Linear Homogeneous Recurrent Relation Analysis
Impact of Linear Homogeneous Recurrent Relation AnalysisImpact of Linear Homogeneous Recurrent Relation Analysis
Impact of Linear Homogeneous Recurrent Relation Analysis
 
Week 8 [compatibility mode]
Week 8 [compatibility mode]Week 8 [compatibility mode]
Week 8 [compatibility mode]
 
Recurrence equations
Recurrence equationsRecurrence equations
Recurrence equations
 
RecurrenceRelations.ppt
RecurrenceRelations.pptRecurrenceRelations.ppt
RecurrenceRelations.ppt
 
pdf of recurrence relation which is used in statistics
pdf of recurrence relation which is used in statisticspdf of recurrence relation which is used in statistics
pdf of recurrence relation which is used in statistics
 
Higher order ODE with applications
Higher order ODE with applicationsHigher order ODE with applications
Higher order ODE with applications
 
Maths Notes - Differential Equations
Maths Notes - Differential EquationsMaths Notes - Differential Equations
Maths Notes - Differential Equations
 
Analysis Of Algorithms Ii
Analysis Of Algorithms IiAnalysis Of Algorithms Ii
Analysis Of Algorithms Ii
 
Power Series - Legendre Polynomial - Bessel's Equation
Power Series - Legendre Polynomial - Bessel's EquationPower Series - Legendre Polynomial - Bessel's Equation
Power Series - Legendre Polynomial - Bessel's Equation
 
Maths
MathsMaths
Maths
 
19 3
19 319 3
19 3
 
19 1
19 119 1
19 1
 
Calc 6.1a
Calc 6.1aCalc 6.1a
Calc 6.1a
 
Elementary Differential Equations 11th Edition Boyce Solutions Manual
Elementary Differential Equations 11th Edition Boyce Solutions ManualElementary Differential Equations 11th Edition Boyce Solutions Manual
Elementary Differential Equations 11th Edition Boyce Solutions Manual
 
Solving recurrences
Solving recurrencesSolving recurrences
Solving recurrences
 
Solving recurrences
Solving recurrencesSolving recurrences
Solving recurrences
 
19 6
19 619 6
19 6
 

Último

ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.pptROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.pptJohnWilliam111370
 
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMS
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMSHigh Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMS
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMSsandhya757531
 
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.elesangwon
 
priority interrupt computer organization
priority interrupt computer organizationpriority interrupt computer organization
priority interrupt computer organizationchnrketan
 
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTES
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTESCME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTES
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTESkarthi keyan
 
Research Methodology for Engineering pdf
Research Methodology for Engineering pdfResearch Methodology for Engineering pdf
Research Methodology for Engineering pdfCaalaaAbdulkerim
 
Secure Key Crypto - Tech Paper JET Tech Labs
Secure Key Crypto - Tech Paper JET Tech LabsSecure Key Crypto - Tech Paper JET Tech Labs
Secure Key Crypto - Tech Paper JET Tech Labsamber724300
 
The Satellite applications in telecommunication
The Satellite applications in telecommunicationThe Satellite applications in telecommunication
The Satellite applications in telecommunicationnovrain7111
 
Theory of Machine Notes / Lecture Material .pdf
Theory of Machine Notes / Lecture Material .pdfTheory of Machine Notes / Lecture Material .pdf
Theory of Machine Notes / Lecture Material .pdfShreyas Pandit
 
Guardians of E-Commerce: Harnessing NLP and Machine Learning Approaches for A...
Guardians of E-Commerce: Harnessing NLP and Machine Learning Approaches for A...Guardians of E-Commerce: Harnessing NLP and Machine Learning Approaches for A...
Guardians of E-Commerce: Harnessing NLP and Machine Learning Approaches for A...IJAEMSJORNAL
 
Substation Automation SCADA and Gateway Solutions by BRH
Substation Automation SCADA and Gateway Solutions by BRHSubstation Automation SCADA and Gateway Solutions by BRH
Substation Automation SCADA and Gateway Solutions by BRHbirinder2
 
22CYT12 & Chemistry for Computer Systems_Unit-II-Corrosion & its Control Meth...
22CYT12 & Chemistry for Computer Systems_Unit-II-Corrosion & its Control Meth...22CYT12 & Chemistry for Computer Systems_Unit-II-Corrosion & its Control Meth...
22CYT12 & Chemistry for Computer Systems_Unit-II-Corrosion & its Control Meth...KrishnaveniKrishnara1
 
Stork Webinar | APM Transformational planning, Tool Selection & Performance T...
Stork Webinar | APM Transformational planning, Tool Selection & Performance T...Stork Webinar | APM Transformational planning, Tool Selection & Performance T...
Stork Webinar | APM Transformational planning, Tool Selection & Performance T...Stork
 
Cost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionCost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionSneha Padhiar
 
CS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdfCS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdfBalamuruganV28
 
Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxMine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxRomil Mishra
 
March 2024 - Top 10 Read Articles in Artificial Intelligence and Applications...
March 2024 - Top 10 Read Articles in Artificial Intelligence and Applications...March 2024 - Top 10 Read Articles in Artificial Intelligence and Applications...
March 2024 - Top 10 Read Articles in Artificial Intelligence and Applications...gerogepatton
 
Novel 3D-Printed Soft Linear and Bending Actuators
Novel 3D-Printed Soft Linear and Bending ActuatorsNovel 3D-Printed Soft Linear and Bending Actuators
Novel 3D-Printed Soft Linear and Bending ActuatorsResearcher Researcher
 
Module-1-(Building Acoustics) Noise Control (Unit-3). pdf
Module-1-(Building Acoustics) Noise Control (Unit-3). pdfModule-1-(Building Acoustics) Noise Control (Unit-3). pdf
Module-1-(Building Acoustics) Noise Control (Unit-3). pdfManish Kumar
 

Último (20)

ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.pptROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
 
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMS
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMSHigh Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMS
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMS
 
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
 
priority interrupt computer organization
priority interrupt computer organizationpriority interrupt computer organization
priority interrupt computer organization
 
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTES
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTESCME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTES
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTES
 
Research Methodology for Engineering pdf
Research Methodology for Engineering pdfResearch Methodology for Engineering pdf
Research Methodology for Engineering pdf
 
Versatile Engineering Construction Firms
Versatile Engineering Construction FirmsVersatile Engineering Construction Firms
Versatile Engineering Construction Firms
 
Secure Key Crypto - Tech Paper JET Tech Labs
Secure Key Crypto - Tech Paper JET Tech LabsSecure Key Crypto - Tech Paper JET Tech Labs
Secure Key Crypto - Tech Paper JET Tech Labs
 
The Satellite applications in telecommunication
The Satellite applications in telecommunicationThe Satellite applications in telecommunication
The Satellite applications in telecommunication
 
Theory of Machine Notes / Lecture Material .pdf
Theory of Machine Notes / Lecture Material .pdfTheory of Machine Notes / Lecture Material .pdf
Theory of Machine Notes / Lecture Material .pdf
 
Guardians of E-Commerce: Harnessing NLP and Machine Learning Approaches for A...
Guardians of E-Commerce: Harnessing NLP and Machine Learning Approaches for A...Guardians of E-Commerce: Harnessing NLP and Machine Learning Approaches for A...
Guardians of E-Commerce: Harnessing NLP and Machine Learning Approaches for A...
 
Substation Automation SCADA and Gateway Solutions by BRH
Substation Automation SCADA and Gateway Solutions by BRHSubstation Automation SCADA and Gateway Solutions by BRH
Substation Automation SCADA and Gateway Solutions by BRH
 
22CYT12 & Chemistry for Computer Systems_Unit-II-Corrosion & its Control Meth...
22CYT12 & Chemistry for Computer Systems_Unit-II-Corrosion & its Control Meth...22CYT12 & Chemistry for Computer Systems_Unit-II-Corrosion & its Control Meth...
22CYT12 & Chemistry for Computer Systems_Unit-II-Corrosion & its Control Meth...
 
Stork Webinar | APM Transformational planning, Tool Selection & Performance T...
Stork Webinar | APM Transformational planning, Tool Selection & Performance T...Stork Webinar | APM Transformational planning, Tool Selection & Performance T...
Stork Webinar | APM Transformational planning, Tool Selection & Performance T...
 
Cost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionCost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based question
 
CS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdfCS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdf
 
Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxMine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptx
 
March 2024 - Top 10 Read Articles in Artificial Intelligence and Applications...
March 2024 - Top 10 Read Articles in Artificial Intelligence and Applications...March 2024 - Top 10 Read Articles in Artificial Intelligence and Applications...
March 2024 - Top 10 Read Articles in Artificial Intelligence and Applications...
 
Novel 3D-Printed Soft Linear and Bending Actuators
Novel 3D-Printed Soft Linear and Bending ActuatorsNovel 3D-Printed Soft Linear and Bending Actuators
Novel 3D-Printed Soft Linear and Bending Actuators
 
Module-1-(Building Acoustics) Noise Control (Unit-3). pdf
Module-1-(Building Acoustics) Noise Control (Unit-3). pdfModule-1-(Building Acoustics) Noise Control (Unit-3). pdf
Module-1-(Building Acoustics) Noise Control (Unit-3). pdf
 

Linear Recurrence Relations Guide

  • 1. TOPIC ON LINEAR RECURRENCE RELATIONS WITH CONSTANT COEFFICIENTS:- HOMOGEOUS SOLUTIONS,PARTICULAR SOLUTIONS, TOTAL SOLUTIONS AND SOLVING RECURRENCE RELATION USING GENERATING FUNCTIONS
  • 2.  Introduction to Linear recurrence relations:- order and degree of recurrence relations.  Linear recurrence relations with constant coefficients  Homogenous solutions  Paticular solutions for homogenous difference equations  Particular solutions for non-homogenous difference equations  Total solution and example  Generating functions
  • 3.  A recurrence relation is a functional relation between the independent variable x, dependent variable f(x) and the differences of various order of f (x). A recurrence relation is also called a difference equation, and we will use these two terms interchangeably.  Example1: The equation f (x + 3h) + 3f (x + 2h) + 6f (x + h) + 9f (x) = 0 is a recurrence relation.  It can also be written as  ar+3 + 3ar+2 + 6ar+1 + 9ar = 0 yk+3 + 3yk+2 + 6yk+1 + 9yk = 0  Example2: The Fibonacci sequence is defined by the recurrence relation ar = ar-2 + ar-1, r≥2,with the initial conditions a0=1 and a1=1.
  • 4.  The order of the recurrence relation or difference equation is defined to be the difference between the highest and lowest subscripts of f(x) or ar=yk.  Example1: The equation 13ar+20ar-1=0 is a first order recurrence relation.  Example2: The equation 8f (x) + 4f (x + 1) + 8f (x+2) = k (x)
  • 5.  The degree of a difference equation is defined to be the highest power of f (x) or ar=yk  Example1: The equation y3 k+3+2y2 k+2+2yk+1=0 has the degree 3, as the highest power of yk is 3.  Example2: The equation a4 r+3a3 r-1+6a2 r-2+4ar-3 =0 has the degree 4, as the highest power of ar is 4.  Example3: The equation yk+3 +2yk+2 +4yk+1+2yk= k(x) has the degree 1, because the highest power of yk is 1 and its order is 3.  Example4: The equation f (x+2h) - 4f(x+h) +2f(x) = 0 has the degree1 and its order is 2.
  • 6.  A Recurrence Relations is called linear if its degree is one.  The general form of linear recurrence relation with constant coefficient is  C0 yn+r+C1 yn+r-1+C2 yn+r-2+⋯+Cr yn=R (n)  Where C0,C1,C2......Cn are constant and R (n) is same function of independent variable n.  A solution of a recurrence relation in any function which satisfies the given equation.  The equation is said to be linear non-homogeneous difference equation if R (n) ≠ 0.  Example: Solve the difference equation yK+4+4yK+3+8yK+2+8yK+1+4yK=0.  Solution: The characteristics equation is s4+4s3+8s2+8s+4=0 (s2+2s+2) (s2+2s+2)=0 s = -1±i,-1±i  Therefore, the homogeneous solution of the equation is given by  yK=(C1+C2 K)(-1+i)K+(C3 +C4 K)(-1-i)K
  • 7.  A linear homogeneous difference equation with constant coefficients is given by  C0 yn+C1 yn-1+C2 yn-2+⋯......+Cr yn-r=0 ....... equation (i)  Where C0,C1,C2.....Cn are constants.  The solution of the equation (i) is of the form , where ∝1 is the characteristics root and A is constant.  Substitute the values of A ∝K for yn in equation (1), we have  C0 A∝K+C1 A∝K-1+C2 A∝K-2+⋯....+Cr A∝K-r=0.......equation (ii)  After simplifying equation (ii), we have  C0 ∝r+C1 ∝r-1+C2 ∝r-2+⋯Cr=0..........equation (iii)  The equation (iii) is called the characteristics equation of the difference equation.  If ∝1 is one of the roots of the characteristics equation, then is a homogeneous solution to the difference equation.  To find the solution of the linear homogeneous difference equations, we have the three cases that are discussed as follows:
  • 8.  Case1 If the characteristics equation has repeated real roots.  If ∝1=∝2, then (A1+A2 K) is also a solution.  If ∝1=∝2=∝3 then (A1+A2 K+A3 K2) is also a solution.  Similarly, if root ∝1 is repeated n times, then.  (A1+A2 K+A3 K2+......+An Kn-1)  The solution to the homogeneous equation.  Case2: If the characteristics equation has one imaginary root.  If α+iβ is the root of the characteristics equation, then α-iβ is also the root, where α and β are real.  Thus, (α+iβ)K and (α-iβ)K are solutions of the equations. This implies  (α+iβ)K A1+(α-iβ)K A2  Is also a solution to the characteristics equation, where A1 and A2 are constants which are to be determined.
  • 9.  Case3: If the characteristics equation has repeated imaginary roots.  When the characteristics equation has repeated imaginary roots,  (C1+C2 k) (α+iβ)K +(C3+C4 K)(α-iβ)K  Is the solution to the homogeneous equation Example1: Solve the difference equation ar-3ar-1+2ar-2 =0  Solution: The characteristics equation is given by  s2-3s-1+2s-2 => s2-3s+2=0 or (s-1)(s-2)=0 ⇒ s = 1, 2  Therefore, the homogeneous solution of the equation is given by  ar=C 1 +C2.2r or c C 1 (1)K+C2(2)K
  • 10.  Example2: Solve the difference equation 9yK+2-6yK+1+yK=0.  Solution: The characteristics equation is  9s2-6s+1=0 or (3s-1)2=0 ⇒ s =1/3,1/3  Therefore, the homogeneous solution of the equation is given by yK=(C1+C2 k)(1/3)k  Example3: Solve the difference equation yK-yK-1-yK-2=0.  Solution: The characteristics equation is s2-s-1=0 s=1+√5  2  Therefore, the homogeneous solution of the equation is  .  C1 (1+√5) and C2(1-√5 ) 2 2
  • 11.  (A) Homogeneous Linear Difference Equations and Particular Solution:  We can find the particular solution of the difference equation when the equation is of homogeneous linear type by putting the values of the initial conditions in the homogeneous solutions.  Example1: Solve the difference equation 2ar-5ar-1+2ar-2=0 and find particular solutions such that a0=0 and a1=1.  Solution: The characteristics equation is 2s2-5s+2=0 (2s-1)(s-2)=0 s = and 2.  Therefore, the homogeneous solution of the equation is given by  ar(h)= C1+C2 .2r..........equation (i)  Putting r=0 and r=1 in equation (i), we get a0=C1+C2=0...........equation (a) a1= C1+2C2=1...........equation.(b)  Solving eq (a) and (b), we have C1=-2/3and C2=2/3  Hence, the particular solution is  Ar(p) =-2/3(1/2)r+2/3.2r
  • 12.  Example2: Solve the difference equation ar-4ar-1+4ar-2=0 and find particular solutions such that a0=0 and a1=6.  Solution: The characteristics equation is s2-4s+4=0 or (s-2)2=0 s = 2, 2  Therefore, the homogeneous solution of the equation is given by ar(n)=(C1+C2 r).2r.............. equation (i)  Putting r = 0 and r = 1 in equation (i), we get a0=(C1+0).20 = 1 ∴C1=1 a1=(C1+C2).2=6 ∴C1+C2=3⇒C2=2  Hence, the particular solution is ar(P)=(1+2r).2r.
  • 13.  . Theorems that give us a method for solving non- homogeneous recurrences are listed below:-  Theorem 1:- If f(n) is a solution to the associated homogeneous recurrence, and g(n) is a solution to the non- homogeneous recurrence, then f(n) + g(n) is also a solution to the non-homogeneous recurrence.  Theorem 2:- Suppose the non-homogeneous term is of the form p(n)sn, where p(n) is a polynomial of degree r and s is a constant. If s is not a root of the characteristic equation, then there is a particular solution of the form q(n)sn , where q is a polynomial of degree at most r. If s is a root of the characteristic equation of multiplicity t, then there is a particular solution of the form nt q(n)sn, where q is a polynomial of degree at most r.
  • 14.  Theorem 3:- If the non-homogeneous term is of the form p 1(n) s1 n +p 2(n)s2 n+ · · · + p m(n)sm n, then there is a particular solution of the form f 1(n) + f2(n) + · · · + f m(n) where, for each i, f i(n) is a particular solution to the non homogeneous recurence a n= α 1a n-1 + α 2a n-2 + · · · + α kan-k + pi(n)si n  Procedure for solving non-homogeneous recurrences. 1. Write down the associated homogeneous recurrence and find its general solution.  2. Find a particular solution the non-homogeneous recurrence. This may involve solving several simpler non-homogeneous recurrences (using this same procedure).  3. Add all of the above solutions together to obtain the general solution to the non-homogeneous recurrence.  4. Use the initial conditions to get a system of k equations in k unknowns, then solve it to obtain the solution you want.
  • 15.  Example 15 Solve an = 4a n-1−4a n-2+n. 2n +3n +4, n ≥ 2, a0 = 0, a1 = 1. The associated homogeneous recurrence is an = 4a n-1 − 4a n-2 . Its characteristic equation is x2 = 4x − 4, or (x − 2)2 = 0. Thus, 2 is the only root and it has multiplicity 2. The general solution to the associated homogeneous recurrence is c 12n + c 2n2n .  To find a particular solution to the non-homogeneous recurrence, we add together particular solutions to the three “simpler” non-homogeneous recurrences: • a n= 4a n-1 − 4a n-2 + n2n , (i)  a n= 4a n-1 − 4a n-2 + 3n , and (ii) a n= 4a n-1− 4a n-2 + 4. (iii) Let’s find a particular solution to equation (iii) first. The non homogeneous term is 4 = 4 · 1 n , and since 1 is not a root of the characteristic equation, Theorem 2 says there is a particular solution of the form c1n . To determine c, plug c1n=c into the non-homogeneous recurrence and get 16 c = 4c − 4c + 4 = 4. Thus, a particular solution to the recurrence under consideration is a n = 4
  • 16.  . Now let’s do the same for equation (ii). The non-homogeneous term is 3n = 1 · 3n . Since 3 is not a root of the characteristic equation, Theorem 5 says there is a particular solution of the form c3n . To determine c, plug c3n into the non- homogeneous recurrence and get c3n = 4c3n-1− 4c3n-2 + 3n . After dividing by the common factor of 3n-2 , we have 9c = 12c − 4c + 9, or c = 9. Thus, a particular solution to the recurrence under consideration is an = 9 · 3n .
  • 17.  Let’s find a particular solution to equation (i). The non homogeneous term is n2n . Since 2 is a root of the characteristic equation with multiplicity 2, NHLRR 2 says there is a particular solution of the form n2 (un + v)2n .  To determine u and v, plug this expression into the non homogeneous recurrence and get n2 (un+v)2n = 4(n−1)2 (u(n−1)+v)2n-1 −4(n−2) 2 (u(n−2)+v)2n-2 +n2n .
  • 18.  After dividing both sides by 2n − 2 and doing a bit of algebra this becomes  4un3+ 4vn2 = 8u(n − 1)3 + 8v(n − 1)2  −4u(n − 2)3 − 4v(n − 2)2 + 4n  = 8u(n 3 − 3n 2 + 3n − 1) + 8v(n 2 − 2n + 1) −4u(n 3 − 6n2 + 2n − 8) − 4v(n2− 4n + 4) + 4n  = (8u − 4u)n 3 + (−24u + 8v + 24u − 4v)n2 +(24u − 16v − 48u + 16v + 4)n + (−8u + 8v + 32u − 16v)  Equating coefficients of like powers of n on the LHS and RHS gives: 4u = 4u,  4v = (−24u + 8v + 24u − 4v)  0 = (24u − 16v − 48u + 16v + 4) = −24u + 4  0 = (−8u + 8v + 32u − 16v) = −24u − 8v
  • 19.  The first two equations tell us nothing. The third equation implies u = 1/6. Substituting this value into the last equation and solving gives v = 1/2. Thus, a particular solution to the given recurrence is n2 ( 1/6 n + 1/2 )2n . By Theorem 6, combining the three particular solutions just obtained gives a particular solution to an = 4a n-1 − 4a n-2+ n2n+ 3n + 4. It is 4 + 9 · 3n + n2 ( 1/6 n + 1 /2 )2n .
  • 20.  The total solution or the general solution of a non- homogeneous linear difference equation with constant coefficients is the sum of the homogeneous solution and a particular solution. If no initial conditions are given, obtain n linear equations in n unknowns and solve them, if possible to get total solutions.  If y(h) denotes the homogeneous solution of the recurrence relation and y(p) indicates the particular solution of the recurrence relation then, the total solution or the general solution y of the recurrence relation is given by y =y(h)+y(p).
  • 21.  in the previous example, to find total solution we have to combine the homogenous solution and particular solution and then solve them using initial conditions as shown:-  The general solution is c 12n + c 2n2n + 4 + 9 · 3n + n2 ( 1/6 n + 1/2 )2n . To determine the constants, use the initial conditions. a0 = 0 ⇒ c 1 + 4 + 9 = 0 a1 = 1 ⇒ 2c 1+ 2c 2 + 4 + 27 + (1/6 + 1/2)2 = 1 The first equation says c1 = −13. Plugging this into the second equation gives c2 = −8/3. Thus, the solution to the recurrence is an = (−13)2n + (−8/3)n2n + 4 + 9 · 3n + n2 ( 1 6 n + 1 2 )2n .
  • 22.  Generating function is a method to solve the recurrence relations.  Let us consider, the sequence a0, a1, a2....ar of real numbers. For some interval of real numbers containing zero values at t is given, the function G(t) is defined by the series G(t)= a0, a1t+a2 t2+⋯+ar tr+............equation (i)  This function G(t) is called the generating function of the sequence ar.
  • 23.  Example: Solve the recurrence relation ar+2-3ar+1+2ar=0  By the method of generating functions with the initial conditions a0=2 and a1=3.  Solution: Let us assume that  Multiply equation (i) by tr and summing from r = 0 to ∞, we have  (a2+a3 t+a4 t2+⋯)-3(a1+a2 t+a3 t2+⋯)+2(a0+a1 t+a2 t2+⋯)=0 [∴ G(t)=a0+a1 t+a2 t2+⋯]  +2G(t)=0............equation (ii)
  • 24.  Put t=1 on both sides of equation (iii) to find A. Hence -1=- A ∴ A = 1  Put t= 1/2 on both sides of equation (iii) to find B. Hence 1/2 =1/2 B ∴ B = 1  Thus G (t) = .Hence,ar=1+2r.