The use of exponential generating functions (EGFs) to study the properties of Stirling numbers is a classical exercise in combinatorial mathematics and possibly the canonical example of how symbolic combinatorics is used. It also illustrates the parallels in the construction of these two types of numbers, lending support to the binomial-style notation that is used for them.
This article uses the coefficient extraction operator
[zn]
ak{C}
ak{P}
l{P}=\operatorname{SET}(\operatorname{CYC}(l{Z})),
and
l{B}=\operatorname{SET}(\operatorname{SET}\ge(l{Z})),
l{Z}
Warning: The notation used here for the Stirling numbers is not that of the Wikipedia articles on Stirling numbers; square brackets denote the signed Stirling numbers here.
The unsigned Stirling numbers of the first kind count the number of permutations of [''n''] with k cycles. A permutation is a set of cycles, and hence the set
l{P}
l{P}=\operatorname{SET}(l{U} x \operatorname{CYC}(l{Z})),
where the singleton
l{U}
Translating to generating functions we obtain the mixed generating function of the unsigned Stirling numbers of the first kind:
G(z,u)=\exp\left(ulog
1 | |
1-z |
\right)= \left(
1 | |
1-z |
\right)u
infty | |
= \sum | |
n=0 |
n | |
\sum | |
k=0 |
\left[\begin{matrix}n\ k\end{matrix}\right]uk
zn | |
n! |
.
Now the signed Stirling numbers of the first kind are obtained from the unsigned ones through the relation
(-1)n-k\left[\begin{matrix}n\ k\end{matrix}\right].
H(z,u)
H(z,u)=G(-z,-u)= \left(
1 | |
1+z |
\right)-u=(1+z)u
infty | |
= \sum | |
n=0 |
n | |
\sum | |
k=0 |
(-1)n-k\left[\begin{matrix}n\ k\end{matrix}\right]uk
zn | |
n! |
.
A variety of identities may be derived by manipulating this generating function:
(1+z)u=
infty | |
\sum | |
n=0 |
{u\choosen}zn=
infty | |
\sum | |
n=0 |
zn | |
n! |
n | |
\sum | |
k=0 |
(-1)n-k\left[\begin{matrix}n\ k\end{matrix}\right]uk=
infty | |
\sum | |
k=0 |
infty | |
u | |
n=k |
zn | |
n! |
(-1)n-k\left[\begin{matrix}n\ k\end{matrix}\right]=eulog(1+z).
In particular, the order of summation may be exchanged, and derivatives taken, and then z or u may be fixed.
A simple sum is
n | |
\sum | |
k=0 |
(-1)k\left[\begin{matrix}n\ k\end{matrix}\right]=(-1)nn!.
This formula holds because the exponential generating function of the sum is
H(z,-1)=
1 | |
1+z |
andhence n![zn]H(z,-1)=(-1)nn!.
Some infinite sums include
infty | |
\sum | |
n=k |
\left[\begin{matrix}n\ k\end{matrix}\right]
zn | |
n! |
=
\left(-log(1-z)\right)k | |
k! |
where
|z|<1
z=0
log(1+z)
z=-1.
This relation holds because
[uk]H(z,u)=[uk]\exp\left(ulog(1+z)\right)=
\left(log(1+z)\right)k | |
k! |
.
These numbers count the number of partitions of [''n''] into k nonempty subsets. First consider the total number of partitions, i.e. Bn where
Bn=
n | |
\sum | |
k=1 |
\left\{\begin{matrix}n\ k\end{matrix}\right\} andB0=1,
i.e. the Bell numbers. The Flajolet–Sedgewick fundamental theorem applies (labelled case).The set
l{B}
l{B}=\operatorname{SET}(\operatorname{SET}\ge(l{Z})).
This decomposition is entirely analogous to the construction of the set
l{P}
l{P}=\operatorname{SET}(\operatorname{CYC}(l{Z})).
and yields the Stirling numbers of the first kind. Hence the name "Stirling numbers of the second kind."
The decomposition is equivalent to the EGF
B(z)=\exp\left(\expz-1\right).
Differentiate to obtain
d | |
dz |
B(z)=\exp\left(\expz-1\right)\expz=B(z)\expz,
which implies that
Bn+1=
n | |
\sum | |
k=0 |
{n\choosek}Bk,
by convolution of exponential generating functions and because differentiating an EGF drops the first coefficient and shifts Bn+1 to z n/n!.
The EGF of the Stirling numbers of the second kind is obtained by marking every subset that goes into the partition with the term
l{U}
l{B}=\operatorname{SET}(l{U} x \operatorname{SET}\ge(l{Z})).
Translating to generating functions, we obtain
B(z,u)=\exp\left(u\left(\expz-1\right)\right).
This EGF yields the formula for the Stirling numbers of the second kind:
\left\{\begin{matrix}n\ k\end{matrix}\right\}= n![uk][zn]B(z,u)= n![zn]
(\expz-1)k | |
k! |
or
n![zn]
1 | |
k! |
k | |
\sum | |
j=0 |
{k\choosej}\exp(jz)(-1)k-j
which simplifies to
n! | |
k! |
k | |
\sum | |
j=0 |
{k\choosej}(-1)k-j
jn | = | |
n! |
1 | |
k! |
k | |
\sum | |
j=0 |
{k\choosej}(-1)k-jjn.