Appendix C: Exponential Generating Functions
- Page ID
- 77607
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)C.1: Indicator Functions
When we introduced the idea of a generating function, we said that the formal sum
\(\sum_{i=0}^{n} a_ix^i\)
may be thought of as a convenient way to keep track of the sequence \(a_i\). We then did quite a few examples that showed how combinatorial properties of arrangements counted by the coefficients in a generating function could be mirrored by algebraic properties of the generating functions themselves. The monomials \(x^i\) are called indicator polynomials. (They indicate the position of the coefficient \(a_i\).) One example of a generating function is given by
\((1 + x)^n = \sum_{i=0}^{\infty} \binom{n}{i} x^i \).
Thus we say that \((1+ x)^n\) is the generating function for the binomial coefficients \( \binom{n}{i} \). The notation tells us that we are assuming that only \(i\) varies in the sum on the right, but that the equation holds for each fixed integer \(n\). This is implicit when we say that \((1+ x)^n\) is the generating function for \( \binom{n}{i} \), because we haven’t written i anywhere in \((1+ x)^n\), so it is free to vary.
Another example of a generating function is given by
\(x^{\underline{n}} = \sum_{i=0}^{\infty} s(n, i)x^i\).
Thus we say that \(x^n\) is the generating function for the Stirling numbers of the first kind, \(s(n, i)\). There is a similar equation for Stirling numbers of the second kind, namely
\(x^n = \sum_{i=0}^{\infty} S(n, i)x^{\underline{i}}\)
However, with our previous definition of generating functions, this equation would not give a generating function for the Stirling numbers of the second kind, because \(S(n, i)\) is not the coefficient of \(x^i\). If we were willing to consider the falling factorial powers \(x^i\) as indicator polynomials, then we could say that \(x^n\) is the generating function for the numbers \(S(n, i)\) relative to these indicator polynomials. This suggests that perhaps different sorts of indicator polynomials go naturally with different sequences of numbers.
The binomial theorem gives us yet another example.
\(\circ\) Exercise \(371\)
Write \((1+x)^n\) as a sum of multiples of \(\dfrac{x^i}{i!}\) rather than as a sum of multiples of \(x^i\).
This example suggests that we could say that \((1+x)^n\) is the generating function for the falling factorial powers \(n^{\underline{i}}\) relative to the indicator polynomials \(\dfrac{x^i}{i!}\). In general, a sequence of polynomials is called a family of indicator polynomials if there is one polynomial of each nonnegative integer degree in the sequence. Those familiar with linear algebra will recognize that this says that a family of indicator polynomials form a basis for the vector space of polynomials. This means that each polynomial way can be expressed as a sum of numerical multiples of indicator polynomials in one and only one way. One could use the language of linear algebra to define indicator polynomials in an even more general way, but a definition in such generality would not be useful to us at this point.
C.2: Exponential Generating Functions
We say that the expression \( \sum_{i=0}^{\infty} a_i \dfrac{x^i}{i!}\) is the exponential generating function for the sequence \(a_i\). It is standard to use EGF as a shorthand for exponential generating function. In this context, we call the generating function \( \sum_{i=0}^{n} a_i x^i\) that we originally studied the ordinary generating function for the sequence \(a_i\). You can see why we use the term exponential generating function by thinking about the exponential generating function (EGF) for the all ones sequence,
\[ \sum_{i=0}^{\infty} 1 \dfrac{x^i}{i!} = \sum_{i=0}^{\infty} \dfrac{x^i}{i!} = e^x,\]
which we also denote by \(\exp(x)\). Recall from calculus that the usual definition of \(e^x\) or \(\exp(x)\) involves limits at least implicitly. We work our way around that by defining \(e^x\) to be the power series \(\sum_{i=0}^{\infty} \dfrac{x^i}{i!}\).
\(\circ\) Exercise \(372\)
Find the EGF (exponential generating function) for the sequence \(a_n = 2^n\). What does this say about the EGF for the number of subsets of an \(n\)-element set?
\(\circ\) Exercise \(373\)
Find the EGF (exponential generating function) for the number of ways to paint the \(n\) streetlight poles that run along the north side of Main Street in Anytown, USA using four colors.
Exercise \(374\)
For what sequence is \(\dfrac{e^x−e^{−x}}{2} = \cosh x\) the EGF (exponential generating function)?
\(\bullet\) Exercise \(375\)
For what sequence is \(\ln \left( \dfrac{1}{1−x} \right)\) the EGF? (\(\ln(y)\) stands for the natural logarithm of \(y\). People often write \(\log(y)\) instead.) Hint: Think of the definition of the logarithm as an integral, and don’t worry at this stage whether or not the usual laws of calculus apply, just use them as if they do! We will then define \(\ln(1 − x)\) to be the power series you get.a
\(\bullet\) Exercise \(376\)
What is the EGF for the number of permutations of an \(n\)-element set?
\(\rightarrow \; \bullet\) Exercise \(377\)
What is the EGF for the number of ways to arrange \(n\) people around a round table? Try to find a recognizable function represented by the EGF. Notice that we may think of this as the EGF for the number of permutations on \(n\) elements that are cycles. (Hint).
\(\rightarrow \; \bullet\) Exercise \(378\)
What is the EGF \(\sum_{n=0}^{\infty} p_{2n} \dfrac{x^{2n}}{(2n)!}\) for the number of ways \(p_{2n}\) to pair up \(2n\) people to play a total of \(n\) tennis matches (as in Problems 12 and 44)? (Hint).
\(\circ\) Exercise \(379\)
What is the EGF for the sequence \(0, 1, 2, 3,...\)? You may think of this as the EFG for the number of ways to select one element from an \(n\) element set. What is the EGF for the number of ways to select two elements from an \(n\)-element set?
\(\bullet\) Exercise \(380\)
What is the EGF for the sequence \(1, 1,..., 1,...\)? Notice that we may think of this as the EGF for the number of identity permutations on an \(n\)-element set, which is the same as the number of permutations of \(n\) elements that are products of \(1\)-cycles, or as the EGF for the number of ways to select an \(n\)-element set (or, if you prefer, an empty set) from an \(n\)-element set. As you may have guessed, there are many other combinatorial interpretations we could give to this EGF.
\(\circ\) Exercise \(381\)
What is the EGF for the number of ways to select \(n\) distinct elements from a one-element set? What is the EGF for the number of ways to select a positive number \(n\) of elements from a one element set? Hint: When you get the answer you will either say “of course,” or “this is a silly problem.” (Hint).
\(\bullet\) Exercise \(382\)
What is the EGF for the number of partitions of a \(k\)-element set into exactly one block? (Hint: is there a partition of the empty set into exactly one block?)
\(\bullet\) Exercise \(383\)
What is the EGF for the number of ways to arrange \(k\) books on one shelf (assuming they all fit)? What is the EGF for the number of ways to arrange \(k\) books on a fixed number \(n\) of shelves, assuming that all the books can fit on any one shelf? (Remember Problem 122.)
C.3: Applications to Recurrences.
We saw that ordinary generating functions often play a role in solving recurrence relations. We found them most useful in the constant coefficient case. Exponential generating functions are useful in solving recurrence relations where the coefficients involve simple functions of \(n\), because the \(n!\) in the denominator can cancel out factors of \(n\) in the numerator.
\(\circ\) Exercise \(384\)
Consider the recurrence \(a_n = na_{n−1}+n(n−1)\). Multiply both sides by \(\dfrac{x^n}{n!}\), and sum from \(n = 2\) to \(∞\). (Why do we sum from \(n = 2\) to infinity instead of \(n = 1\) or \(n = 0\)?) Letting \(y = \sum_{i=0}^{\infty} a_ix^i\), show that the left-hand side of the equation is \(y − a_0 − a_1x\). Express the right hand side in terms of \(y\), \(x\), and \(e^x\). Solve the resulting equation for \(y\) and use the result to get an equation for \(a_n\). (A finite summation is acceptable in your answer for \(a_n\).)
\(\rightarrow \; \bullet\) Exercise \(385\)
The telephone company in a city has \(n\) subscribers. Assume a telephone call involves exactly two subscribers (that is, there are no calls to outside the network and no conference calls), and that the configuration of the telephone network is determined by which pairs of subscribers are talking. Notice that we may think of a configuration of the telephone network as a permutation whose cycle decomposition consists entirely of one-cycles and two-cycles, that is, we may think of a configuration as an involution in the symmetric group \(S_n\).
a. Give a recurrence for the number \(c_n\) of configurations of the network. (Hint: Person \(n\) is either on the phone or not.)
b. What are \(c_0\) and \(c_1\)?
c. What are \(c_2\) through \(c_6\)?
\(\rightarrow \; \bullet\) Exercise \(386\)
Recall that a derangement of \([n]\) is a permutation of \([n]\) that has no fixed points, or equivalently is a way to pass out \(n\) hats to their \(n\) different owners so that nobody gets the correct hat. Use \(d_n\) to stand for the number of derangements of \([n]\). We can think of derangement of \([n]\) as a list of \(1\) through \(n\) so that \(i\) is not in the \(i^{\text{th}}\) place for any \(n\). Thus in a derangement, some number \(k\) different from \(n\) is in position \(n\). Consider two cases: either \(n\) is in position \(k\) or it is not. Notice that in the second case, if we erase position \(n\) and replace \(n\) by \(k\), we get a derangement of \([n − 1]\). Based on these two cases, find a recurrence for \(d_n\). What is \(d_1\)? What is \(d_2\)? What is \(d_0\)? What are \(d_3\) through \(d_6\)?
C.3.1: Using Calculus with Exponential Generating Functions
\(\rightarrow \; \bullet\) Exercise \(387\)
Your recurrence in Problem 385 should be a second order recurrence.
a. Assuming that the left hand side is \(c_n\) and the right hand side involves \(c_{n−1}\) and \(c_{n−2}\), decide on an appropriate power of \(x\) divided by an appropriate factorial by which to multiply both sides of the recurrence. Using the fact that the derivative of \(\dfrac{x^n}{n!}\) is \(\dfrac{x^{n−1}}{(n−1)!}\), write down a differential equation for the EGF \(T(x) = \sum_{i=0}^{\infty} c_i \dfrac{x^i}{i!}\). Note that it makes sense to substitute \(0\) for \(x\) in \(T(x)\). What is \(T(0)\)? Solve your differential equation to find an equation for \(T(x)\).
b. Use your EGF to compute a formula for \(c_n\). (Hint).
\(\rightarrow \; \bullet\) Exercise \(388\)
Your recurrence in Problem 386 should be a second order recurrence.
a. Assuming that the left-hand side is dn and the right hand side involves \(d_{n−1}\) and \(d_{n−2}\), decide on an appropriate power of \(x\) divided by an appropriate factorial by which to multiply both sides of the recurrence. Using the fact that the derivative of \(\dfrac{x^n}{n!}\) is \(\dfrac{x^{n−1}}{(n−1)!}\), write down a differential equation for the EGF \(D(x) = \sum_{i=0}^{\infty} d_i \dfrac{x^i}{i!}\). What is \(D(0)\)? Solve your differential equation to find an equation for \(D(x)\).
b. Use the equation you found for \(D(x)\) to find an equation for \(d_n\). Compare this result with the one you computed by inclusion and exclusion.
C.4: The Product Principle for EGFs
One of our major tools for ordinary generating functions was the product principle. It is thus natural to ask if there is a product principle for exponential generating functions. In Problem 383 you likely found that the EGF for the number of ways of arranging \(\)n books on one shelf was exactly the same as the EGF for the number of permutations of \([n]\), namely \(\dfrac{1}{1−x}\) or \((1 − x)^{−1}\). Then using our formula from Problem 122 and the generating function for multisets, you probably found that the EGF for number of ways of arranging \(n\) books on some fixed number \(m\) of bookshelves was \((1 − x)^{−m}\). Thus the EGF for \(m\) shelves is a product of \(m\) copies of the EGF for one shelf.
\(\circ\) Exercise \(389\)
In Problem 373 what would the exponential generating function have been if we had asked for the number of ways to paint the poles with just one color of paint? With two colors of paint? What is the relationship between the EGF for painting the \(n\) poles with one color of paint and the EGF for painting the \(n\) poles with four colors of paint? What is the relationship between the EGF for painting the \(n\) poles with two colors of paint and the EGF for painting the poles with four colors of paint?
In Problem 385 you likely found that the EGF for the number of network configurations with \(n\) customers was \(e^{\frac{x+x^2}{2}} = e^x · e^{\frac{x^2}{2}}\). In Problem 380 you saw that the generating function for the number of permutations on \(n\) elements that are products of one cycles was \(e^x\), and in Problem 378 you likely found that the EGF for the number of tennis pairings of \(2n\) people, or equivalently, the number of permutations of \(2n\) objects that are products of \(n\) two-cycles is \(e^{\frac{x^2}{2}}\).
\(\bullet\) Exercise \(390\)
What can you say about the relationship among the EGF for the number of permutations that are products of disjoint two-cycles and one-cycles, i.e., are involutions, the exponential generating function for the number of permutations that are the product of disjoint two-cycles only and the generating function for the number of permutations that are the product of disjoint one cycles only (these are identity permutations on their domain)?
In Problem 388 you likely found that the EGF for the number of permutations of \([n]\) that are derangements is \(e^{\frac{−x}{1−x}}\). But every permutation is a product of derangements and one cycles, because the permutation that sends \(i\) to \(i\) is a one-cycle, so that when you factor a permutation as a product of disjoint cycles, the cycles of size greater than one multiply together to give a derangement, and the elements not moved by the permutation are one-cycles.
\(\bullet\) Exercise \(391\)
If we multiply the EGF for derangements times the EGF for the number of permutations whose cycle decompositions consist of one-cycles only, what EGF do we get? for what set of objects have we found the EGF? (Hint).
We now have four examples in which the EGF for a sequence or a pair of objects is the product of the EGFs for the individual objects making up the sequence or pair.
\(\bullet\) Exercise \(392\)
What is the coefficient of \(\dfrac{x^n}{n!}\) in the product of two EGFs \( \sum_{i=0}^{\infty} a_i \dfrac{x^i}{i!}\) and \( \sum_{j=0}^{\infty} b_j \dfrac{x^j}{j!}\)? (A summation sign is appropriate in your answer.) (Hint).
In the case of painting streetlight poles in Problem 389, let us examine the relationship between the EGF for painting poles with two colors, the EGF for painting the poles with three colors, and the EGF for painting poles with five colors, \(e^{5x}\). To be specific, the EGF for painting poles red and white is \(e^{2x}\) and the EGF for painting poles blue, green, and yellow is \(e^{3x}\). To decide how to paint poles with red, white, blue, green, and yellow, we can decide which set of poles is to be painted with red and white, and which set of poles is to be painted with blue, green, and yellow. Notice that the number of ways to paint a set of poles with red and white depends only on the size of that set, and the number of ways to paint a set of poles with blue, green, and yellow depends only on the size of that set.
\(\bullet\) Exercise \(393\)
Suppose that \(a_i\) is the number of ways to paint a set of \(i\) poles with red and white, and \(b_j\) is the number of ways to paint a set of \(j\) poles with blue, green, and yellow. In how many ways may we take a set \(N\) of \(n\) poles, divide it up into two sets \(I\) and \(J\) (using \(i\) to stand for the size of \(I\) and \(j\) to stand for the size of the set \(J\), and allowing \(i\) and \(j\) to vary) and paint the poles in \(I\) red and white and the poles in \(J\) blue, green, and yellow? (Give your answer in terms of \(a_i\) and \(b_j\). Don’t figure out formulas for \(a_i\) and \(b_j\) to use in your answer; that will make it harder to get the point of the problem!) How does this relate to Problem 392?
Problem 393 shows that the formula you got for the coefficient of \(\dfrac{x^n}{n!}\) in the product of two EGFs is the formula we get by splitting a set \(N\) of poles into two parts and painting the poles in the first part with red and white and the poles in the second part with blue, green, and yellow. More generally, you could interpret your result in Problem 392 to say that the coefficient of \(\dfrac{x^n}{n!}\) in the product \(\sum_{i=0}^{\infty} a_i \dfrac{x^i}{i!} \sum_{j=0}^{\infty} b_j \dfrac{x^j}{j!}\) of two EGFs is the sum, over all ways of splitting a set \(N\) of size \(n\) into an ordered pair of disjoint sets \(I\) and \(J\), of the product \(a_{|I|} b_{|J|}\).
There seem to be two essential features that relate to the product of exponential generating functions. First, we are considering structures that consist of a set and some additional mathematical construction on or relationship among the elements of that set. For example, our set might be a set of light poles and the additional construction might be a coloring function defined on that set. Other examples of additional mathematical constructions or relationships on a set could include a permutation of that set; in particular an involution or a derangement, a partition of that set, a graph on that set, a connected graph on that set, an arrangement of the elements of that set around a circle, or an arrangement of the elements of that set on the shelves of a bookcase. In fact, a set with no additional construction or arrangement on it is also an example of a structure. Its additional construction is the empty set! When a structure consists of the set \(S\) plus the additional construction, we say the structure uses \(S\). What all the examples we have mentioned in our earlier discussion of exponential generating functions have in common is that the number of structures that use a given set is determined by the size of that set. We will call a family \(\mathcal{F}\) of structures a species of structures on subsets of a set \(X\) if structures are defined on finite subsets of \(X\) and if the number of structures in the family using a finite set \(S\) is finite and is determined by the size of \(S\) (that is, if there is a bijection between subsets \(S\) and \(T\) of \(X\), the number of structures in the family that use \(S\) equals the number of structures in the family that use \(T\)). We say a structure is an \(\mathcal{F}\)-structure if it is a member of the family \(\mathcal{F}\).
\(\bullet\) Exercise \(394\)
In Problem 383, why is the family of arrangements of set of books on a single shelf (assuming they all fit) a species?
\(\bullet\) Exercise \(395\)
In Problem 385, why is the family of people actually making phone calls (assuming nobody is calling outside the telephone network) at any given time, with the added relationship of who is calling whome, a species? Why is the family of sets of people who are not using their phones a species (with no additional construction needed)?
The second essential feature of our examples of products of EGFs is that products of EGFs seem to count structures on ordered pairs of two disjoint sets (or more generally on \(k\)-tuples of mutually disjoint sets). For example, we can determine a five-coloring of a set \(S\) by partitioning it in all possible ways into two sets and coloring the first set in the pair with our first two colors and our second pair with the last three colors. Or we can partition our set in all possible ways into five parts and color part i with our ith color. We don’t have to do the same thing to each part of our partition; for example, we could define a derangement on one part and an identity permutation on the other; this defines a permutation on the set we are partitioning, and we have already noted that every permutation arises in this way.
Our combinatorial interpretation of EGFs will involve assuming that the coefficient of \(\dfrac{x^i}{i!}\) counts the number of structures on a particular set of of size \(i\) in a species of structures on subsets of a set \(X\). Thus in order to give an interpretation of the product of two EGFs we need to be able to think of ordered pairs of structures on disjoint sets or \(k\)-tuples of structures on disjoint sets as structures themselves. Thus, given a structure on a set \(S\) and another structure on a disjoint set \(T\), we define the ordered pair of structures (which is a mathematical construction!) to be a structure on the set \(S ∪ T\). We call this a pair structure on \(S ∪ T\). We can get many structures on a set \(S ∪ T\) in this way, because \(S ∪ T\) can be divided into many other pairs of disjoint sets. In particular, the set of pair structures whose first structure comes from \(\mathcal{F}\) and whose second element comes from \(\mathcal{G}\) is denoted by \(\mathcal{F} · \mathcal{G}\).
Exercise \(396\)
Show that if \(\mathcal{F}\) and \(\mathcal{G}\) are species of structures on subsets of a set \(X\), then the pair of structures of \(\mathcal{F} \cdot \mathcal{G}\) for a species of structures.
Given a species \(\mathcal{F}\) of structures, the number of structures using any particular set of size \(i\) is the same as the number of structures in the family using any other set of size \(i\). We can thus define the exponential generating function (EGF) for the family as the power series \(\sum_{i=1}^{\infty} a_i \dfrac{x^i}{i!}\), where \(a_i\) is the number of structures of \(\mathcal{F}\) that use one particular set of size \(i\). In Problems 372, 373, 376, 377, 378, 380, 382, 383, 387, and 388, we were computing EGFs for species of subsets of some set.
Exercise \(397\)
If \(\mathcal{F}\) and \(\mathcal{G}\) are species of subsets of \(X\), how is the EGF for \(\mathcal{F} · \mathcal{G}\) related to the EGFs for \(\mathcal{F}\) and \(\mathcal{G}\)? Prove you are right. (Hint).
Exercise \(398\)
Without giving the proof, how can you compute the EGF \(f(x)\) for the number of structures using a set of size \(n\) in the species \(\mathcal{F}_1 · \mathcal{F}_2 ···· · \mathcal{F}_k\) of structures on \(k\)-tuples of subsets of \(X\) from the EGFs \(f_i(x)\) for \(\mathcal{F}_i\) for each \(i\) from \(1\) to \(k\)? (Here we are using the natural extension of the idea of the pair of structures to the idea of a \(k\)-tuple structure.)
Theorem \(C.4.1\)
If \(\mathcal{F}_1, \mathcal{F}_2,..., \mathcal{F}_n\) are species of subsets of the set \(X\) and \(F_i\) has EGF \(f_i(x)\), then the family of \(k\)-tuple structures \(\mathcal{F}_1 · \mathcal{F}_2 ···· · \mathcal{F}_n\) has EGF \(\prod_{i=1}^{n} f_i(x)\).
We call Theorem C.4.1 the product principle for exponential generating functions. We give two corollaries; the proof of the second is not immediate though not particularly difficult.
Corollary \(C.4.1\)
If \(\mathcal{F}\) is a species of structures on subsets of \(X\) and \(f(x0)\) is the EGF for \(\mathcal{F}\), then \(f(x)^k\) is the EGF for the \(k\)-tuple structure on \(k\)-tuples of \(\mathcal{F}\)-structures using disjoint subsets of \(X\).
Our next corollary uses the idea of a \(k\)-set structure. Suppose we have a species \(\mathcal{F}\) of structures on nonempty subsets of \(X\), that is, a species of structures which assigns no structures to the empty set. Then we can define a new species \(\mathcal{F}^{(k)}\) of structures, called “\(k\)-set structures,” using nonempty subsets of \(X\). Given a fixed positive integer \(k\), a \(k\)-set structure on a subset \(Y\) of \(X\) consists of a \(k\)-element set of nonempty disjoint subsets of \(X\) whose union is \(Y\) and an assignment of an \(\mathcal{F}\)-structure to each of the disjoint subsets. This is a species on the set of subsets of \(X\); the subset used by a \(k\)-set structure is the union of the sets of the structure. To recapitulate, the set of \(k\)-set structures on a subset \(Y\) of \(X\) is the set of all possible assignments of \(\mathcal{F}\)-structures to \(k\) nonempty disjoint sets whose union is \(Y\). (You can also think of the \(k\)-set structures as a family of structures defined on blocks of partitions of subsets of \(X\) into \(k\) blocks.)
Corollary \(C.4.2\)
If \(\mathcal{F}\) is a species of structures on nonempty subsets of \(X\) and \(f(x)\) is the EGF for \(\mathcal{F}\), then for each positive integer \(k\), \(\dfrac{f(x)^k}{k!}\) is the EGF for the family \(\mathcal{F}^{(k)}\) of \(k\)-set structures on subsets of \(X\).
Exercise \(399\)
Prove Corollary C.4.2. (Hint).
\(\bullet\) Exercise \(400\)
Use the product principle for EGFs to explain the results of Problems 390 and Problem 391.
\(\bullet\) Exercise \(401\)
Use the general product principle for EGFs or one of its corollaries to explain the relationship between the EGF for painting streetlight poles in only one color and the EGF for painting streetlight poles in \(4\) colors in Problems 373 and Problem 389. What is the EGF for the number \(p_n\) of ways to paint \(n\) streetlight poles with some fixed number \(k\) of colors of paint.
\(\bullet\) Exercise \(402\)
Use the general product principle for EGFs or one of its corollaries to explain the relationship between the EGF for arranging books on one shelf and the EGF for arranging books on n shelves in Problem 383.
\(\rightarrow\) Exercise \(403\)
(Optional) Our very first example of exponential generating functions used the binomial theorem to show that the EGF for \(k\)-element permutations of an \(n\) element set is \((1 + x)^n\). Use the EGF for \(k\)-element permutations of a one-element set and the product principle to prove the same thing. Hint: Review the alternate definition of a function in Section 3.1.2. (Hint).
Exercise \(404\)
What is the EGF for the number of ways to paint \(n\) streetlight poles red, white blue, green and yellow, assuming an even number of poles must be painted green and an even number of poles must be painted yellow? Give a formula for the number of ways to paint \(n\) poles. (Don’t forget the factorial!) (Hint).
\(\rightarrow \; \bullet\) Exercise \(405\)
What is the EGF for the number of functions from an \(n\)-element set onto a one-element set? (Can there be any functions from the empty set onto a one-element set?) What is the EGF for the number \(c_n\) of functions from an \(n\)-element set onto a \(k\) element set (where \(k\) is fixed)? Use this EGF to find an explicit expression for the number of functions from a \(k\)-element set onto an \(n\)-element set and compare the result with what you got by inclusion and exclusion.
\(\rightarrow \; \bullet\) Exercise \(406\)
In Problem 142 You showed that the Bell Numbers \(B_n\) satisfy the equation \(B_{n+1} = \sum_{k=0}^{n} \binom{n}{k} B_{n−k}\) (or a similar equation for \(B_n\).) Multiply both sides of this equation by \(\dfrac{x^n}{n!}\) and sum from \(n = 0\) to infinity. On the left hand side, you have a derivative of a certain EGF we might call \(B(x)\). On the right hand side, you have a product of two EGFs, one of which is \(B(x)\). What is the other one? What differential equation involving \(B(x)\) does this give you. Solve the differential equation for \(B(x)\). This is the EGF for the Bell numbers!.
\(\rightarrow\) Exercise \(407\)
Prove that \(n2^{n−1} = \sum_{k=1}^{n} \binom{n}{k} k\) by using EGFs. (Hint).
\(\bullet\) Exercise \(408\)
In light of Problem 382, why is the EGF for the Stirling numbers \(S(n, k)\) of the second kind not \((e^x − 1)^n\)? What is it equal to instead?
C.5: The Exponential Formula
Exponential generating functions turn out to be quite useful in advanced work in combinatorics. One reason why is that it is often possible to give a combinatorial interpretation to the composition of two exponential generating functions. In particular, if \(f(x) = \sum_{i=0}^{n} a_i \dfrac{x^i}{i!}\) and \(g(x) = \sum_{j=1}^{\infty} b_j \dfrac{x^j}{j!}\), it makes sense to form the composition \(f(g(x))\) because in so doing we need add together only finitely many terms in order to find the coefficient of \(\dfrac{x^n}{n!}\) in \(f(g(x))\) since in the EGF \(g(x)\) the dummy variable \(j\) starts at \(1\). Since our study of combinatorial structures has not been advanced enough to give us applications of a general formula for the composition of the EGF, we will not give here the combinatorial interpretation of this composition. However we have seen some examples where one particular composition can be applied. Namely, if \(f(x) = e^x = \exp(x)\), then \(f(g(x)) = \exp(g(x))\) is well defined when \(b_0 = 0\). We have seen three examples in which an EGF is \(e^{f (x)}\) where \(f(x)\) is another EGF. There is a fourth example in which the exponential function is slightly hidden.
\(\bullet\) Exercise \(409\)
If \(f(x)\) is the EGF for the number of partitions of an \(n\)-set into one block, and \(g(x)\) is the EGF for the total number of partitions of an \(n\)-element set, that is, for the Bell numbers \(B_n\), how are the two generating functions related?
\(\bullet\) Exercise \(410\)
Let \(f(x)\) be the EGF for the number of permutations of an \(n\)-element set with one cycle of size one or two. What is \(f(x)\)? What is the EGF \(g(x)\) for the number of permutations of an \(n\)-element set all of whose cycles have size one or two, that is, the number of involutions in \(S_n\)? How are these two exponential generating functions related?
\(\rightarrow \; \bullet\) Exercise \(411\)
Let \(f(x)\) be the EGF for the number of permutations of an \(n\)-element set that have exactly one two-cycle and no other cycles. Let \(g(x)\) be the EGF for the number of permutations which are products of two-cycles only, that is, for tennis pairings. (That is, they are not a product of two-cycles and a nonzero number of one-cycles). What is \(f(x)\)? What is \(g(x)\)? How are these to exponential generating functions related?
\(\bullet\) Exercise \(412\)
Let \(f(x)\) be the EGF for the number of permutations of an \(n\)-element set that have exactly one cycle. (This is the same as the EGF for the number of ways to arrange \(n\) people around a round table.) Let \(g(x)\) be the EGF for the total number of permutations of an \(n\)-element set. What is \(f(x)\)? What is \(g(x)\)? How are \(f(x)\) and \(g(x)\) related?
There was one element that our last four problems had in common. In each case, our EGF \(f(x)\) involved the number of structures of a certain type (partitions, telephone networks, tennis pairings, permutations) that used only one set of an appropriate kind. (That is, we had a partition with one part, a telephone network consisting either of one person or two people connected to each other, a tennis pairing of one set of two people, or a permutation with one cycle.) Our EGF \(g(x)\) was the number of structures of the same “type” (we put type in quotation marks here because we don’t plan to define it formally) that could consist of any number of sets of the appropriate kind. Notice that the order of these sets was irrelevant. For example, we don’t order the blocks of a partition and a product of disjoint cycles is the same no matter what order we use to write down the product. Thus we were relating the EGF for structures which were somehow “building blocks” to the EGF for structures which were sets of building blocks. For a reason that you will see later, it is common to call the building blocks connected structures. Notice that our connected structures were all based on nonempty sets, so we had no connected structures whose value was the empty set. Thus in each case, if \(f(x) = \sum_{i=0}^{\infty} a_i \dfrac{x^i}{i!}\), we would have \(a_0 = 0\). The relationship between the EGFs was always \(g(x) = e^{f(x)}\). We now give a combinatorial explanation for this relationship.
\(\bullet\) Exercise \(413\)
Suppose that \(\mathcal{F}\) is a species of structures of a set \(X\) with no structures on the empty set. Let \(f(x)\) be the EGF for \(\mathcal{F}\).
a. In the power series \(e^{f(x)} =1+ f(x) + \dfrac{f(x)^2}{2!} + ··· + \dfrac{f(x)^k}{k!} + ··· = \sum_{k=0}^{\infty} \dfrac{f(x)^k}{k!}\), what does Corollary C.4.2 tell us about the coefficient of \(\dfrac{x^n}{n!}\) in \(\dfrac{f (x)^k}{k!}\) ?
b. What does the coefficient of \(\dfrac{x^n}{n!}\) in \(e^{f (x)}\) count?
In Problem 413, we proved the following theorem, which is called the exponential formula.
Theorem \(C.5.1\)
Suppose that \(\mathcal{F}\) is a species of structures on subsets of a set \(X\) with no structures on the empty set. Let \(f(x)\) be the EGF for \(\mathcal{F}\). Then the coefficient of \(\dfrac{x^n}{n!}\) in \(e^{f(x)}\) is the number of sets of structures on disjoint sets whose union is a particular set of size \(n\).
Let us see how the exponential formula applies to the examples in Problems 409, 410, 411 and 412. In Problem 382 our family \(\mathcal{F}\) should consist of one-block partitions of finite subsets of a set, say the set of natural numbers. Since a partition of a set is a set of blocks whose union is \(S\), a one-block partition whose block is \(B\) is the set \(\{B\}\). Then any nonempty finite subset of the positive integers is the value of exactly one structure in \(\mathcal{F}\). (There is no one-block partition of the empty set, so we have no structures using the empty set.) As you showed in Problem 382 the generating function for partitions with just one block is \(e^{x} − 1\). Thus, by the exponential formula, \(\exp(e^x−1)\) is the EGF for sets of subsets of the positive integers whose values are disjoint sets whose union is any particular set \(N\) of size \(n\). This set of disjoint sets partitions the set \(N\). Thus \(\exp(e^x − 1)\) is the EGF for partitions of sets of size \(n\). (As we wrote our description, it is the EGF for partitions of \(n\)-element subsets of the positive integers, but any two \(n\)-element sets have the same number of partitions.) In other words, \(\exp(e^x − 1)\) is the exponential generating function for the Bell numbers \(B_n\).
\(\bullet\) Exercise \(414\)
Explain how the exponential formula proves the relationship we saw in Problem 412.
\(\bullet\) Exercise \(415\)
Explain how the exponential formula proves the relationship we saw in Problem 411.
\(\bullet\) Exercise \(416\)
Explain how the exponential formula proves the relationship we saw in Problem 410.
\(\bullet\) Exercise \(417\)
In Problem 373 we saw that the generating function for the number of ways to use five colors of paint to paint \(n\) light poles along the north side of Main Street in Anytown was \(e^{4x}\). We should expect an explanation of this EGF using the exponential formula. Let \(\mathcal{F}\) be the family of all one-element sets of light poles with the additional construction of an ordered pair consisting of a light pole and a color. Thus, a given light pole occurs in five ordered pairs. Put no structures on any other finite set. Show that this is a species of structures on the finite subsets of the positive integers. What is the exponential generating function \(f(x)\) for \(\mathcal{F}\)? Assuming that there is no upper limit on the number of light poles, what subsets of \(S\) does the exponential formula tell us are counted by the coefficient of \(x^n\) in \(e^{f (x)}\)? How do the sets being counted relate to ways to paint light poles?
One of the most spectacular applications of the exponential formula is also the reason why, when we regard a combinatorial structure as a set of building block structures, we call the building block structures connected. In Chapter 2, we introduced the idea of a connected graph and in Problem 104 we saw examples of graphs which were connected and were not connected. A subset C of the vertex set of a graph is called a connected component of the graph if
- every vertex in \(C\) is connected to every other vertex in that set by a walk whose vertices lie in \(C\), and
- no other vertex in the graph is connected by a walk to any vertex in \(C\).
In Problem 241, we showed that each connected component of a graph consists of a vertex and all vertices connected to it by walks in the graph.
\(\bullet\) Exercise \(418\)
Show that every vertex of a graph lies in one and only one connected component of a graph. (Notice that this shows that the connected components of a graph form a partition of the vertex set of the graph.)
\(\bullet\) Exercise \(419\)
Explain why no edge of the graph connects two vertices in different connected components.
\(\bullet\) Exercise \(420\)
Explain why it is that if \(C\) is a connected component of a graph and \(E′\) is the set of all edges of the graph that connect vertices in \(C\), then the graph with vertex set \(C\) and edge set \(E′\) is a connected graph. We call this graph a connected component graph of the original graph.
The last sequence of problems shows that we may think of any graph as the set of its connected component graphs. (Once we know them, we know all the vertices and all the edges of the graph). Notice that a graph is connected if and only if it has exactly one connected component. Since the connected components form a partition of the vertex set of a graph, the exponential formula will relate the EGF for the number of connected graphs on \(n\) vertices with the EGF for the number of graphs (connected or not) on \(n\) vertices. However because we can draw as many edges as we want between two vertices of a graph, there are infinitely many graphs on \(n\) vertices, and so the problem of counting them is uninteresting. We can make it interesting by considering simple graphs, namely graphs in which each edge has two distinct endpoints and no two edges connect the same two vertices. It is because connected graphs form the building blocks for viewing all graphs as sets of connected components that we refer to the building blocks for structures counted by the EGF in the exponential formula as connected structures.
\(\rightarrow \; \bullet\) Exercise \(421\)
Suppose that \(f(x) = \sum_{n=0}^{\infty} c_n \dfrac{x^n}{n!}\) is the exponential generating function for the number of simple connected graphs on \(n\) vertices and \(g(x) = \sum_{i=0}^{\infty} a_i \dfrac{x^i}{i!}\) is the exponential generating function for the number of simple graphs on \(i\) vertices. From this point onward, any use of the word graph means simple graph.
a. Is \(f(x) = e^{g(x)}\), is \(f(x) = e^{g(x)−1}\), is \(g(x) = e^{f(x)−1}\) or is \(g(x) = e^{f(x)}\)? (Hint).
b. One of \(a_i\) and \(c_n\) can be computed by recognizing that a simple graph on a vertex set \(V\) is completely determined by its edge set and its edge set is a subset of the set of two element subsets of \(V\). Figure out which it is and compute it. (Hint).
c. Write \(g(x)\) in terms of the natural logarithm of \(f(x)\) or \(f(x)\) in terms of the natural logarithm of g(x).
d. Write \(\log(1 + y)\) as a power series in \(y\). (Hint).
e. Why is the coefficient of \(\dfrac{x^0}{0!}\) in \(g(x)\) equal to one? Write \(f(x)\) as a power series in \(g(x) − 1\).
f. You can now use the previous parts of the problem to find a formula for \(c_n\) that involves summing over all partitions of the integer \(n\). (It isn’t the simplest formula in the world, and it isn’t the easiest formula in the world to figure out, but it is nonetheless a formula with which one could actually make computations!) Find such a formula. (Hint).
The point to the last problem is that we can use the exponential formula in reverse to say that if \(g(x)\) is the generating function for the number of (nonempty) connected structures of size \(n\) in a given family of combinatorial structures and \(f(x)\) is the generating function for all the structures of size \(n\) in that family, then not only is \(f(x) = e^{g(x)}\), but \(g(x) = \ln(f(x))\) as well. Further, if we happen to have a formula for either the coefficients of \(f(x)\) or the coefficients of \(g(x)\), we can get a formula for the coefficients of the other one!
C.6: Supplementary Problems
1. Use product principle for EGFs and the idea of coloring a set in two colors to prove the formula \(e^x · e^x = e^{2x}\).
2. Find the EGF for the number of ordered functions from a \(k\)-element set to an \(n\)-element set.
3. Find the EGF for the number of ways to string \(n\) distinct beads onto a necklace.
4. Find the exponential generating function for the number of broken permutations of a \(k\)-element set into \(n\) parts.
5. Find the EGF for the total number of broken permutations of a \(k\)-element set.
6. Find the EGF for the number of graphs on \(n\) vertices in which every vertex has degree \(2\).
7. Recall that a cycle of a permutation cannot be empty.
a. What is the generating function for the number of cycles on an even number of elements (i.e. permutations of an even number \(n\) of elements that form an n-cycle)? Your answer should not have a summation sign in it. Hint: If \(y = \sum_{i=0}^{\infty} \dfrac{x^{2i}}{2i}\), what is the derivative of \(y\)?
b. What is the generating function for the number of permutations on \(n\) elements that are a product of even cycles?
c. What is the generating function for the number of cycles on an odd number of elements?
d. What is the generating function for the number of permutations on \(n\) elements that are a product of odd cycles?
e. How do the generating functions in parts b and d of this problem related to the generating function for all permutations on \(n\) elements?