Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
61 views12 pages

Recurrence Relations DM

A recurrence relation is an equation that defines a sequence of values based on previous terms in the sequence. It provides a way to compute each term of a sequence using its predecessors, often serving as a foundation for understanding iterative or recursive processes in mathematics and computer science.

Uploaded by

btechcseamar2022
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views12 pages

Recurrence Relations DM

A recurrence relation is an equation that defines a sequence of values based on previous terms in the sequence. It provides a way to compute each term of a sequence using its predecessors, often serving as a foundation for understanding iterative or recursive processes in mathematics and computer science.

Uploaded by

btechcseamar2022
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

RECURRENCE

RELATIONS AND
GENERATING FUNCTIONS 8
NNumber sequences
Some

Let an , a1 a2 *,Cn .denote a sequence of numbers.

Here a. is called the general term or generic term of the

sequence.

Types of sequences

There are two familiar types of sequences :


(0) Arithmetic sequernces. (ii)Geometric sequences.

Arithmetic Sequences

In arithmetic sequences, each term is a constant d more than


he previous
term.

The
sequence is uniquely determined once the initial term
Od he constant d are known i.e we have the arithmetic
Sequence

40 a0 t d, an +2 d,..,ap +n d,...
Inthe
case of an
arithmetic we have the rule
sequence,
ana,-+d,(n 1)
andthe
general term
is
4,= an +nd,(n
20).

|277
ADVANCED DISCRETE AND
MATHEMAT RELATIONS GENERATING
ATICS FUNCTIONS
RECURRENCE 279
278
3.
OObtain the arithmetic sequence
sequences for an=0, d=1.
Geometric every termis a constant Erample
In geometric
sequences, muliple of
Given ag
=0,
Solution.
the previous
term.
is uniquely
determined once the initial
d= 1

sequence we term
The i.e have the
specificd the arithmetic sequence
constantr are
with
ao and geometric Since initial term ao and
given by
sequence
a.r ag. r a . we have the mle
constant
d is

ag

0.0+
a0 t a. ag + 2 d,., t nd...a206128 240

Inthe case of geometric sequence, 1,0+2-1,... 0 +n-1,...


i.e

Or 0. 1,2,..... n,...

and the general term is


This is the sequence of non negative integers or the

4, = a9 (n20). numbers.
counting

Erample 1. Obrain the arithmetic sequence for a = d=2


1,
Example
4. Obtain the geometric sequence for

Solution. Given a, = 1. a)=1, r=2.


d=2 Solution. Given ap =1,
We know that the arithmetic sequence is given by r=2
ag ,
ag t d, an t 2 ,.,an +n d,..
We know that the geometricsequence is given by
Therefore we have
1, 1+2, l+2(2) ,., +n 1 (2),.
therefore, we have
Or 1,3, 5 ,..... 1 +2n ,...

is the required arithmetic sequence i.e a sequence of odd 1.2 (1),2 ()...*(),....
positive integers.
i.e 1,2. 2...2".
Example 2. Obrain the arithmetic sequence for an 4, d =0. = This is the sequence of non negative integral powers of 2.

Solution.Given a,=4, Note

d=0 The partial sums for an arithmetic sequenceare

We know that the arithmetic sequence is given by


a ,ag t d, a,+2 d ,.., a0 +nd,... S,= (a +kd)
k=0
therefore, we have
dn (n+ 1)
4,4 +0,4 +0,.., 4 +0,.. =(n+1) ao t 2
i.e 4, 4,. 4,.. The partial sum for a geometric sequence are
This is a constant sequence with each term equal to 4.
ADVANCED
280 DISCRETE

MATHEMATIC

k=0

r-1
(n+1) a (r=1)
Question 1. Define Fibonacci sequence.
Solution. The Fibonacci sequence fis defined by
fo =0.f =1
and

The terms of the sequence are called Fibonacci


numbers.
The recurrence relation in (1) is called
the Fibonaci
recurrence.

Question 2. Give the iterative


computation of the Fibonacr
sequence.

Solution. The Fibonacci sequence fis defined by fo =0,f, =1


and
Sh=f-1t2 (n22)
Put n =2 in (1), we get
S-fo +f =1+l=2
Put n =3in (1), we get
f3-h+f =2+1=3,
fa =s+f=3+2=5
It is known as iterative computation of the Fibonacl
sequence.

