0% found this document useful (0 votes)
208 views10 pages

Discrete Mathematics - Recurrence Relation

Discrete mathematics

Uploaded by

sudipta
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)
208 views10 pages

Discrete Mathematics - Recurrence Relation

Discrete mathematics

Uploaded by

sudipta
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/ 10

Menu Login

Home Search tutorials, courses and ebooks...

CodingCSS
HTML GroundJavascript SQL Python Java C C++ PHP Scala C# Nod
Category

Jobs
Discrete Mathematics - Recurrence Relation
Development

Academic Tutorials
Whiteboard

Big Data & Analytics


Tools
Computer Programming

Computer Science

Databases

DevOps

Digital Marketing

In this Engineering Tutorials


chapter, we will discuss how recursive techniques can derive sequences and be
used for solving counting problems. The procedure for finding the terms of a sequence in a
Exams Syllabus
recursive manner is called recurrence relation. We study the theory of linear recurrence
relations and their
Famous solutions. Finally, we introduce generating functions for solving
Monuments
recurrence relations.
GATE Exams

Definition
Latest Technologies

A recurrence
Machinerelation is an equation that recursively defines a sequence where the next
Learning
term is a function of the previous terms (Expressing Fn as some combination of Fi with
i < n).Mainframe Development

Example − FibonacciTutorials
Management series − Fn = Fn−1 + Fn−2 , Tower of Hanoi − Fn = 2Fn−1 + 1

Mathematics Tutorials
Linear Recurrence Relations
Microsoft Technologies
A linear recurrence equation of degree k or order k is a recurrence equation which is in the
formatMisc
xn = A1 xn−1 + A2 xn−1 + A3 xn−1 + … Ak xn−k (An is a constant and
tutorials
Ak ≠ 0 ) on a sequence of numbers as a first-degree polynomial.
Mobile Development
These are some examples of linear recurrence equations −
Java Technologies

Recurrence relations Initial values Solutions


Python Technologies
Fn = Fn-1 + Fn-2 a1 = a2 = 1 Fibonacci number
SAP Tutorials

Fn = Fn-1 + Fn-2 a1 = 1, a2 = 3 Lucas Number


Programming Scripts

Fn = Fn-2 + Fn-3 a1 = a2 = a3 = 1 Padovan sequence


Selected Reading

Fn = 2F n-1 + Fn-2
Software Quality a1 = 0, a2 = 1 Pell number

Soft Skills
How to solve linear recurrence relation
Telecom Tutorials
Suppose, a two ordered linear recurrence relation is − Fn = AFn−1 + BFn−2 where A
and B are
UPSCrealIAS
numbers.
Exams

The characteristic equation for the above recurrence relation is −


Web Development
2
x − Ax − B = 0
Sports Tutorials

Three cases may occur while finding the roots −


XML Technologies

Case 1 − If this equation factors as (x − x1 )(x − x1 ) = 0 and it produces two distinct


Multi-Language
real roots x1 and x2 , then Fn n
= ax
1
+ bx
n
2
is the solution. [Here, a and b are constants]
Interview Questions
Case 2 − If this equation factors as (x and it produces single real root x1 ,
2
− x1 ) = 0

then Fn = ax
n
1
+ bnx
n
1
is the solution.

Case 3 − If the equation produces two distinct complex roots, x1 and x2 in polar form
x1 = r∠θ and x2 = r∠(−θ) , then Fn n
= r (acos(nθ) + bsin(nθ)) is the solution.

Problem 1
Library
Solve the recurrence relation Fn = 5Fn−1 − 6Fn−2 where F0 = 1 and F1 = 4

Solution

The characteristic equation of the recurrence relation is −

2
x − 5x + 6 = 0,
Articles
So, (x − 3)(x − 2) = 0
Hence, the roots are −

x1 = 3 and x2 = 2

The roots are real and distinct. So, this is in the form of case 1
Certification
Hence, the solution is −

