Discrete Mathematics Discrete Mathematics: - Chapter 9: Generating Function
Discrete Mathematics Discrete Mathematics: - Chapter 9: Generating Function
Discrete Mathematics Discrete Mathematics: - Chapter 9: Generating Function
z Easier to compute
p with a power
p series than with a polynomial
p y
z Definition 9.1:
= 1
(1− x ) 2
= d
dx (1 + x + x 2 + x 3 + ⋅ ⋅ ⋅) = 1 + 2 x + 3 x 2 + 4 x 3 + ⋅ ⋅ ⋅
= d
d
dx
x(1 − x) −2
x +1
= 1 + 2 2 x + 32 x 2 + 4 2 x 3 + ⋅ ⋅ ⋅
(1− x ) 3 = (1 − x) −2 + x(−2)(1 − x) −3 (−1)
(1− x ) + 2 x x +1
= =
(1− x ) 3
(1− x )3
z Ex 9.6 :
a)) 1/(1
( - ax)) is the generating
g g function for the sequence
q a0, a1, a2,
a3,…
b) f(x) = 1/(1- x) is the generating function for the sequence 1, 1,
1, 1,… Then
z g(x) = f(x) - x2 is the generating function for the
sequence 1, 1 11, 00, 1,
1 11, 11,…
z h(x) = f(x) + 2x3 is the generating function for the
sequence 1, 1, 1, 3, 1, 1,…
c) Can we find a generating function for the sequence 0, 2, 6, 12,
20, 30, 42,…?
z Ex 9.6 :
c) Observe 0,, 2,, 6,, 12,, 20,...
,
a0 = 0 = 0 2 + 0, a1 = 2 = 12 + 1,
a2 = 6 = 2 2 + 2, a3 = 12 = 32 + 3,
a4 = 20 = 4 2 + 4, ⋅ ⋅ ⋅
∴ an = n 2 + n
x ( x + 1) x x ( x + 1) + x (1 − x )
+ = = 2x
(1 − x )3 (1 − x ) 2 (1 − x )3 (1 − x )3
is the generating function.
z Binomial theorem: (1 + x ) n = ( )+ ( )x + ( )x
n
0
n
1
n
2
2
+ ⋅⋅⋅ + ( )x
n
n
n
z Ex 9.7 :
(1-x)-n ?
The coefficient of x 5 :
( )(−2)
−7
5
5
= (−1) 5 ( )(−32) = (32)( )
7 + 5 −1
5
11
5
⎝1− x ⎠ (1 − x ) n i =0 ⎝ i ⎠
= x12(1+x+x2+x3+x4+x5)4
= x12[(1
[(1-xx6)/(1 x)]4
)/(1-x)]
z The answer is the coefficient of x12 in (1-x6)4(1-x)-4
z The sequence c0, c1, c2, … is the convolution of the sequences a0, a1,
a2, … and b0, b1, b2, …
http://mathworld.wolfram.com/FerrersDiagram.html