DNF - Generating Functions
DNF - Generating Functions
function and
Generating function
Discrete Numeric Function
Generating Function
Generating function provide an alternative way for representing and studying numeric
functions and for solving recurrence relations as well as combinatorial problems.
Let (𝒂𝟎 , 𝒂𝟏 , 𝒂𝟐 , ….. 𝒂𝒓 , …) be a numeric function a. Then the infinite series in terms of a
parameter z,
𝐀 𝒛 = 𝒂𝟎 + 𝒂𝟏 𝒛 + 𝒂𝟐 𝒛𝟐 ….. 𝒂𝒓 𝒛𝒓 + ……. (1)
Is called generating function of the numeric function a.
or
If (𝒂𝟎 , 𝒂𝟏 , 𝒂𝟐 , ….. 𝒂𝒓 , …) is a sequence of real or complex numbers, then the power series
given by
𝐀 𝒛 = σ∞ 𝒂
𝒓=𝟎 𝒓 𝒛𝒓 = 𝒂 + 𝒂 𝒛 + 𝒂 𝒛𝟐 ….. 𝒂 𝒛𝒏 + ……. ..
𝟎 𝟏 𝟐 𝒏
1
1 − 2𝑧
Geometric Series
Gn ::= 1+ x + x2 + …… + xn-1 + xn + ……
What is the closed form expression of Gn?
Gn ::= 1+ x + x2 + …… + xn-1 + xn + ……
xGn = x+x +x +2 3 …… +x + x
n n+1
+ ……
Gn−xGn= 1
1-x n+1
Gn =
1-x
More Examples
𝑎0 = 1, 𝑎1 = 1, 𝑎2 = 1, 𝑎3 = 1, 𝑎4 = 1, 𝑎5 = 1, 𝑎6 = 1.
a 𝑧 = σ∞ 𝑎
𝑟=0 𝑟 𝑧 𝑟 = 𝑎 + 𝑎 𝑧 + 𝑎 𝑧2 + 𝑎 𝑧3+ 𝑎 𝑧4+ 𝑎 𝑧5 + 𝑎 𝑧6
0 1 2 3 4 5 6
= 1+𝑧 + 𝑧 2 + 𝑧 3 + 𝑧 4 + 𝑧 5 + 𝑧 6
1−𝑧 7
=
1−𝑧
Example: Find the generating function of the following series
1, -1, 1, -1, 1, -1,………………..
a 𝑧 = σ∞
𝑟=0 𝑎𝑟 𝑧 𝑟 = 𝑎 + 𝑎 𝑧 + 𝑎 𝑧 2 + 𝑎 𝑧 3 + 𝑎 𝑧 4 +……………………
0 1 2 3 4
1
= 1−𝑧 + 𝑧 2 − 𝑧 3 +…………………..=
1+𝑧
=(1 + 𝑧)−1
GENERATING
FUNCTION FOR
THE SEQUENCE
OF REAL
NUMBERS
If (𝑎0 , 𝑎1 , 𝑎2 , ….. 𝑎𝑟 , …) is a sequence of real or complex numbers, then the power series
given by
A z = σ∞ 𝑎
𝑟=0 𝑟 𝑧 𝑟 = 𝑎 , +𝑎 𝑧 + 𝑎 𝑧 2 ….. 𝑎 𝑧 𝑛 + ……. ..
0 1 2 𝑛
k zeros
k zeros
Solution:
The required generating function of given series 𝑎𝑟 = 7. 3𝑟 is
A 𝑧 = σ∞
𝑟=0 𝑎𝑟 𝑧 𝑟 = σ∞ 7. 3𝑟 𝑧 𝑟
𝑟=0
1 7
=7. =
1−3 𝑧 1−3 𝑧
Example: Determine the numeric function corresponding to the following generating
function.
2
A(z)= 2 1−4𝑧
2 2 1 1
Solution: We have A(z) = = = +
1−4𝑧 2 (1−2𝑧)(1+2𝑧) (1−2𝑧) (1+2𝑧)
𝑎𝑟 = 2𝑟 + (-2)𝑟 , 𝑟 ≥ 0
0, 𝑟 𝑖𝑠 𝑜𝑑𝑑
=ቊ
2𝑟+1 , 𝑟 𝑖𝑠 𝑒𝑣𝑒𝑛