n n
Fn = ax + bx
1 2

Here, Fn = a3
n
+ b2
n
(As x1 = 3 and x2 = 2)

Therefore,
Login
0 0
1 = F0 = a3 + b2 = a + b

1 1
4 = F1 = a3 + b2 = 3a + 2b

Solving these two equations, we get a = 2 and b = −1

Hence, the final solution is −


n n n n
Fn = 2.3 + (−1). 2 = 2.3 − 2

Problem 2

Solve the recurrence relation − Fn = 10Fn−1 − 25Fn−2 where F0 = 3 and F1 = 17

Solution

The characteristic equation of the recurrence relation is −

2
x − 10x − 25 = 0

So (x − 5)2 = 0

Hence, there is single real root x1 = 5

As there is single real valued root, this is in the form of case 2

Hence, the solution is −

n n
Fn = ax + bnx
1 1

0 0
3 = F0 = a.5 + (b)(0.5) = a

1 1
17 = F1 = a.5 + b.1.5 = 5a + 5b
Solving these two equations, we get a = 3 and b = 2/5

Hence, the final solution is − Fn = 3.5


n
+ (2/5). n.2
n

Problem 3

Solve the recurrence relation Fn = 2Fn−1 − 2Fn−2 where F0 = 1 and F1 = 3

Solution

The characteristic equation of the recurrence relation is −

2
x − 2x − 2 = 0

Hence, the roots are −

x1 = 1 + i and x2 = 1 − i

In polar form,

x1 = r∠θ and x2 = r∠(−θ), where r = √2 and θ =
π

The roots are imaginary. So, this is in the form of case 3.

Hence, the solution is −


– n
Fn = (√2) (acos(n. ⊓/4) + bsin(n. ⊓/4))

– 0
1 = F0 = (√2) (acos(0. ⊓/4) + bsin(0. ⊓/4))

= a

– 1
3 = F1 = (√2) (acos(1. ⊓/4) + bsin(1. ⊓/4))
– – –
= √2(a/√2 + b/√2)

Solving these two equations we get a = 1 and b = 2

Hence, the final solution is −


– n
Fn = (√2) (cos(n. π/4) + 2sin(n. π/4))

Non-Homogeneous Recurrence Relation and Particular Solutions


A recurrence relation is called non-homogeneous if it is in the form

Fn = AFn−1 + BFn−2 + f (n) where f (n) ≠ 0

Its associated homogeneous recurrence relation is Fn = AFn–1 + BFn−2


The solution (an ) of a non-homogeneous recurrence relation has two parts.

First part is the solution (ah ) of the associated homogeneous recurrence relation and the
second part is the particular solution (at ).

an = ah + at

Solution to the first part is done using the procedures discussed in the previous section.

To find the particular solution, we find an appropriate trial solution.

Let f (n) = cxn ; let x2 = Ax + B be the characteristic equation of the associated


homogeneous recurrence relation and let x1 and x2 be its roots.

If x ≠ x1 and x ≠ x2 , then at = Ax
n

If x ,
= x1 x ≠ x2 , then at = Anx
n

If x = x1 = x2 , then at = An x
2 n

Example

Let a non-homogeneous recurrence relation be Fn = AFn–1 + BFn−2 + f (n) with


characteristic roots x1 = 2 and x2 = 5 . Trial solutions for different possible values of
f (n) are as follows −

f(n) Trial solutions

4 A

5.2n An2n

8.5n An5n

4n A4n

2n2+3n+1 An2+Bn+C

Problem

Solve the recurrence relation Fn = 3Fn−1 + 10Fn−2 + 7.5


n
where F0 = 4 and
F1 = 3
Solution

This is a linear non-homogeneous relation, where the associated homogeneous equation is


Fn = 3Fn−1 + 10Fn−2 and f (n) = 7.5
n

The characteristic equation of its associated homogeneous relation is −

2
x − 3x − 10 = 0

