MATH 681
Notes
Combinatorics and Graph Theory I
1
Generating functions, continued
1.1
Exponential generating functions and setpartitions
At this point, we’ve come up with good generatingfunction discussions based on 3 of the 4 rows
of our twelvefold way. Will our integerpartition tricks work with exponential generating functions
to give us rules for putting distinct balls into indistinct boxes (a.k.a. setpartitions)?
Recall that for the integerpartition problem our series of sequential procedures was to ﬁrst select
the number of boxes with one ball, then the number of boxes with 2 balls, then the number of
boxes with 3 balls, etc. Would that work in this case? Let’s try it:
Question 1:
Find an exponential generating function for the number of ways to distribute
n
balls
among unlabeled boxes.
Answer 1:
An exponential generating function for the number of ways to select boxes with 1 ball
in is easy: there is only one way to ﬁll zero boxes, one way to ﬁll one box, etc., so the generating
function would be:
1 +
x
+
x
2
2!
+
···
=
∞
X
n
=0
x
n
n
!
=
e
x
Filling boxes with two balls gets harder, however: there is one way to set up zero boxes with two
balls each, one way to set up one box, three ways to set up two boxes, and ﬁfteen ways to set up
six, etc. This ends up being ugly pretty fast, and doesn’t lend itself to computation.
However, since we already know this statistic (these are the Bell numbers), we shouldn’t have to go
home emptyhanded: we can actually work out what the generating function is! Recall that
B
n
=
n
X
k
=1
S
(
n,k
) =
n
X
k
=1
1
k
!
k
X
i
=0
(

1)
k

i
±
k
i
²
i
n
So the generating function we seek is the heinous expression:
∞
X
n
=0
B
n
x
n
n
!
=
∞
X
n
=0
n
X
k
=1
k
X
i
=0
(

1)
k

i
(
k
i
)
i
n
n
!
k
!
x
n
This is actually pretty easy! We can ﬁnd the generating function for
S
(
n,k
)
from the known
generating function for
k
!
S
(
n,k
)
:
∞
X
n
=0
k
!
S
(
n,k
)
x
n
n
!
= (
e
x

1)
k
so
∞
X
n
=0
S
(
n,k
)
x
n
n
!
=
(
e
x

1)
k
k
!
and since
B
n
=
∑
n
k
=0
S
(
n,k
)
, and we can include the zero terms when
k > n
to get
B
n
=
Page 1 of 9
September 24, 2009