0% found this document useful (0 votes)
209 views

Generating Functions and Recurrence Relations

The document discusses numeric functions and their properties. Numeric functions are functions whose domain is the set of natural numbers and range is the set of real numbers. Some key properties discussed include: - The sum and product of numeric functions are also numeric functions defined by the sum and product of the values of the individual functions. - The S^i operator on a numeric function shifts the function i units to the right, while S^-i shifts it i units to the left. - The accumulated sum of a numeric function is the sum of all values from 0 to r. - Forward and backward differences are numeric functions defined by the differences between consecutive terms. - Convolution is defined as the sum of products between coefficients of

Uploaded by

Unknow User
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
209 views

Generating Functions and Recurrence Relations

The document discusses numeric functions and their properties. Numeric functions are functions whose domain is the set of natural numbers and range is the set of real numbers. Some key properties discussed include: - The sum and product of numeric functions are also numeric functions defined by the sum and product of the values of the individual functions. - The S^i operator on a numeric function shifts the function i units to the right, while S^-i shifts it i units to the left. - The accumulated sum of a numeric function is the sum of all values from 0 to r. - Forward and backward differences are numeric functions defined by the differences between consecutive terms. - Convolution is defined as the sum of products between coefficients of

Uploaded by

Unknow User
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

UNIT- V:

Generating Functions and recurrence relations

Discrete numeric Functions: The functions whose domain is the set of natural numbers
including zero (𝑟 ≥ 0) and whose range is the set of real numbers are called sequences or
discrete numeric functions or simply numeric functions.

(𝑁𝑎𝑡𝑢𝑟𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟𝑠
𝑟=0,1,2,3,….
) ← ( 𝑅𝑒𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟𝑠
𝑅
)
Suppose 𝑎0 , 𝑎1 , 𝑎2 , … . . 𝑎𝑟 ….. Denote the value of the functions at 0,1,2,3,……r, …..

For examples: ( 𝒊) 𝑎𝑟 = 2𝑟 , 𝑟 ≥ 0

i.e the discrete numeric function is {1,2,4, 8, ,….}

(ii) 𝑎𝑟 = 7𝑟 3 + 1, 𝑟 ≥ 0

i.e the discrete numeric function is {1,8,57, ,….}