Linear Homogeneous
Recurrence Relations
Question 3. Define linear homogeneous
recurrence relatio
Solution. A recurrence relation
of the form

where C| ,C2 ., C are real numbers and Cp0,is


:
called

linear homogeneous recurrence relation of order k.


DISCRETE MATHEMATICS AND GENERA TING FUNCTIONS 285
ADVANCED RRELATIONS
RECURRENCE
284 relation
relation 6. Solvethe recurrence
the recurrence
Example 5.
Solve Erample
a, -7 an-2 +6
a,-3=0.
-6a,- +9a,-=0 relation is
recurrence
The given
where ao= a,=9.
1.
relation
is
Solution.
a,-7an-2 +6a,-3 =0
given recurrence given by
Solution.The is
a,- =0 characteristic
equation
a, -6a-+9
Iis

equation is
f-72+6k3=0
Its characteristic
-7x+ 6) =0
t-6x+9x=0 Or
k-

-6x +9)=0 Or
-7x+6=0
Or
one of its root.
-6x+9=0 By inspection x=I is
Or
Or
=0
(r-3) (x -3) Or (r-)«+x- 6) = 0
=0
Or x=3,3. Or (r- 1)(x+ 3)(x-2)
4,=cj 3"+n
c3 Or X=1,2, -3.
3
..(1)
= (1) +c(2)"+g (-3)"
4,=(c+C,n)
Or a, cj
is
we have general solution
Now ap = 1, from (1), Thus the

(-3)".
= c|(1)"+ c, (2) +
0= + (c; 0c,) 3 a,
Example 7. Solve the
recurrence relation

Or
a,-3(n23)
from (1)we have a, =2a- tan-2-2
when a, =9, then
to the initial values

4 =(c, tcy-l) 3
subject

40 =1,aj =2and a, =0.


Or 9=(1+C) 3 relation is
Solution.The given recurrence
Or 9=3+3c a,-2-2a,-3 (n23)
Cn =2 a,-)t relation
Or 3 c, =6 The of the givenrecurrence
characteristic equation
Or C) =2.
)=l, c; =2.
c (1),we get.
t-2--2423=0
Putting the values of c and in Or -2t-+2) =0
=
4, (1+2n)3". Or
-2-x+2 =0
RELATIONS AND GENERATING FUNCTIONs
287
ADVANCED DISCRETE RECURRENCE
MATHEMATICS
286
we get
Put cj
=2in (6),
Or (-)(a--2)= 0 2+3c3 1

(r-1) (r-2) (r+


=0 1)
3c3 =- I
Or
Or X=l,- 1,2 1

a, = (1)+-1) +; (2)"

= tg- 1)" + c,2" ..(1)


Put c; = 2,C3=-in (2),we get
is the general solution.
which

Now 2+eg-=!
1 2

...2)
Or
,=l+ -2=
2 1

c = 2,Cz =- and cz =-in (1), we get


Again a, =2
Putting

(|+g-l)' +2'=2
...3)
which is the required solution of the given recurrence
Also a=0 relation.

+,2=0 Example &.yWords of length


over a communication
letters a, b, c

channel
n, using only the three
subject to
are to befansmitted
C1 t)t4 c3 =0 ..(4)
in which two a'sappear consecutively
lhe condifiorthat no word

Determine the number of words allowed


Adding (2) and (3), we get by
bto betransmitted.
...5)
2c;+3 c3=3 be cjannel.

Adding (3)and (4), we get Soidtion. Let a, denote the number of allowed words of length

2cj +6c3 =2
Or +3 cq= 1
....6) Clearly an =1(theempty word)
and
Subtracting (5) and (6), we get a=3.
Let n
2 c +3C3=3 2.

can be
If the then the word
first letter of the word is b or C,

COmpleted in a,-1 Ways. is


If the then the second letter
first
letter of the word is a,

C1
=2
Ce nuting the ValuesS OT Cj and C in (1), we get

2+V3P1+v3y"-2+V3
2V3 2V3 (1-vy"

shich is the required solution.

Fromble 9.
Solve the recurrence relation a, = 4 a,,
(n>2)
t iniial values ao =0and a,= 1

Or
iie the recurrence relation h,, =4 h,-9,(n 22) with initial

zes ho =0 and h, =1.


290 RETE
RELATIONS AND
MATHEMATICS GENERATINGFUNCTIONS
RECURRENCE 291
relation is
Solution. The given ecurrence
(2), we get
a, =4an-2 (n22) Put C1 in

of the given
The characteristic equation recurrence 1

is
relation 4

*-4=0 1

Or *²-4) = 0 1

