 As we saw, finding the number of permutations for a multi-set can be very difficult. We can make it easier by introducing exponential generating functions. Let h0, h1, h2, and so on via sequence. The exponential generating function for the sequence is... Note that if hi equals 1 for all i, this becomes... Which is our familiar series for e to the x. Which is why we call them exponential generating functions. For example, let's try to find the generating function for the sequence hk equals k factorial. Since hk equals k factorial, the exponential generating function will be... The power series on x, where the coefficients are fractions whose denominators are the successive factorials, and whose numerators are the terms of the sequence. Which simplifies to... Which we should recognize as the power series expansion for... Or let's try something a little more complicated. How about the exponential generating function for hi, where hi is the number of i permutations of the multi-set consisting of four a's. So we might try to find the number of those permutations. So the zero permutations... Well, there's just one, nothing at all. Now an important idea for later on, since this is an allowable permutation, it counts as one permutation. We'll get back to this idea later on. Meanwhile, the one, two, three, and four permutations are... We note there's only one each of the zero, one, two, three, and four permutations. And because we only have four a's, there are no five or higher permutations. So our sequence is... Giving us the exponential generating function, which is a power series whose coefficients all have denominators equal to a factorial, and whose numerators are the terms of the sequence. And since everything after the x to the fourth term is going to be zero, we can just omit them. What if we have an infinite number of an element? Since the only element we can choose is a, and a must appear an even number of times, then the number of permutations with one, three, five, or any odd number of components must be zero, and the number of permutations with zero, two, four, or any even number must be one. And so our exponential generating function will be... Now, in order to make use of these exponential generating functions, it helps if we can rewrite these as more obvious functions. And we can get this particular function as follows. If we start out with our power series for e to the x, and our power series for e to the minus x, if we add them we get, and if we divide by two, we get our exponential generating function. And if you want to show off your erudition, you might recognize this expression over on the left as cosh x. But for purposes of exponential generating functions, it's much better to leave this in exponential form. Now, let's consider n permutations of multisets. Suppose h1x is an exponential generating function for a multiset, and h2 is an exponential generating function for a multiset. Can we find an exponential generating function for the multiset that combines the two? We hope so, because that's the point of this lecture. It helps to know what answer we're supposed to get, so let's try to find the number of three permutations from our multiset. Now, the three permutations are the same as the three permutations from the multiset consisting of three b's, the multiset consisting of one a and two b's, and the multiset consisting of two a's and one b. And since there are only two a's, we don't have a multiset consisting of three a's. The number of permutations of each multiset will be, and so the number of three permutations of the original multiset will be the sum. Now, a useful idea in life and in math, reduce, reuse, recycle. With the binomial and multinomial expansions, the coefficient of a term in the product counts something. And so we might ask, what if we find the product of the exponential generating functions for the components? Let's split our multiset into multisets where the components are the same. The exponential generating function for the multiset with just two a's is, and the exponential generating function for the multiset with just three b's is. Let's expand the product and find the coefficient of the x-cube term. Remember, we'll get an x-cube term by multiplying the constant of one and the x-cube term of the other, the x of one and the x-squared of the other, and the x-squared times the x. And there are no other products that will give us an x-cube term. But this coefficient is, and here we see the number of three permutations. And so if h1x and h2x are the exponential generating functions for the permutations of the multisets h1 and h2, then the product appears to be an exponential generating function for the permutations of the combined multisets. And this leads to the following theorem. Let hix be the exponential generating function for the multiset, then g of x, the product, will be the exponential generating function for the multiset. Now in order to maintain my mathematician card, I do have to do proofs every now and then. So let's write g of x in the form of an exponential generating function with terms g0, g1, and so on. Now remember, hix will be the generating function for the multiset consisting of ni copies of a single element, so hix will be of the form, where our deltas are one if a permutation with j is possible and zero otherwise. And note that it's possible that some permutations are impossible if we impose additional conditions. For example, we might require that the number of i's be even. Now we're multiplying all of these together, so to get an xn term in the product, we need to select and multiply terms whose powers add to n and where none of the deltas is zero. So if n is the sum of the powers and a permutation with p11's, p22's, and so on is possible, it will contribute the term to the sum. And so the xn coefficient of g of x will be the sum of all possible products of this form where n is the sum of the p's and an n permutation with p11's, p22's, and so on is possible. And so g of x will look like a power series whose coefficients have a particular form. Now if we compare the forms of the coefficients for g of x as an exponential generating function and g of x as a power series we get, and we'll do some very difficult algebra to find, meanwhile the number of ways of forming an n permutation from the multiset will be the sum of all possible terms of this form where n is the sum of the p's and a permutation with p11's, p22's, and so on is possible, but this is gn. And consequently g of x as the product is an exponential generating function for the number of permutations of the multiset.