Combinatorics – Need for Exponential Generating Functions

combinatoricsgenerating-functions

I've been introduced in my last lectures. And for the following problem:

Having 3 different types of books $a,b,c$ in how many ways can we take four different books putting them in a shelf such that the book $a$ can only be taken at most $1$ time, $b$ can be taken at most $3$ times and $c$ can only be taken at most $2$ times?

The ordinary generating function for this problem is:

$\quad \quad \quad \quad \quad \quad \quad $enter image description here

Looking at the exponential generating function of the same problem, the only part of interest is the coefficient of $x^4$, which is:

$$\left(\frac{ab^3}{1!3!}+\frac{b^3c}{3!1!}+\frac{ab^2c}{1!2!1!}+\frac{b^2c^2}{2!2!}+\frac{abc^2}{1!1!2!}\right)$$ And then multiply it by $4!/4!$. But why do I need an exponential generating function? Isn't only needed to take the coefficient of $x^4$, divide each term of it by $a_1!a_2!\dots a_n!$ with $a_n=\text{power of a,b,c,}\dots$ and then multiply it by $4!4!$? It's not clear why such complication is needed.

By complication I mean to expand that generating function with the factorials, I could expand the ordinary generating function and then artificially add the factorials.

Best Answer

The most blatant reason why exponential generating functions are useful (for infinite sequences) is that the ordinary power series might not converge. If $a_n = n!$, for example, the ordinary generating function does not exist as any kind of analytic object.

But the deeper reason why exponential generating functions are so common is that they have interesting product and composition formulas. If we have a sequence $c_n = \sum_{k=0}^n {n\choose k} a_k b_{n-k}$, then the exponential generating function for the $c_n$ is the product of the egf for $a_n$ and the egf for $b_n$. In other words, sequences defined by a sum of choices have a tendency to possess nice exponential generating functions.

For example, suppose that we want to compute the number of subsets of an $n$-element set. By the product formula, this has egf $e^x \cdot e^x = e^{2x}$, so the answer is $2^n$. To count the number of surjective functions from a set of $n$ elements to a set of $m$ elements, we can work with the egf $(e^x-1)^m$, and so on.

With a bit more finesse, we can make sense of the composition of exponential generating functions as well. For example, the Bell numbers $B_n$, which count partitions, have exponential generating function $e^{e^x - 1}$, which follows from very general theory. Try doing that with ordinary generating functions.

Related Question