0

The multinomial theorem dictates that $$\sum_{\mu_0+\mu_1+\cdots+\mu_M=N}\binom{N}{\mu_0,\mu_1,\cdots,\mu_M}x_0^{\mu_0}x_1^{\mu_1}\cdots x_M^{\mu_M}=(x_0+x_1+\cdots+x_M)^N.$$ Here, the multinomial coefficient $\binom{N}{\mu_0,\mu_1,\cdots,\mu_M}=N!/(\mu_0!m_1!\cdots \mu_M!)$ automatically eliminates terms where the $\{\mu_i\}$ do not sum to $N$ or are negative; the sum is over all integer values of $\mu_i\geq 0$. What happens when we add additional constraints to the set $\{\mu_i\}$? Specifically, I am wondering if there is a closed-form solution (or a straightforward method to approach such a solution) for the sum with the [linear] constraint $\sum_k k\mu_k=m$: $$f(x_0,x_1,\cdots,x_M;N,m)=\sum_{\sum_{k=0}^M\mu_k=N,\,\sum_{k=0}^M k \mu_k=m,\, 0\leq \mu_k}\binom{N}{\mu_0,\mu_1,\cdots,\mu_M}\prod_{k=0}^M x_k^{\mu_k}?$$


Normally, the multinomial theorem as written gives us $M+1$ sums with one constraint, leading to summation over $M$ indices; now I am wondering about summation over $M-1$ indices (if there is a general answer for more constraints that is even better). We can write my constraints as $$\mu_1=m-\sum_{k>1}k\mu_k;\qquad \mu_0=N-\sum_{k>0}\mu_k=N-m+\sum_{k>1}(k-1)\mu_k$$ to find the expression $$f(x_0,x_1,\cdots,x_M;N,m)=\sum_{\mu_2,\mu_3,\cdots,\mu_M=0}^N\binom{N}{N-m+\sum_{k>1}(k-1)\mu_k,m-\sum_{k>1}k\mu_k,\mu_2,\cdots,\mu_M}x_0^{N-m+\sum_{k>1}(k-1)\mu_k}x_1^{m-\sum_{k>1}k\mu_k}\prod_{k>1}x_k^{\mu_k}.$$ I have now written this explicitly as $M-1$ sums over the $\mu_{k>1}$ indices, where the multinomial coefficient will vanish when any of the constraints are not met (indices summing to $N$, linear combination of indices summing to $m$, $\mu_0$ or $\mu_1$ accidentally being outside of the range from $0$ to $N$). This is actually easy to evaluate for $M=1$, the binomial theorem, because then the linear constraint tells us that $\mu_1=m$ and the sum collapses to a single term: $$f(x_0,x_1;N,m)=\binom{N}{m}x_0^{N-m}x_1^m.$$ When I compute the same thing using Mathematica for $M=2$, I find another collapse to a more complicated term: $$f(x_0,x_1,x_2;N,m)=\sum_{\mu_{2}=\max[0,m-N]}^{\min[N,m/2]}\binom{N}{N-m+\mu_2,m-2\mu_2,\mu_2}x_0^{\mu_0}x_1^{\mu_1}x_2^{\mu_2}=\begin{array}{cc} \bigg\{ & \begin{array}{cc} \text{x1}^m \binom{N}{N-m} x_0^{N-m} \, _2F_1\left(\frac{1-m}{2},-\frac{m}{2};-m+N+1;\frac{4 x_0x_2}{x_1^2}\right) & m\leq N \\ \binom{N}{m-N} x_1^{2 N-m} x_2^{m-N} \, _2F_1\left(\frac{1}{2} (m-2 N),\frac{1}{2} (m-2 N+1);m-N+1;\frac{4 x_0x_2}{x_1^2}\right) & N<m\leq 2N \\ \end{array} \\ \end{array} .$$ This automatically incorporates the requirement that $2N\geq m$ implied by the pair of constraints. This answer is not so simple, so I wonder if there is a way to simplify these sums in general. Any thoughts, tips, strategies?

2 Answers2

2

Maybe this will shed some light.

Let it be that random vector $\left(X_{0},X_{1},\dots,X_{M}\right)$ has multinomial distribution with parameter $N$ and parameter vector $\left(p_{0},p_{1},\dots,p_{n}\right)$ where $x_{i}=cp_{i}$.

Then: $$P\left(X_{i}=\mu_{i}\text{ for }i=0,\dots,M\right)=\binom{N}{\mu_{0},\mu_{1},\dots,\mu_{M}}\prod_{i=0}^{M}p_{i}^{\mu_{i}}=c^{-N}\binom{N}{\mu_{0},\mu_{1},\dots,\mu_{M}}\prod_{i=0}^{M}x_{i}^{\mu_{i}}$$

So if $A$ is a some subset of $\mathbb{Z}^{M+1}$ (representing a constraint) then: $$\sum_{\left(\mu_{0},\mu_{1},\dots,\mu_{M}\right)\in A}\binom{N}{\mu_{0},\mu_{1},\dots,\mu_{M}}\prod_{i=0}^{M}x_{i}^{\mu_{i}}=c^{N}P\left(\left(X_{0},X_{1},\dots,X_{M}\right)\in A\right)$$

This under the convention that the coëfficient takes value $0$ if at least one of then $\mu_i$ has negative value or if their sum does not equalize $N$.

For instance your first expression $f\left(x_{0},x_{1},\dots,x_{M};N,m\right)$ can be recognized as:$$c^{N}P\left(\sum_{k=0}^{M}X_{k}=m\right)$$

drhab
  • 151,093
  • Thanks for this. Let's assume everything began normalized, with $c=1$. Now the question is still whether there's an easy way to find the probability that some multinomially distributed random vector obeys a particular constraint; is that easy? Otherwise I'm stuck with essentially the same sum I began with – Quantum Mechanic Aug 16 '22 at 16:46
  • If all of the parameters $p_i$ are equal, we simply look for what fraction of the set of integers satisfy a particular constraint. Does knowing that fraction help when the parameters $p_i$ are not equal? – Quantum Mechanic Aug 16 '22 at 17:04
  • 1
    @QuantumMechanic My answer is not much more than a sort of translation to probability theory. Such a thing can be enlightening but do not expect too much of it. Also the coming days by circumstances (grandchildren come for some days) I am banned from Math.SE (sorry). Later I will have a second look. Good luck. – drhab Aug 16 '22 at 17:43
  • Understood; glad I didn't miss anything in your answer! I'm still hopeful because the first two of my examples simplified so well. Thanks again – Quantum Mechanic Aug 16 '22 at 17:49
2

The formula from the multinomial theorem enumerates all integer compositions with $N$ parts and all parts $\le M$.

Because you use $\mu_0$, the weak compositions (compositions including part $0$) are considered. We can denote these numbers by $\sum_{m=0}^{MN}C_{0\ m,N,M}$.

The formula with your additional linear constraint enumerates all compositions of integer $m$ with $N$ parts including $0$ and all parts $\le M$:

$$C_{0\ m,N,M}=\sum_{i=0}^N(-1)^i\binom{N}{i}\left[^{m+N-i(M+1)-1}_{\ \ \ \ \ \ \ \ \ N-1}\right].$$

$$\left[^n_k\right]=\left\{ \begin{array}{ll} \binom{n}{k} & 0\le k\le n \\ \ \ 0 & \, \text{otherwise} \\ \end{array} \right.$$

The generating functions of these combinatorial numbers are

$$\left(x^0+x^1+x^2+...+x^M\right)^N=\left(\frac{1-x^{M+1}}{1-x}\right)^N$$

and

$$\left(x_0t^0+x_1t^1+x_2t^2+...+x_Mt^M\right)^N,$$

where we are looking for the terms with $\text{degree}(t)=m$.

see Mistake in the closed-form formula for the number of restricted compositions?

$\sum_{m=0}^{MN}C_{0\ m,N,M}=(M+1)^N\ \ \ ((m\neq 0)\lor(N\neq 0)\lor(M\neq 0))$

$(1+x)^N$: OEIS A007318
$(1+x+x^2)^N$: OEIS A027907
$(1+x+x^2+x^3)^N$: OEIS A008287
$(1+x+x^2+x^3+x^4)^N$: OEIS A035343
$(1+x+x^2+x^3+x^4+x^5)^N$: OEIS A063260

IV_
  • 6,964
  • Thanks for all of this. I like the idea of using the generating function, I forgot about that reframing of the problem. It gives us a formal closed-form solution in terms of derivatives that might be just as difficult to evaluate as the sum. I'm not sure I follow the sums in the composition formula. The first sum over all $m$ gives all compositions of all numbers up to $MN$; is this an easy number to compute? And for the second sum, what is $i$ counting and why is there a factor of $(-1)^i$? I assume this is some overcounting formula? – Quantum Mechanic Aug 24 '22 at 19:05