4.
6 Second order
Introduction: homogeneous recurrence relations
Characteristic equation of the second order
homogeneous recurrence relation Chan t
Cn-1an-1t Cn-2 an-2 = 0, n> 2 is
C,k' + Cn-1k + Cn-2 = 0.
* The general solution is
() a, = Ak + Bk, if k, and k, are real nos. and distinct.
(ii) an = (A + Bn)k,if k, and k, are real nos. and equal.
(iii) ay = r"Acos no + Bsin n) , if kË and kz are complex nos.
1. Solve the recurrence relation: a,, -6a,-1+9a,-2 = 0, n 2, ao = 5, a = 12.
The characteristic equation is k 6k +9= 0.
The general solution is a, = (A + Bn)3rn
Put n= 0, ao = A ’A=5.
Put n= 1, a, = (5 + B)3’> B -1.
Therefore, a, = (5 -n)3.
2. Solve the recurrence relation: 2a, = 7an-1-3a4-2, n 2, a, = 2, ay = 5.
The characteristic equation is 2k2-7k +3 =0.
The general solution is an = A() + B(3)
Put n= 0,ag = A + B ’ A+ B = 2.
Put n= 1, a, =+3B
2
’ A+ 6B= 10.
By solving we get A= ,B B=.
Therefore, a, =¿(8(3)" + 21-n).
Dr. Narasimhan G, RNSIT Page 31
0 3sA , Solve the recurrence relation a,, +
an-1-6a,-2 =0, n > 2, ao=-1, a1=8.
The characteristic equation is k + k-6 = 0.
The general solution is a, = A(-3) + B(2)"
Put n= 0, ao = A+ B A+ B=-1.
Put n = 1,a, =-3A + 2B ’ -3A + 2B = 8.
By solving we get A= -2, B= 1.
Therefore, ay = (-2)(-3)" + 2.
4. Solvethe recurrence relation a, = 3 an-1 - 2an-2, n >2, ay = 5, a2 = 3.
The characteristic equation is k-3k + 2 = 0.
The general solution is a, = A(2)" + B(1)n
Put n= 1, a, = 2A +B’ 2A B=5.
Put n = 2, a, = 4A + B ’ 4A + B =3.
By solving we get A= -1, B=7.
Therefore, an = -(2) +7.
5. Solve the recurrence relation a2- 5a+1 t 4a4 = 0, n >0, ao = 4, aj = 13.
Rewrite theequation as b,, -5bn-1t 4bn-2 =0,n 2
The characteristic equation is k'5k + 4 = 0.
The general solution is b, = A(4)" + B(1)"
Put n= 0, b, =A + B’A+ B=16.
Put n = 1,b, = 4A + B ’ 44 B = 169.
By solving we get A= 51, B=-35 .
Therefore, b,, = (51)4" + (-35)1". a, =t/(51)4" 35
Dr. Narasimhan G, RNSIT
Page 32
Solve the recurrence
relation Fn+2 = Fn+1t
F,,n20, Fo = 0, F1 =1.
Rewrite the equation as F, -Fn-1- Fn-2
The characteristic equation is k? =0,n2,o = 0, F1 =1.
k-1= 0.
The general solution is F, = A() + B() 2
Put n= 0, Fo = A + B A+ B = 0’ B = -A.
Putn =1,F, =A() +(»A()
B -a()=1 1
By solving we get A= ,B =-i
V5
Therefore. F, = - ?
7. Solve the recurrence relation an+2 = (an+1) (a), n> 0,ao = 1,a, = 2
Rewrite the equation as
log an+2 = log an+1 t log an , n >0.
bn+2 = bn+1 t bn , n>0
b, - by-1-bn-2 = 0,n 0
The characteristic equation is k'- k-1= 0.
m
The general solution is b, =A() +B()
Put n= 0, b, = A + B ’ A + B = log ao ’ B=-A.
[* log ao = log 1 = 0]
Putn =1,b, =a()+a()- ()-4()=1
[ b, = log ao log, 2 = 1]
1
By solving we get A =E B=
Therefore, b, = - ( }
Dr. Narasimhan G, RNSIT Page 33
o Find the
recurrence relation for the number of binary
that has no consecutive zeroes. sequences of length n (n 2 1)
If n= 1, thereare 2 binary
sequences 0, 1. Therefore, aj = 2.
If n= 2, there are 3 binary sequences 01, 10,11.
Therefore, az = 3.
Consider a binary sequence of length n.
Ifn" entry is 1, for the remaining n-1entries, there are an- binary sequences.
If n" entry is 0, the preceding entry must be 1. For the remaining n-2 entries, there are
an-2 binary sequences.
Therefore, a, = an- t an-2 is the required recurrencerelation.
Rewrite the equation as a, - an-1- ah-2 =0,n 22, aj = 2, az =3.
The characteristic equation is k -k-1=0.
Thegeneral solution is a, =A() +B()
Put n= 1, a, =4()+ B() » A+B) +V5(A - B)=4
Put n= 2, a, =A() +B() 3(4+ B) +va(A B) =6
B= V5-3
By solving we get A=Y
2V5' 2/5
V5+3 V5-3
Therefore, a, = A() +B() ,where A= 2V5
,B= 2V5
Dr. Narasimhan G, RNSIT Page 34