0% found this document useful (0 votes)
13 views9 pages

Recuurence Relation

Uploaded by

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

Recuurence Relation

Uploaded by

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

Computer Science And Engineering

Begum Rokeya University, Rangpur

Course Title: Mathematical Analysis For Computer Science

Course code : 3109


11/13/2024
Recurrent problems

Presented By : Jothy Devnath (ID: 12005021)


Department of Computer Science and Engineering
Begum Rokeya University, Rangpur
Recurrence Relation:
A recurrence relation defines a sequence of numbers
where each term is expressed as a function of its
preceding terms.

Recurrence relations are commonly used in algorithm


analysis, computer science, and mathematics to describe
problems that can be broken down into smaller, similar
sub-problems.
Types of Recurrence Relations:

1. Linear Recurrence Relation.


Example: The Fibonacci sequence.

2. Homogeneous Recurrence Relation.


3. Non-Homogeneous Recurrence Relation .
Example:1
Fibonacci Sequence:
Recurrence relation : F(n)=F(n-1)-F(n-2).
Initial condition: F(0)=0,F(1)=1

Example:2
S={3,7,11,15,19,……}
Recurrence relation, Sn= Sn-1 + 4
Initial condition: S1=3,n≥2
Linear Recurrence Relation with Constant
Coefficient:
C0an+C1an-1+C2an-2+……..+Ckan-k=f(n)
Where C1,C2…Ck are constant.

Example:
2an+3an-1=3(linear)
an.an-1=a2n-2 (not linear)
Order: It is the difference between highest and lowest subscript.

Degree: It is defined as the highest power of an .


*Degree of linear recurrence relation is 1.

Linear Recurrence Relation with Constant Coefficient

Homogeneous Recurrence Non homogeneous


Relation. f(n)=0 Recurrence Relation. f(n)≠0
Solve Homogeneous recurrence relation using
method of characteristics root:

There are three cases:

Case 1: When roots are distinct.

Case 2:When roots are same.

Case 3: When roots are complex.


Questions:

Q1:Solve an=an-1+2an-2, n≥2 with initial condition a0=0,a1=1.(case 1)

Q2.Solve an=4(an-1 – an-2) with initial condition a0=a1=1.(case 2)

Q3.Solve an+2an-1+4an-2=0.(case 3)

You might also like