Professional Documents
Culture Documents
Outline
Recurrence Relations
Types of recurrence relations
Solution of Recurrence Relations
Generating Functions
Non-linear Recurrences.
Recurrence Relations
Recursive Functions
Let a ∈ W and X = {a, a + 1, a + 2, . . . }. The recursive definition
of a function f with domain X consists of three parts, where k > 1.
Basis clause: A few initial values of the function
f (a), f (a + 1), . . . , f (a + k − 1) are specified.
An equation that specifies such initial values is an initial
condition.
Recursive clause: A formula to compute f (n) from the k
preceding functional values f (n − 1), f (n − 2), . . . , f (n − k) is
made.
Such a formula is a recurrence relation (or recursion formula).
Terminal clause: Only values thus obtained are valid
functional values. (For convenience, we drop this clause from
our recursive definition.)
Recurrence equations
Definition
A recurrence equation (or recurrence relations) is any equation
that can be used to specify an infinite sequence < Xn > n ∈ N by
expressing Xn in terms of Xn−1 , Xn−2 , . . . , X1 , X0 and n.
Tower of Brahma
Example
Tower of Hanoi: According to a legend of India, at the beginning
of creation, God stacked 64 golden disks on one of three diamond
pegs on a brass platform in the temple of Brahma at Benares
Fibonacci Sequence
Example
Leonardo Fibonacci, the most outstanding Italian mathematician
of the Middle Ages, proposed the following problem around 1202:
Suppose there are two newborn rabbits, one male and the other
female. Find the number of rabbits produced in a year if:
(a). Each pair takes one month to become mature.
(b) Each pair produces a mixed pair every month, from the second
month.
(c) No rabbits die.
Illustration
Example
Imagine n lines in a plane such that no two lines are parallel, and
no three are concurrent. Let fn denote the number of distinct
regions into which the plane is divided by them. Define fn
recursively.
Pizza Problem
Example
Let fn denote the maximum number of places into which a pizza
can be divided with n cuts. Find a formula for fn .
Definition
A linear recurrence equation of order k is one which can be written
as Xn + p1 (n)Xn−1 + p2 (n)Xn−2 + · · · + pk (n)Xn−k = q(n).
Where, p1 (n), p2 (n), . . . , pk (n), &q(n) are functions of n only.
LRRWCC
Solution of LHRRWCC
Definition
We define an operator E on a sequence < Xn > where n ∈ N by
E (< Xn >) =< Xn+1 > and
E 2 (< Xn >) = E (< Xn+1 >) =< Xn+2 >. Where E 0 = I the
identity operator such that I (< Xn >) =< Xn >.
Solution of LHRRWCC
Theorem
Let < an > and < bn > be the solutions of the LHRRWCC
L(E )(Xn ) = 0, then an + bn and kan are also solutions of
L(E )(Xn ) = 0.
Solution of LHRRWCC
Example
Find the solution of Xn+1 − 3Xn = 0 for all n ≥ 0 with X0 = 4.
Iterative Method
LNHRRWCC
Illustration
Example
Find the general solution of the LNHRRWCC, an+1 − 3an = 4(5)n .
Particular Solutions
There are no general procedure for finding the particular
solution of a recurrence relation.
However for certain function q(n) such as polynomial in n and
Power of constant r n is known.
If q(n) is a sine or cosine functions of n then we can find the
particular solutions.
LNHRRWCC
Theorem
If q(n) = (b0 + b1 n + b2 n2 + · · · + br nr )αn and α is not a root of
the auxiliary equation then the recurrence relation has a particular
solution of the form Xnp = (B0 + B1 n + B2 n2 + · · · + Br nr )αn .
Theorem
If q(n) = (b0 + b1 n + b2 n2 + · · · + br nr )αn and α is a root of the
auxiliary equation with multiplicity m then the recurrence relation
has a particular solution of the form
Xnp = (B0 + B1 n + B2 n2 + · · · + Br nr )nm αn .
Generating Functions
Generating functions provide a powerful tool for solving
LHRRWCCs.
Generating Functions were invented in 1718 by the French
mathematician Abraham De Moivre.
Generating functions can also solve combinatorial problems.
Example
6
−1
f (x) = xx−1 = 1 + x + x 2 + x 3 + x 4 + x 5 . is known as generating
function of the sequence of coefficients 1, 1, 1, 1, 1, 1 in the
polynomial.
Generating Functions
Definition
Let a0 , al , a2 , . . . , be a sequence of real numbers. Then the
function g (x) = ao + a1 x + a2 x 2 + · · · + an x n is the generating
function for the sequence {an }.
Generating Functions
Example
Using generating functions, solve the recurrence relation
an = 6an−1 − 9an−2 , where a0 = 2 and a1 = 3.
Example
Using generating functions, solve the Fibonacci recurrence relation
Fn = Fn−1 + Fn−2 , where F1 = 1 = F2 .
Example
Use the method of generating function to solve
an+1 − 8an + 16an−1 = 4n , where n ≥ 1; a0 = 1, a1 = 8.
Example
Solve the recurrence relation an − an−1 = Fn+2 Fn−1 n ≥ 1, where
a0 = 2 and Fn is the nth Fibonacci number.
Telescoping Sums
Example
Solve the recurrence relation an = n3 an−1 , n ≥ 1, where a0 = 2.
Useful Method
Substitution Method
This method can be used to solve some non-linear recurrence
relations.
Example
Solve the recurrence relation an = an/2 + n for n = 2k , k ≥ 1 with
a1 = 0.
Example
√ √
Solve the recurrence relation xn = (2 xn−1 + 3 xn−2 )2 n ≥ 2 with
initial conditions x0 = 1, x1 = 4.
Example
7
xn−1
Solve the recurrence relation xn = 12
xn−2
with initial conditions
x0 = 1 and x1 = 2.
Dr. Tarkeshwar Singh Recurrence Relation and it Applications