2

During my calculations I ended up at the following combinatorial problem: In how many way can we write the integer $n$ as the sum of $k$ non-negative integers, each different to one, i.e. calculate $$\sum_{n_1+n_2+\dots+n_k=n,n_i\ne1}1$$ for non-negative integers $n_i\in\{0,2,3,\dotsc,n\}$, i.e. with $n_i\ne 1$. In fact, I am interested in the order of this sum as $k\to\infty$.

Without the additional assumption $n_i\ne1$, this is a well known problem (see e.g. Number of ways to write n as a sum of k nonnegative integers) and the result is $\binom{n+k−1}{n} = O(k^n)$. How does the order change for my sum? I expect it to be much smaller.

Marcel
  • 909
  • Do you consider $3+2+3=8$ different than $2+3+3$? – JMoravitz May 24 '16 at 16:55
  • Yes, they should be counted twice. – Marcel May 24 '16 at 16:57
  • Although it doesn't give much in the way of intuition for order of magnitude, this could be answered via generating functions. The number of ways to write $n$ as the sum of $k$ positive integers is the coefficient of $x^n$ in the expansion of $(x^2+x^3+\dots)^k$. If you allow zeroes to be used as well, then it is the coefficient of $x^n$ in the expansion of $(1+x^2+x^3+\dots)^k$ – JMoravitz May 24 '16 at 16:59
  • The relation to the expansion of $(1+x^2+x^3+\dots)^k$ is fine. But how should one proceed from there? I have never worked with generating functions. – Marcel May 24 '16 at 17:04
  • Sorry for not mentioning it right from the beginning: $n_i=0$ should be allowed. – Marcel May 24 '16 at 17:17
  • As an aside, as $n$ grows large, if you consider the probability that at least one of the entries in the summation is $1$, it will grow small. In fact, almost surely (i.e. "with probability =1") for "large" $n$, there will be no ones among the $n_i$. This implies that to correct the count from the original, we only remove an insignificant amount from our count, implying it will still be on the same order as before. – JMoravitz May 24 '16 at 17:18
  • Sorry, I mixed up the variables. I now fixed everything. I want $k\to\infty$. For $n\to\infty$, the order does not change as mentioned. – Marcel May 24 '16 at 17:28

3 Answers3

5

Answering the question for if zeroes are not allowed:

We have the following system:

$\begin{cases} n_1+n_2+\dots+n_k=n\\ n_i\in \Bbb Z\\ n_i\geq 2\end{cases}$

By making a change of variable, setting $m_i=n_i-2$ we have the related system:

$\begin{cases}m_1+m_2+\dots+m_k=n-2k\\ m_i\in\Bbb Z\\ m_i\geq 0\end{cases}$

This is in a known form matching your previous question with answer $\binom{n-k-1}{k-1}$

Allowing $j$ zeroes to be used:

  • pick which entries are zero
  • apply the same process as above to the remaining entries

For specifically $j$ zeroes being used, without loss of generality, the first $j$ entries, we have the system $\begin{cases} n_{j+1}+n_{j+2}+\dots+n_k=n\\ n_i\in\Bbb Z\\ n_i\geq 2\end{cases}$

Making a change of variable, $\begin{cases} m_{j+1}+m_{j+2}+\dots+m_k=n-2(k-j)\\ m_i\in \Bbb Z\\ m_i\geq 0\end{cases}$

This is in a known form with $\binom{n-2(k-j)+(k-j)-1}{k-j-1}=\binom{n-k+j-1}{k-j-1}$

The total then is:

$$\sum\limits_{j=0}^{k−1} \binom{k}{j}\binom{n-k+j-1}{k-j-1} = \sum\limits_{j\ge k−\frac{n}{2}}^{k−1} \binom{k}{j}\binom{n-k+j-1}{k-j-1}$$

Marcel
  • 909
JMoravitz
  • 80,908
  • The idea is great. Thanks. There must be $n_i\ge2$ instead of $n_i\ge1$? Otherwise, you count also possibilities with one as summand. – Marcel May 24 '16 at 17:34
  • @Marcel Oh, whoops. Indeed, I made a mistake. I'll fix it. The approach still works otherwise, – JMoravitz May 24 '16 at 17:36
1

Let $t(n)$ be the number you are interested in and let $c(n,k)$ be the number of way that $n$ can be written as the sum of $k$ distinct nonnegative numbers. Then, $$c(n,k) \ge t(n) \ge c(n,k) - k\cdot c(n-1,k-1)$$ because $c(n-1,k-1)$ counts all those decompositions where $n_1=1$, or all those decompositions where $n_2=1$, etcetera. Of course we have subtracted too much, inclusion-exclusion and all, but note that $c(n,k) - k\cdot c(n-1,k-1)$ is still on the order of $n^k$. Hence, $t(n)$ is also on the order of $n^k$.

1

If $T(n,k)$ is the answer, we have $$ \eqalign{T(n,0) &= \cases{1 & if $n=0$\cr 0 & otherwise}\cr T(n,k+1) &= T(n,k) + \sum_{j=2}^n T(n-j,k)\cr}$$ This has generating function $$G(x,y) = \sum_{n=0}^\infty \sum_{k=0}^\infty T(n,k) x^n y^k = \dfrac{1-x}{1-x-y+xy-x^2y}$$

This can be written as $$G(x,y) = \sum_{k=0}^\infty \left( 1 - \frac{x^2}{1-x}\right)^k y^k$$ or as $$ G(x,y) = \sum_{n=0}^\infty a_n(y) x^n$$ where $$ a_n(y) = \left(\left( 1+3y+\sqrt {1+2y-3\,{y}^{2}} \right) \left( 1-y-\sqrt { 1+2y-3\,{y}^{2}} \right) ^{n}+ \left(1+3y- \sqrt {1+2y-3\,{y}^{2} } \right) \left( 1-y+\sqrt {1+2y-3\,{y}^{2}} \right) ^{n} \right)/\left((2+4y-6\,{y}^{2}) (2-2y)^n\right) $$ Each $a_n$ is actually a rational function with denominator $(1-y)^{\lfloor 1+n/2\rfloor}$ for $n \ne 1$. In particular, it has radius of convergence $1$ for all $n \ne 1$. The asymptotics of $T(n,k)$ as $k \to \infty$ for fixed $n$ are governed by the coefficient of $(1-y)^{-\lfloor 1+n/2\rfloor}$ in its partial fraction expansion. It appears that we have $$T(n,k) \sim \cases{k^{n/2}/(n/2)! & if $n$ is even\cr k^{(n-1)/2}/((n-3)/2)! & if $n \ge 3$ is odd\cr}$$

Robert Israel
  • 470,583
  • Thanks for your answer. Do you have any good book are summary on how to work properly with generating functions? – Marcel May 25 '16 at 10:02