Putting c 7and Cz=- in (1), we get


Or f-4=0
Or (r-2) (x +2) =0
Or x=2, -2
Or
4n=cj (2)+c;(-2)" •..(1)

which the general solution.


is
Or a, =2-(-2y-2
Now a) =0 which is the required solution.

=c (2)°+
40 z(-2) Example I10. Solve the recurrence relation

0=ctg an =3an-2 -2an-3(n23)


Ct=0 ..2) with initial values ao = 1, a, =0 and a, =0.

Again a =1, Solution. The given recurrence relation is

a,-3ah-2+2 an-3=0, (n 2 3)
aj=c (2)' +cz-2)!
The characteristic equation is

1=2c-2c)
i.e
2c-2 c,=1
t-3+2 =0
..3)
Or 3 -3x+2) =0
Solving (2) and (3) i.e multiplying (2) by 2 and adding
(3), we have
to
Or -3x+2=0
2 c1 -2c=1 Or (r-1) (+I-2)= 0
2c +2c, =0 Or (I- 1) («+2) (x-I)=0
Or x=1,1,- 2.
4 C = 1
..(1)
4,=(G + c, n)(1)"+c(-2y
which is the general solution.
RELATIONS AND
ADVANCED GENERATING
292 DISCRETE RECURRENCE FUNCTIONS
293
MATHEMATICS
= lin (2), we get
Now an = l, so we have Put C

ag =ley c (0)](1)+c(-2)0
8
1=ct3
ie t=I ..2)
Now puting the values of c and c, in (3), we get
Again a,=0, so we have
+-26J=0
aj=(e +; (1)](1)' +<3(-2)'

0=c t C-2C3 ---


ie C| t-2 c =0 ...(3)
Finally putting the values of c and c3 in (1), we get

Also a,=0, so we have


8 2

a,=le; + cg (2)1 (1)'+c(- 2) which is the required solution.

0= cj +2 c +4 c, Exanple II. What is the solutionof the recurrence relation

i.e
C| +2c t+ 4 cz =0 ...4) a, = ap-t2an-2
Solving (3) and (4) i.e multiplying (3)by 2 and subtracting with a,=2 and a =7?
from (4), we get Solution. Given the recurrencerelation is

C|+2 c, +4 cy
=0
C+2C -4cz =0 Then characteristic equation is

Subtracting
+
t--22=0
-C;+ 8 c3 =0
Or o-x-2) = 0
Adding (2) and (5), we get
Or -x-2=0
-C +8C=0 Or (x-2) (*+ 1)=0
Or x=2,-1.
C;+ C3=1
Adding The general solution is
..(1)
9 cz =1 a,=c; (2)" c-1
+
tor some constants C and C2
RELA TIONS AND GENERATING FUNCTIONs 295
ADVANCED DISCRETE
MATHEMATICS RECURRENCE
294
that
1±Vl+4
conditions.
it follows i.e
a=2, 2
From the initial

we have
1+V5
2 2
i.e

numbers are given by


