Generating Functions: 1 Introductory Examples
Generating Functions: 1 Introductory Examples
Generating Functions: 1 Introductory Examples
Generating Functions
1 Introductory Examples
Example 1 Given three distinct objects a ,b and c .
x i : to select i objects
(to select a or not to select a ) and (to select b or not to select b ) and (to select c or not to select c )
=
Example 2
Comupte the number of solutions (x 1 , x 2 , x 3 ) for x 1 + x 2 + x 3 = 12 where 4 x 1 , 2 x 2 , 2 x 3 5.
1
2 Generating Functions
Definition 1 Let a 0 , a 1 , a 2 , . . . be a sequence of real numbers. The function
X
f (x ) = a 0 + a 1 x + a 2 x + =
2
aixi
i =0
Example 1 For n Z+
n n n 2 n n
(1 + x ) =
n
+ x+ x + + x ,
0 1 2 n
Example 2 For n Z+
(1 x n +1 ) = (1 x )(1 + x + x 2 + + x n ),
so (1 x n +1 )/(1 x ) is the GF for the sequence
Example 3
2
Example 4
+ With n R, r Z , we have
+
n(n 1)(n 2) (n r + 1)
n
=
r r!
Example 5 Let m Z+ . (1 + x )m =?
Example 7 (1 + 3x )1/3
3
Example 8 Determine the coefficient of x 15 in F (x ) = (x 2 + x 3 + x 4 + )4
Example 9 In how many ways can we select, with repetitions allowed, r objects from n distinct
objects .
, Table 9.2
1
Example 11 Determine the coefficient of x 8 in (x 3)(x 2)2
.
4
Example 12 Suppose that we have three types of objects, a s, b s, and c s. Suppose that we can pick
either 0, 1, or 2 a s, then 0 or 1 b and finally 0 or 1 c . How many ways are there to pick k objects?
5
3 Partitions of Integers
- A partition is an integer is a division of the integer into position integral parts, in which the order
of these parts is not important.
For example
p (2) = 2 : 2 = 1 + 1
p (3) = 3 : 3 = 2 + 1 = 1 + 1 + 1
p (5) = 7
6
Example 1 Find the GF for the number of ways an advertising agent can purchase n minutes (n
Z+ ) of air time slots for commerical come in blocks of 30, 60 or 120 seconds.
Example 2 Find the GF for Pd (n) , the partitions of a positive int n into distinct summands.
Example 3 Pd (x )
7
4 The Exponential Generating Functions
+ For 0 r n , n! 1
C (n, r ) = = P(n, r )
r !(n r )! r !
(1 + x )n = C (n, 0) + C (n, 1)x + C (n, 2)x 2 + + C (n , n)x n
x2 xn
= P(n, 0) + P(n, 1)x + P(n, 2) + + P(n, n)
2! n!
Definition 2 Let a 0 , a 1 , a 2 , . . . be a sequence of real numbers. The function
X xi
x2 x3
f (x ) = a 0 + a 1 x + a 2 + a3 + = ai
2! 3! i =0
i!
is called the exponential generating function (EGF) for the given sequence.
Example 1
X xi
x2 x3
e = 1+x +
x
+ + =
2! 3! i =0
i!
So e x is the EGF for the sequence 1, 1, 1, . . . .
xp
Let indicate that there are p identical objects to be permuted. Then the number of ways of permu-
p!
tations of p + q objects, with p of them of one kind and q of them of another kind, can be computed
as
x p x q x p +q (p + q )! x p +q
= =
p! q! p !q ! p !q ! (p + q )!
8
Example 2 In how many ways can four of the letters in ENGINE be arranged?
+e x
2 3 4 2 3 4
= 1 + x + x2! + x3! + x4! and e x = 1 x + x2! x3! + x4! +
Thus
e x + e x x2 x4 e x e x x3 x5
=1+ + + and =x + + +
2 2! 4! 2 3! 5!
Example 3 A ship carries 48 flags, 12 each of the colors red, white, blue, and black. Twelve of these
flags are placed on a vertical pole in order to communicate a signal to other ships. How many of these
signals use an even number of blue flags and an odd number of black flags?
Example 4 A company hires 11 new employees. Each of these employees is to be assigned to one
of four subdivisions with each subdivision getting at least one new employee. In how many ways can
these assignments be made?