Suppose we are making strings using the alphabet \(\{0,1,2,3,4\}\text{.}\) If the number of times \(4\) appears in the string is at least one and at most four, the number of times \(2\) appears in the string is a positive even number, and there are at least three occurrences of \(3\) in the string, write an exponential generating function in which the coefficient on \(x^{n}/n!\) is the number of such strings of length \(n\text{.}\)
Why does multiplying exponential generating functions give us what we want? Letโs consider the example of exponential generating functions for the number of ways to arrange books on two shelves where the number of ways to arrange \(i\) books on the first shelf is \(a_i\) (and does not depend on which \(i\) books are on the shelf) and the number of ways to arrange \(i\) books on the second shelf is \(b_i\text{.}\)
Find an exponential generating function in which the coefficient on \(x^n/n!\) is the number of surjections from the set \([n]\) to the set \([2]\text{.}\) Then use some algebra to find an explicit formula for the number of surjections from \([n]\) to \([2]\text{.}\)
Find an exponential generating function in which the coefficient on \(x^n/n!\) is the number of surjections from the set \([n]\) to the set \([k]\text{.}\)