4𝑟, 0≤𝑟≤2
(iii) 𝑎𝑟 = {
2−𝑟 , 𝑟≥3

MAINIPULATION OF NUMERIC FUNCTIONS:

(A) Sum and product of Numeric functions: We define the operations of “Sum” and
“Product” in the class of numeric functions. The sum of two numeric functions is a
numeric function whose value at r is equal to the sum of the value of the two numeric
functions whose value at r is equal to product of two numeric functions at r.
Let 𝑎𝑟 and 𝑏𝑟 be two numeric functions. The sum is denoted by 𝑎𝑟 + 𝑏𝑟 and product
is denoted by 𝑎𝑟 𝑏𝑟 .

For Example:
0, 0≤𝑟 ≤ 2
𝑎𝑟 = { −𝑟
2 + 7, 𝑟≥3
5 − 2𝑟 , 0 ≤ 𝑟 ≤ 1
𝑏𝑟 = {
𝑟 + 3, 𝑟≥2
𝑡ℎ𝑒𝑛 sum:
5 − 2𝑟 + 0 , 0≤𝑟≤1
𝑎𝑟 + 𝑏𝑟 = { −𝑟 𝑎𝑛𝑑 0 + (2 + 3), 𝑖𝑓 𝑟 = 2
(2 + 7) + (𝑟 + 3), 𝑟≥3

And product is
5 − 2𝑟 . 0 , 0≤𝑟≤1
𝑎𝑟 𝑏𝑟 = { −𝑟 𝑎𝑛𝑑 0. (2 + 3), 𝑖𝑓 𝑟 = 2
(2 + 7). (𝑟 + 3), 𝑟≥3

(B) Numeric function 𝐒 𝐢 𝐚𝐫 and 𝐒 −𝐢 𝐚𝐫 : If 𝑎𝑟 , 𝑟 ≥ 0 is a numeric function and 𝑖 is a


positive integer then S i ar is also a numeric function defined by

0, 0≤𝑟 ≤𝑖−1
S i ar = {
𝑎𝑟−𝑖 , 𝑟≥𝑖

For Example:
If
3, 0 ≤ 𝑟 ≤ 13
𝑎𝑟 = {
4, 𝑟 ≥ 14
Then the value of S 6 ar , is

0, 0≤𝑟≤5
S 6 ar = {
𝑎𝑟−6 , 𝑟≥6

Further S −i ar is also a numeric function defined as

S −i ar = {
𝑎𝑟+𝑖 , 𝑟≥0
For Example:
If
3, 0 ≤ 𝑟 ≤ 13
𝑎𝑟 = {
4, 𝑟 ≥ 14

Then the value of S −6 ar , is

S −6 ar = 𝑎𝑟+6 , 𝑟 ≥ 0
3, 0≤ 𝑟 ≤ 7
{
4, 𝑟 ≥ 8.
(C) Accumulated Sum of a numeric Function: if 𝑎 = 𝑎𝑟 is a numeric function, then
accumulated sum of 𝑎𝑟 is also a numeric function defined as follows:
Accumulated sum of
𝑎𝑟 = ∑𝑟𝑖=0 𝑎𝑖 , where 𝑟 ≥ 0.
Or
𝑏𝑟 = ∑𝑟𝑖=0 𝑎𝑖 , where 𝑟 ≥ 0.
For Example:
If 𝑎𝑟 = 100(1. .07)𝑟 , 𝑟 ≥ 0.
Then accumulated sum of 𝑎𝑟 𝑖𝑠 𝑏𝑟 i.e.

𝑏𝑟 = ∑𝑟𝑖=0 𝑎𝑖 = ∑𝑟𝑖=0 100(1. .07)𝑟 ,

(D) Forward and Backward differences of a numeric function:

Let 𝑎 = 𝑎𝑟 be a numeric function. Then forward difference of 𝑎𝑟 is also a numeric


function denoted by
∆ 𝑎𝑟 = 𝑎𝑟+1 – 𝑎𝑟 , 𝑟 ≥ 0
𝑆𝑖𝑚𝑖𝑙𝑎𝑟𝑙𝑦 the backward difference of 𝑎𝑟 is also numeric function denoted by

∇ 𝑎𝑟 = 𝑎𝑟 – 𝑎𝑟−1 , 𝑟 ≥ 1

(E) Convolution of Numeric Function: if 𝑎 = 𝑎𝑟 and 𝑏 = 𝑏𝑟 are two numeric functions,


then the convolution of 𝑎𝑟 and 𝑏𝑟 is denoted by 𝑎 ∗ 𝑏(𝑜𝑟 𝑎𝑟 ∗ 𝑏𝑟 ) and is a numeric
function defined as

𝑎𝑟 ∗ 𝑏𝑟 = 𝑎0 𝑏𝑟 + 𝑎1 𝑏𝑟−1 + 𝑎2 𝑏𝑟−2 … … + 𝑎𝑟 𝑏0

𝐶𝑟 = ∑ 𝑎𝑘 𝑏𝑟−𝑘
𝑘=0
Generating Functions: There is an alternative way to represent numeric functions.
A numeric function 𝑎 = 𝑎𝑟 can also be represented as (𝑎0 , 𝑎1 , 𝑎2 , … . . 𝑎𝑛 … . . ) the infinite
series

𝐴(𝑧) = 𝑎0 + 𝑎1 𝑧 + 𝑎2 𝑧 2 + 𝑎3 𝑧 3 + ⋯ 𝑎𝑟 𝑧 𝑟 +….

𝐴(𝑧) = 𝑓(𝑧) = ∑∞
𝑟=0 𝑎𝑟 𝑧
𝑟

For Example:

The generating function 𝐴(𝑧)of the numeric function 𝑎𝑟 = 2𝑟 is

𝐴(𝑧) = 𝑎0 + 𝑎1 𝑧 + 𝑎2 𝑧 2 + 𝑎3 𝑧 3 + ⋯ 𝑎𝑟 𝑧 𝑟 +….
𝑎
𝐴(𝑧) = 1 + 2𝑧 + 22 𝑧 2 + 23 𝑧 3 + ⋯ 2𝑟 𝑧 𝑟 +…., [which is in G.P, 𝑆∞ = 1−𝑟 ]

1
Hence, 𝐴(𝑧) = 1 + 2𝑧 + 22 𝑧 2 + 23 𝑧 3 + ⋯ 2𝑟 𝑧 𝑟 = 1−2𝑧

Remark:
a. (1 − 𝑋)−1 = 1 + 𝑋 + 𝑋 2 + … ..
b. (1 − 𝑋)−2 = 1 + 2𝑋 + 3𝑋 2 + … ..
1
c. ∑∞ 𝑟 𝑟
𝑟=0 𝑎 𝑧 = 1−𝑎𝑧
d. Let 𝐴(𝑧)𝑎𝑛𝑑 𝐵(𝑧) are the generating functions of the numeric functions 𝑎 = {𝑎𝑟 } and
𝑏 = { 𝑏𝑟 } then
e. 𝐶(𝑧) = 𝐴(𝑧) + 𝐵(𝑧) is the generating functions of the numeric functions 𝑎𝑟 + 𝑏𝑟 .
f. 𝐶(𝑧) = 𝛼𝐴(𝑧) is the generating functions of the numeric functions 𝛼𝑎𝑟
g. 𝐶(𝑧) = 𝐴(𝑧) 𝐵(𝑧) is the generating functions of the numeric functions 𝑎𝑟 ∗ 𝑏𝑟 .

Example: Let 𝑎𝑟 = 2𝑟 and 𝑏𝑟 = 3𝑟 . Then find the generating functions of the numeric
functions 𝑎𝑟 + 𝑏𝑟 and 𝑎𝑟 ∗ 𝑏𝑟 .

Solution: (I) By definition of the generating function of 𝑎𝑟 :


1
𝐴(𝑧) = 𝑓(𝑧) = ∑∞ 𝑟 ∞ 𝑟 𝑟 ∞ 𝑟
𝑟=0 𝑎𝑟 𝑧 = ∑𝑟=0 2 𝑧 = ∑𝑟=0(2𝑧) =
1−2𝑧

And the the generating function of 𝑏𝑟


1
𝐵(𝑧) = 𝑓(𝑧) = ∑∞ 𝑟 ∞ 𝑟 𝑟 ∞ 𝑟
𝑟=0 𝑏𝑟 𝑧 = ∑𝑟=0 3 𝑧 = ∑𝑟=0(3𝑧) =
1−3𝑧
1 1
Therefore, the generating function of 𝑎𝑟 + 𝑏𝑟 = 𝐶(𝑧) = 𝐴(𝑧) + 𝐵(𝑧) = 1−2𝑧
+ 1−3𝑧.

(II) The generating function of 𝑎𝑟 ∗ 𝑏𝑟 𝑖𝑠


1 1
𝐶(𝑧) = 𝐴(𝑧) 𝐵(𝑧) = .
1 − 2𝑧 1 − 3𝑧

EXERCISE

Q.1: 𝑎𝑟 = 3. 2𝑟+2 , 𝑟 ≥ 0

Q.2: 𝑎𝑟 = 𝑟 (𝑟 + 1) , 𝑟 ≥ 0
Q.3: 𝑎𝑟 = r. 5𝑟+2 , 𝑟 ≥ 0

Q.4: 𝑎𝑟 = 3𝑟+2 , 𝑟 ≥ 0

Solution: (1) By definition of the generating function of 𝑎𝑟 :


1
𝐴(𝑧) = 𝑓(𝑧) = ∑∞ 𝑟 ∞
𝑟=0 𝑎𝑟 𝑧 = ∑𝑟=0 3. 2 𝑧 = 3. 22 ∑∞
𝑟+2 𝑟 𝑟
𝑟=0(2𝑧) = 12.
1−2𝑧

Solution (2): By definition of the generating function of 𝑎𝑟 :


∞ ∞

𝐴(𝑧) = 𝑓(𝑧) = ∑ 𝑎𝑟 𝑧 𝑟 = ∑ 𝑟 (𝑟 + 1) 𝑧 𝑟
𝑟=0 𝑟=0

Or
𝐴(𝑧) = 0 + 1.2 𝑧 + 2.3 𝑧 2 + 3.4. 𝑧 3 + …..

Or

𝐴(𝑧) = 2𝑧(1 + 3 𝑧 + 6 𝑧 2 + 10. 𝑧 3 +)= 2z(1 − 𝑧)−3

2z
Thus, (𝑧) = (1−𝑧)3 .

Solution: 3 and 4 : Try yourself.


Q.1: Find the numeric functions to the following generating functions

2+3z−6𝑧2
a. 𝐴(𝑧) = .
1−2𝑧
b. 𝐴(𝑧) = (1 + 𝑧)𝑛 + (1 − 𝑧)𝑛 , 𝑛 ∈ 𝑁
Solution: By definition of the generating function of 𝑎𝑟 :

𝐴(𝑧) = 𝑓(𝑧) = ∑ 𝑎𝑟 𝑧 𝑟 =
𝑟=0

2+3z−6𝑧 2
a. Let 𝐴(𝑧) = 1−2𝑧
Now divide (2 + 3z − 6𝑧 2 ) by (1 − 2𝑧) we get
2
𝐴(𝑧) = 3𝑧 + 1−2𝑧
𝑜𝑟
𝐴(𝑧) = 3𝑧 + 2. (1 − 2𝑧)−1
Or

𝐴(𝑧) = 3𝑧 +2(1+2z+(3𝑧)2 + ….) = 2 + 7𝑧 + 23 𝑧 2 + 24 𝑧 2 + ⋯

∴ The numeric function is

2 ,𝑟 = 0
𝑎𝑟 = { 7, 𝑟 = 1 }
2𝑟+1 , 𝑟 ≥ 2.

b. Let 𝐴(𝑧) = (1 + 𝑧)𝑛 + (1 − 𝑧)𝑛 , 𝑛 ∈ 𝑁


Or

𝐴(𝑧) = [1 + 𝑛𝐶 z+ 𝑛𝐶2 𝑧2 + 𝑛𝐶3 𝑧3 + ⋯ . . ] + [1 − 𝑛𝐶1 z+ 𝑛𝐶2 𝑧2 −


1
𝑛𝐶3 𝑧3 + ⋯ . . ]
Thus, thus numeric function is

𝐴(𝑧) = 𝑓(𝑧) = ∑ 𝑎𝑟 𝑧 𝑟 = 2 + 2. 𝑛𝐶2 𝑧 2 + 2. 𝑛𝐶4 𝑧 4 + ⋯.


𝑟=0

Hence,
0 , 𝑖𝑓 𝑟 𝑖𝑠 𝑜𝑑𝑑
𝑎𝑟 = { }
2. 𝑛𝐶𝑟 , 𝑖𝑓 𝑟 𝑖𝑠 𝑒𝑣𝑒𝑛
Q.2: Find the numeric functions to the following generating functions

2
a. 𝐴(𝑧) = 1−4𝑧 2 .
5+2z
b. 𝐴(𝑧) = 1−4𝑧 2
𝑧4
c. 𝐴(𝑧) = 1−4𝑧
1
d. 𝐴(𝑧) = 1−6𝑧+𝑧 2
𝑧5
e. 𝐴(𝑧) = 5−6𝑧+𝑧 2
1
f. 𝐴(𝑧) = 1−𝑧 3
RECURRENCE RELATIONS: Let 𝑎𝑟 = (𝑎0 , 𝑎1 , 𝑎2 , … . . 𝑎𝑟 … . . ) be discrete function. An
equation relating 𝑎𝑟 for any 𝑟 to one or more 𝑎𝑖 𝑠 , 𝑖 < 𝑟 is called a recurrence relation or a
difference equation.

i.e. A recurrence relation for the sequence {𝑎𝑟 } is an equation that relates 𝑎𝑟 in terms of one
or more of the previous terms of the sequence, namely 𝑎0 , 𝑎1 , 𝑎2 , … . . 𝑎𝑟−1 , 𝑟 ≥ 0.

For examples:

(i) 𝑦𝑟+2 − 5𝑦𝑟+1 + 6𝑦𝑟 =0, where 𝑟 ≥ 0.


(ii) 𝑦𝑥+1 − 3𝑦𝑥 = 5𝑥 , where 𝑥 ≥ 0
(iii) 𝑎𝑛 − 𝑎𝑛−1 = 2𝑛 , 𝑛 ≥ 0.
(iv) 𝑎𝑟 − 5𝑎𝑟−1 + 2𝑎𝑟−2 = 𝑟 2 + 5,

Order and degree of recurrence relations: The order of a recurrence relation is defined to be
difference between the highest and lowest subscripts of dependent variable.

For examples: in the above examples

(i) Order of = 𝑟 + 2 − 𝑟 = 2
(ii) Order = 𝑥 + 1 − 𝑥 = 1
(iii) 𝑛 − (𝑛 − 1) = 1.
(iv) 𝑟 − (𝑟 − 2)= 2

Degree of recurrence relations: The degree of recurrence relation is defined to be the


highest power of 𝑎𝑟

For examples:

(i) 𝟑𝑦𝑟 3 − 5𝑦𝑟+1 + 6𝑦𝑟 =0, Degree = 3.


(ii) 𝑎𝑟 − 5𝑎𝑟−1 + 2𝑎𝑟−2 = 0, Degree = 1.
SOLUTION OF A LINEAR RECURRENCE RELATION WITH CONSTANT
COFFICIENTS:

A recurrence relation of the form

𝑐0 𝑎𝑟 + 𝑐1 𝑎𝑟−1 + 𝑐2 𝑎𝑟−2 , … . . +𝑐𝑘 𝑎𝑟−𝑘 = 𝑓(𝑟) …….(A)

𝑤ℎ𝑒𝑟𝑒 𝑐𝑖 are constants is called a linear recurrence relation of order k- th , provide that
both 𝑐0 𝑎𝑛𝑑 𝑐𝑘 are non-zero.

For example:
1. 2 𝑎𝑟 + 3𝑎𝑟−1 = 3𝑟 , is a linear recurrence relation of first order.
2. 𝑎𝑟 − 5𝑎𝑟−1 + 2𝑎𝑟−2 = 𝑟 2 + 3,a linear recurrence relation of 2nd order.
The total solution of equation (A) is sum of two parts
a. The homogenous solution 𝑎𝑟 (ℎ) which satisfies the equation when RHS
is set to zero.
b. The particular solution 𝑎𝑟 (𝑝) which satisfies the equation with RHS,
𝑓(𝑟).

RULES FOR FIND HOMOGENOUS SOLUTION: CONSIDER the second order linear
recurrence relation:

𝑎𝑟 + 𝑐1 𝑎𝑟−1 + 𝑐2 𝑎𝑟−2 = 𝑓(𝑟)

For homogenous RHS=0.then

𝑎𝑟 + 𝑐1 𝑎𝑟−1 + 𝑐2 𝑎𝑟−2 = 0 we assume the solution is of the form 𝑎𝑟 = 𝛼 𝑟 , where 𝛼 ≠


0.

We get

𝛼 𝑟 + 𝑐1 𝛼 𝑟−1 + 𝑐2 𝛼 𝑟−2 = 0

Or

𝛼 2 + 𝑐1 𝛼1 + 𝑐2 = 0 , this equation is called characteristic equation, solving we get


roots

Called characteristics roots.

Case 1: if roots are distinct, then homogenous solution is

𝑎𝑟 (ℎ) = 𝑐1 𝛼 𝑟 1 +𝑐2 𝛼 𝑟 2 , where 𝑐1 𝑎𝑛𝑑 𝑐2 are constants.


Case 2: if roots are equal, then

𝑎𝑟 (ℎ) = (𝑐1 +𝑟𝑐2 )𝛼 𝑟 .

Examples:

1. 𝑎𝑟 − 4𝑎𝑟−1 − 11𝑎𝑟−2 + 30𝑎𝑟−3 = 0.

Solution: The characteristic equation is

𝛼 3 − 4𝛼 2 − 11𝛼 + 30 = 0

𝑡ℎ𝑒 𝑟𝑜𝑜𝑡𝑠 𝑜𝑓 𝑔𝑖𝑣𝑒𝑛 𝑒𝑞𝑢𝑎𝑡𝑖𝑜𝑛 after solving are 𝛼 = 2, −3,5

∴ homogenous solution is

𝑎𝑟 (ℎ) = 𝑐1 22 +𝑐2 5𝑟 + 𝑐3 (−3)𝑟 .

EXERCISE:

Solve the following recurrence relations

Q.1: 𝑎𝑟 − 3𝑎𝑟−1 − 4𝑎𝑟−2 = 0.

Q.2: 𝑎𝑟 − 4𝑎𝑟−1 + 4𝑎𝑟−2 = 0.

𝑄. 3: 𝑎𝑟 − 5𝑎𝑟−1 + 6𝑎𝑟−2 = 0.

𝑄.4: 𝑎𝑟 − 2𝑎𝑟−1 + 𝑎𝑟−2 = 0.

RULES FOR FIND HOMOGENOUS SOLUTION:

IF RHS = 𝑓(𝑟) = 𝛽 𝑟 form:

a. If 𝛽 is not equal to characteristic roots , then assume particular solution

𝑎𝑟 (𝑝) = 𝑝𝛽 𝑟 , where p is constant.

b. If 𝛽 is equal to characteristic roots with multiplicity one ,

Then assume particular solution, 𝑎𝑟 (𝑝) = 𝑝 𝑟 𝛽 𝑟 , where p is constant.

c. If 𝛽 is equal to characteristic roots with multiplicity m ,

Then assume particular solution, 𝑎𝑟 (𝑝) = 𝑝 𝑟 𝑚 𝛽 𝑟 , where p is constant.

For example: 𝑎𝑟 − 3𝑎𝑟−1 − 4𝑎𝑟−2 = 3𝑟 , 𝑔𝑖𝑣𝑒𝑛 𝑎0 = 1, 𝑎1 = 2


Solution: Given : 𝑎𝑟 − 3𝑎𝑟−1 − 4𝑎𝑟−2 = 3𝑟 ……(1)

The characteristic equation is

𝛼 2 − 3𝛼 − 4 = 0

𝑡ℎ𝑒 𝑟𝑜𝑜𝑡𝑠 𝑜𝑓 𝑔𝑖𝑣𝑒𝑛 𝑒𝑞𝑢𝑎𝑡𝑖𝑜𝑛 after solving are 𝛼 = −1,4

∴ homogenous solution is

𝑎𝑟 (ℎ) = 𝑐1 (−1)𝑟 +𝑐2 4𝑟

𝐹𝑜𝑟 Particular solution, 𝑓(𝑟) = 3𝑟 and base 𝛽 = 3 is not equal to roots { 𝛼 =


−1,4}

We assume particular solution, 𝑎𝑟 = 𝑝 3𝑟 and put in (1) we get

𝑝 3𝑟 − 3𝑝 3𝑟−1 − 4𝑝 3𝑟−2 = 3𝑟

𝑜𝑟

3𝑟−2 {9𝑝 − 9𝑝 − 4𝑝} = 3𝑟

𝑡ℎ𝑖𝑠 𝑔𝑖𝑣𝑒𝑠
−9
𝑝= 4

𝐻𝑒𝑛𝑐𝑒 particular solution is


−9
𝑎𝑟 𝑝 = 3𝑟 .
4

𝑇ℎ𝑢𝑠, Complete solution is , 𝑎𝑟 = 𝑎𝑟 (ℎ) + 𝑎𝑟 𝑝 .

EXERCISE:

Solve the following recurrence relations

Q.1: 𝑎𝑟 − 3𝑎𝑟−1 − 4𝑎𝑟−2 = 3𝑟 .

Q.2: 𝑎𝑟 − 4𝑎𝑟−1 + 4𝑎𝑟−2 = 2𝑟

𝑄. 3: 𝑎𝑟 − 5𝑎𝑟−1 + 6𝑎𝑟−2 = 2 + 𝑟.

𝑄.4: 𝑎𝑟 − 5𝑎𝑟−1 + 6𝑎𝑟−2 = 2𝑟 + 𝑟.

With bounder condition 𝑎0 = 1, 𝑎1 = 2

You might also like