Or, (x − 5)(x + 2) = 0

Or, x1 = 5 and x2 = −2

Hence ah = a.5
n
+ b. (−2)
n
, where a and b are constants.

Since f (n) , i.e. of the form c. xn , a reasonable trial solution of at will be Anxn
n
= 7.5

n n
at = Anx = An5

After putting the solution in the recurrence relation, we get −

n n−1 n−2 n
An5 = 3A(n– 1)5 + 10A(n– 2)5 + 7.5

Dividing both sides by 5n−2 , we get

2 0 2
An5 = 3A(n − 1)5 + 10A(n − 2)5 + 7.5

Or, 25An = 15An − 15A + 10An − 20A + 175

Or, 35A = 175

Or, A = 5

So, Fn = An5
n
= 5n5
n
= n5
n+1

The solution of the recurrence relation can be written as −

Fn = ah + at

n n n+1
= a.5 + b. (−2) + n5

Putting values of F0 = 4 and F1 = 3 , in the above equation, we get a = −2 and b = 6

Hence, the solution is −

n+1 n n
Fn = n5 + 6.(−2) − 2.5
Generating Functions
Generating Functions represents sequences where each term of a sequence is expressed
as a coefficient of a variable x in a formal power series.

Mathematically, for an infinite sequence, say a0 , a1 , a2 , … , ak , … , the generating


function will be −

2 k
Gx = a0 + a1 x + a2 x + ⋯ + ak x + ⋯ =

k
∑ ak x

k=0

Some Areas of Application

Generating functions can be used for the following purposes −

For solving a variety of counting problems. For example, the number of ways to
make change for a Rs. 100 note with the notes of denominations Rs.1, Rs.2, Rs.5,
Rs.10, Rs.20 and Rs.50
For solving recurrence relations

For proving some of the combinatorial identities


For finding asymptotic formulae for terms of sequences

Problem 1

What are the generating functions for the sequences {ak } with ak = 2 and ak = 3k ?

Solution


When ak = 2 , generating function, G(x) = ∑
k=0
k
2x = 2 + 2x + 2x
2
+ 2x
3
+ …


When ak = 3k, G(x) = ∑
k=0
k
3kx = 0 + 3x + 6x
2

3
+ 9x + ……

Problem 2

What is the generating function of the infinite series; 1, 1, 1, 1, … ?

Solution

Here, ak = 1 , for 0 ≤ k ≤ ∞
Hence, G(x) 2 3 1
= 1 + x + x + x + …⋯ =
(1−x)

Some Useful Generating Functions


For ak k
= a , G(x) = ∑
k=0
a x
k k
= 1 + ax

2 2
+ a x + … … ⋯ = 1/(1 − ax)


For ak = (k + 1), G(x) = ∑
k=0
(k + 1)x
k
= 1

2 1
+ 2x + 3x ……⋯ =
2
(1−x)


For ak n
= c , G(x) = ∑
k k=0
c x
n
k
k
= 1 + c x
n
1

n 2 2 n
+ c x + ……⋯ + x = (1 + x)
2

k 2

For ak =
1
, G(x) = ∑
k=0
x
= 1 + x +
x

k! k! 2!

3
x x
+ ……⋯ = e
3!

Kickstart Your Career


Get certified by completing the course

Get Started

Print Page Previous Next

Advertisements
Tutorials Point is a leading Ed Tech company
striving to provide the best learning material on
technical and non-technical subjects.

About us Terms Our Products

Company Terms of use Free Library

Our Team Privacy Policy Articles

Careers Refund Policy Coding Ground

Jobs Cookies Policy Certifications

Become a Teacher FAQ's Courses

Affiliates eBooks

Contact Us Corporate Training

Free Web Graphics

Contact Us

Tutorials Point India Private Limited, Incor9


Building, Kavuri Hills, Madhapur, Hyderabad,
Telangana - 500081, INDIA
© Copyright 2023. All Rights Reserved.

You might also like