9.3: Bell Numbers and Exponential Generating Functions
( \newcommand{\kernel}{\mathrm{null}\,}\)
Sometimes a recurrence relation involves factorials, or binomial coefficients. When this happens, it becomes difficult if not impossible to use ordinary generating functions to find an explicit formula for the nth term of the sequence. In some cases, a different kind of generating function, the exponential generating function, may succeed where an ordinary generating function fails.
Definition: Exponential Generating Function
The exponential generating function for the sequence a0,a1,..., is
∞∑i=0aixii!
Obviously, the difference between this and an ordinary generating function comes from the factorial expression in the denominator. Cancellation between this and expressions in the numerator can lead to nicer compact expressions
Example 9.3.1
The exponential generating function for the sequence 1,1,1,... is
10!+x1!+x22!+...
This is the Taylor series expansion for ex. Thus, ex is the exponential generating function for 1,1,1,....
We will not be using exponential generating functions in this class; we are just introducing the topic. We will go through one example of a sequence for which exponential generating functions are useful: the Bell numbers
Definition: Bell Number
The Bell number Bn is the number of partitions of {1,...,n} into subset.
Let’s look at the first few Bell numbers
Example 9.3.2
There is only one way to partition {1} into subsets: {1}, so B1=1.
There are two ways to partition {1,2} into subsets: {1}, {2}, or {1,2}, so B2=2.
There are five ways to partition {1,2,3} into subsets: {1}, {2}, {3}, or {1,2}, {3}, or {1,3}, {2}, or {2,3}, {1}, or {1,2,3}, so B3=5.
Probably after seeing the above examples, you don’t want to calculate larger Bell numbers directly. However, we can derive a recursive relation for these numbers. For this relation to work properly, we will define B0=1.
Proposition 9.3.1
For n≥1, the nth Bell number
Bn=n∑k=1(n−1k−1)Bn−k
- Proof
-
We’ll use a combinatorial proof of this statement. We know that Bn is the number of partitions of {1,...,n} into subsets.
For the other side of the equation, let’s consider the subset that contains the element n, and call the cardinality of this subset k. Since n is in this subset, k≥1, and since this is a subset of 1,...,n, we have k≤n, so 1≤k≤n. There are (n−1k−1) ways to choose the remaining k−1 elements of this subset; that is, for any 1≤k≤n, there are (n−1k−1) ways to choose the subset of 1,...n that contains the element n. For each of these ways, there are n−k other elements that must be partitioned, and by the definition of the Bell numbers, there are Bn−k ways to partition them into subsets. (Our definition of B0=1 deals with the case k=n, ensuring that the (n−1n−1)=1 way of choosing n to be in a single set of all n elements is counted once and only once.)
Thus, using the product and sum rules, we see that
Bn=∑nk=1(n−1k−1)Bn−k
Let us try to find the exponential generating function for the Bell numbers. When dealing with exponential generating functions, notice that the derivative of xnn! is nxnn!=xn−1(n−1)!, so taking derivatives often results in a nice expression that helps us find a nice expression for the coefficients. You already know a particularly nice example of this: the derivative of ex is ex, which tells us that all of the coefficients in that exponential generating function are equal.
Define
B(x)=∑∞i=0Bixii!=B0+B1x1!+B2x22!+...+Bnxnn!
Notice that the derivative of this is
ddxB(x)=B1+B2x1!+B3x22!+...+Bnxn−1(n−1)!=∞∑n=1Bnxn−1(n−1)!
Using our recursive relation from Proposition 9.3.1, we see that this is
ddxB(x)=∞∑n=1[n∑k=1(n−1k−1)Bn−k]xn−1(n−1)!=∞∑n=1[n∑k=1(n−1)!(k−1)!(n−k)!Bn−kxn−1(n−1)!]=∞∑n=1[n∑k=11(k−1)!(n−k)!Bn−kxn−1]=∞∑n=1[n∑k=1xk−1(k−1)!Bn−kxn−k(n−k)!]
Notice that for each value of n, as k goes from 1 to n the values k−1 and n−k take on every pair of non-negative integral values that add up to n. Thus, as n goes from 1 to infinity, the values k−1 and n−k take on every possible pair of non-negative integral values. Therefore, we can rewrite this expression as
ddxB(x)=∞∑j=0[∞∑i=0xjj!Bixii!]=∞∑j=0xjj![∞∑i=0Bixii!]=[∞∑j=0xjj!][∞∑i=0Bixii!]
Now, consider the derivative of e−(ex)B(x). By the product and chain rules, this is
e−(ex)exB(x)−B(x)e−(ex)ex=0,
so it must be the case that e−(ex)B(x) is constant, say e−(ex)B(x)=c. Then B(x)=ce(ex).
Since
B(0)=∑∞n=0Bn0nn!=1+∑∞n=10=1,
(recall that 00=0, or if you don’t like that, simply use the expansion of B(0)), we see that
cee0=ce1=ce=1,
so c=e−1. Hence
B(x)=e−1e(ex)=e(ex−1).
There are techniques to extract coefficients from expressions like this, also, but we will not cover these techniques in this class.
Exercise 9.3.1
- Find B4.
- What is the exponential generating function for the sequence ai=i! for every i≥0? Give the sequence in both an expanded and a closed form.
- What is the exponential generating function for the sequence bi=(i+1)!2 for every i≥0? Give the sequence in both an expanded and a closed form.