More on Exponential Generating Functions
Recall from the Exponential Generating Functions page that if $(a_i)_{i=0}^{\infty} = (a_0, a_1, a_2, ...)$ is a sequence of real numbers then the exponential generating function of $(a_i)_{i=0}^{\infty}$ is given by:
(1)We noted that exponential generating functions are useful when the terms $a_i$ of $(a_i)_{i=0}^{\infty}$ arise from counting permutations.
We will now look further into exponential generating functions. Consider the following multiset with a finite number $k$ of distinct terms and finite repetition numbers $r_1, r_2, ..., r_n$:
(2)Suppose that we want to create a sequence $(a_n)_{n=0}^{\infty} = (a_0, a_1, a_2, ..., a_n, ...)$ where for each $n \in \{0, 1, 2, ... \}$ the term $a_i$ counts the number of $n$-permutations of elements from the multiset $A$. What will the exponential generating function for $(a_n)_{n=0}^{\infty}$ therefore look like? The following theorem answers this question.
Theorem 1: Let $A = \{ r_1 \cdot x_1, r_2 \cdot x_2, ..., r_k \cdot x_k \}$ be a multiset with a finite number of distinct terms $k$, and such that the repetition numbers $r_1, r_2, ..., r_k$ of $A$ are finite. Define $(a_n)_{n=0}^{\infty} = (a_0, a_1, a_2, ..., a_n, ...)$ to be a sequence of nonnegative integers where each term $a_n$ counts the number of $n$-permutations of elements from $A$ for each $n \in \{0, 1, 2, ... \}$. For each $i \in \{1, 2, ..., k \}$ define $E_{r_i}(x) = 1 + x + \frac{x^2}{2!} + ... + \frac{x^{r_i}}{r_i!}$. Then the generating function of $(a_n)_{n=0}^{\infty}$ is given by $E(x) = E_{r_1}(x) \cdot E_{r_2}(x) \cdot ... \cdot E_{r_k}(x)$. |
Theorem 1 also applies if some of the repetition numbers $r_1, r_2, ..., r_k$ are $\infty$ since we then define $E_{\infty} = 1 + x + \frac{x^2}{2!} + ... = \sum_{i=0}^{\infty} \frac{x^i}{i!} = e^x$ which is valid for all $x \in \mathbb{R}$.
- Consider the expansion of the product $E_{r_1}(x) \cdot E_{r_2}(x) \cdot ... \cdot E_{r_k}(x)$:
- For $0 \leq b_1 \leq r_1$, $0 \leq b_2 \leq r_2$, …, $0 \leq b_k \leq r_k$, each term in the product above will be of the form:
- Now we want each term $a_n$ in the sequence $(a_n)_{n=0}^{\infty}$ to represent the number of $n$-permutations of elements in the multiset $A$. Therefore, we let $b_1 + b_2 + ... + b_k = n$. Therefore:
- Now define the set $B$ as follows:
- The coefficient on the term $\frac{x^n}{n!}$ when the expansion of $E_{r_1}(x) \cdot E_{r_2}(x) \cdot ... \cdot E_{r_k}(x)$ is simplified will be:
- These coefficients are merely the number of $n$-permutations of the submultiset $\{b_1 \cdot x_1, b_2 \cdot x_2, ..., b_k \cdot x_k \}$ of $A$. So the total number of $n$-permutations of $A$ is equal to the total number of all $n$-permutations of all submultisets such that $b_1 + b_2 + ... + b_k = n$ which the sum above accounts for. Therefore, for each $n \in \{0, 1, 2, ... \}$ we have that:
- Since $\sum_{(b_1, b_2, ..., b_k) \in B} \binom{n}{b_1, b_2, ..., b_k}$ is also the coefficient of $\frac{x^n}{n!}$ after simplification of the expansion of $E_{r_1} \cdot E_{r_2} \cdot ... \cdot E_{r_k}$ we have that the generating function $E(x)$ of $(a_n)_{n=0}^{\infty}$ is given by: