[Math] Sum of multinomial coefficients with constraints

combinationscombinatoricspolynomials

The title doesn't reflect the question properly, since I don't know enough
about combinatorics to get it right, here. Feel free to change the title.

From the multinomial theorem, we can deduce, that the sum over all
multinomials is

$
\sum_{k_1+\ldots+k_m=n}\binom{n}{k_1,\ldots,k_m}=m^n\;.
$

The question is, how can we compute the sum

$
\sum_{k_1+\ldots+k_m=n}^{k_1\geq 1,\ldots,k_m\geq 1}\binom{n}{k_1,\ldots,k_m}
$, that is the sum over multinomials with positive $k_j$'s?

With respect to the polynomial $(x_1+\cdots+x_m)^n$, this count the number of
monomials, such that each factor $x_j$ doesn't vanish in it. Don't
know if there is a common name for those monomials.

Best Answer

We can obtain a messy expression for the answer as follows. If there is no restriction of the $k_i\ge 1$ kind, the sum is $m^n$. Now we deal with the $k_i\ge 1$ restriction by using the Principle of Inclusion/Exclusion.

There are $(m-1)^n$ functions that "miss" $1$, and $(m-1)^n$ that miss $2$, and so on up to $m$. So we need to subtract $\binom{m}{1}(m-1)^n$.

But we have subtracted too much, since for every $i,j$, with $i\ne j$, we have subtracted twice the functions that "miss" $i$ and $j$. So we must add back $\binom{m}{2}(m-2)^n$.

However, we have added back too many times for the functions that miss $i$, $j$, and $k$. And so on. So we get the expression $$m^n-\binom{m}{1}(m-1)^n +\binom{m}{2}(m-2)^n -\binom{m}{3}(m-3)^n +\cdots.$$

For details, and much more, please look at Stirling Numbers of the Second Kind. A great deal is known, but there is no pleasant closed form.

Related Question