the Fibonacci
2=c tC2 Thus
(1+V5 (1-V5
i.e G+=2 ..(2)
2 2
Again a, =7,
we have
C and
for some constants

The initial conditions fo =0 and f =1can be used to find

7=2c -2 we have
these constants,
..3)
i.e 2c-=7 (1+V5 (1-s
Adding (2)and (3), we have 2
2c -C)=7 ...(1)

ie

3c1 =9
2
C =3
Put c =3in (2), we get (1+5
2
3+c,=2
..2)
i.e

Putting c,=3and c, =-Iin(1), we get


c=-G from (1)into (2), we
a, =3 (2") -(- 1y". Solving (1)and (2) i.e taking
get
Example l2.Find anexpkcitformulafor the Fibonacci numbers.
Solution. Since we know that the sequence of Fibonacci numbers 1+ 5
the recurrence relation
satisfies
2

and also satisfies the initial conditionsfo=0 andf = l. 2 2


The roots of the characteristic equation x-x-l=0 are
ADVANCED DISCRETE RELA TIONS AND GENERA TING FUNCTIONS 297

296 MATHEMATICS RECURRENCE


conditions i.e do =1, we have
initial
f1 +V5 -1+v5 U'sing

ag =cj (3)+ (0)(3)0


1=C|

i.e

G(5) =1 Now aj 6,SO we have


=c (3)+
a,
(3)!
(1))

Since c toy =0 6=3 c +3c2


2= C+ C2

i.e C;t©q=2
V5
Since C; = 1, so
we have
Hence the Fibonacci numbers are given by

1(1+V5 (1-V5 1+-2


2 2 C =2-l=]
Example 13. What is the solution of the recurrence relation Thus we have c= 1 and c, = 1.

is given
Hence the required solutionof the recurrence
relation
a, =6 a- -9a,-2
by
with initial conditions an = and a,=6?
l

a, =(1)(3)" +(1)n (3)y" [from (1)]


Solution. The given recurrence relation is

a,=6 a-9a,2 Or 4,=3 +n 3


The characteristic equation
Example 14. Find the solution tothe recurrence
is relation

t-6-! +9=0 a,=6a,--1Ja2+6a-3


Or F'-6x +9)= 0 with the initialconditions an =2, a,=5 and an = 1).
Or -6x+9=0 Solution.The given recurrence relation is

Or (-3)'=0 a,=6a--1la2+6a-3
Or x=3,3. The characteristic equation is

4, = (3)"tn (3)" ..(.1)


t-6+ll 2-6)=0
which is the general solution. Or
-6t+llx-6) =0
AND GENERATING
ADVANCED DISCRETE RELA TIONS FUNCTIONS
299
MATHEMATICS ARCURRENCE,
Solve the recurrence relation
1S
-6-llx-6=0 Emple ,-4a-1 -1la,-2+30a,-3=0
(-Du--Sr+6)
=0
Or =-35, ay =-85.
=0 =0. a
Or (I-)(-3)(r-2) recurrence relation is
The given
Or =l.2.3
a.,-4a,-11-1la-2t30 a,-3=0
Solution.

.. the general

4=c
sol is given by

(1)+(2)"+ c;(3)" Its characteristic


c equation is

-4x-11x+ 30 = 0
4-2n
+3Dx0
K3

conditions i.e an =2,


so we have
(r-2) (-2x- 15) =0
using the initial

(1+c (2) -c; (3)


Or

a= Or (r-2) (r - 5)(*+3) = 0
2=c1 t+3 Or x=2,5, -3.
is
ie ..2) Therefore general solution

a, =C (2)"+c; (5) + (-3" ..1)


Again a, =5, we have
we have
=o (1)'+ c (2)'+;(3)'
Since ap =0, so
a,

5=c +2cq +3c 4 =c;(2) +c, (5) +(-3)º


ie +2c+3cy =5
C1
..3) Or 0=c+c2 tC3
..2)
Also a, =15, we have i.e
C|tCtc =0
Again a, -35, so we have
ay =c; (1'+ (2)'+c3 (3)

15 =c +4 c +9c3 4 =c,(2)'tc,(5)' +(-3)'


.4) Or -35=2 c +5Cg-3 C3
C| +4c t+9 Cy= 15
i.e

2c+5c-3 c=-35
..3)
Solving (2), (3) and (4) for cj ,cand c3 We get ie

C =1,c, =-1,c3=2 Also a,=-85, so we have


Puting the values of cj ,c, and c in (1), we get
4=c (2)'+ (5) c -3
+

a, =(1) (1)+(-I)(2 +(2)(3)" -85 =4 c +25 c, +9 3 ...(4)


Le
Or a, =1-2"+2.3" 4C+25 C +9Cq =-85
which is the required solution.
ADVANCED DISCRETE MATHEMATICS
300

Solving (2),(3)and (4),we get

C =1, C=-5and c = 4.

Putting the values of cj , C, and c in (1), we get

(2)"+(-5)(5
a, =(1) +(4)(-3)"
Or = a, 2"- 5-5" +4 (-3)"

Hence a,=2"-5.5" + 4 (-3 is the required solution.

of the
distinct roots
Theoren 2. Let 91 92g.., q, be the
recurrE
characteristic equation ofthe linear homogeneous
relation with constant coefficients

=C a-1te2 n-2totC ak

You might also like