7

Question:

let $m$ and $n$ be positive integers,The number of positive integer solutions to the equation

$$x_{1}+x_{2}+\cdots+x_{n}=m,m\ge n,x_{i}\ge 1,1\le x_{1}\le x_{2}\le\cdots\le x_{n},(i=1,2,\cdots,n)$$ is $f(m,n)$,How find this close form $f(m,n)?$

I know this therom:

Let $n$ and $m$ be positive integers,The number of positive integer solution to the equation $$x_{1}+x_{2}+\cdots+x_{m}=n(n\ge m)$$ is $$N=\binom{n-1}{m-1}$$

But for my problem,I can't prove it.Thank you

BY the way

In 2010 China math competition,there is this problem

find the total number of sets of positive integer $(x,y,z)$,where $x,y$ and $z$ are positive integers, with $x\le y\le z$ and such that $$x+y+z=2010$$

this answer is $$336675$$

can see this PDF:(problem 8) http://wenku.baidu.com/view/9a59934ee518964bcf847cba.html

and I also Find this same problem is Sinapore Mathematical Olympiad (SMO)2012 Problem 4:

find the total number of sets of positive integer $(x,y,z)$,where $x,y$ and $z$ are positive integers, with $x\le y\le z$ and such that $$x+y+z=203$$

This follow is office Solution(Maybe is wrong).

First note that there are $\binom{202}{2}=\dfrac{202(201)}{2}=20301$ positive integers sets$(x,y,z)$ which satisfy the given equation.These solution sets include those where two of the three values are equal.if $x=y$ then $2x+z=203$,By enumeerating,$z=1,3,5,\cdots,201$.There are thus $101$ solutions of the form $(x,x,z)$, similarly,there are $101$ solutions of the form $(x,y,x)$ and $(x,y,y)$,since $x<y<z$,the required answer is $$\dfrac{1}{3!}\left(\binom{202}{2}-3(101)\right)=\dfrac{20301-303}{6}=3333$$

math110
  • 94,932
  • 17
  • 148
  • 519
  • $336675$ is the number of partitions of $2010$ into $3$ positive terms and is $\dfrac{2010^2}{12}$ though in other cases you may need to round – Henry Oct 13 '13 at 17:30
  • The answer to your Singapore Mathematical Olympiad question should be $3434$ – Henry Oct 13 '13 at 17:36
  • 1
    I agree with you,it seem this office answer is wrong. – math110 Oct 13 '13 at 17:44

3 Answers3

7

Suppose we want to count the number of non-decreasing sequences of $n$ non-negative integers which sum to $m$. That is, $a_{k+1}\ge a_k$ and $$ \sum_{k=1}^na_k=m\tag{1} $$ Note that if we set $a_0=0$, then $$ \begin{align} m &=\sum_{k=1}^na_k\\ &=\sum_{k=1}^n\sum_{j=1}^k(a_j-a_{j-1})\\ &=\sum_{j=1}^n\sum_{k=j}^n(a_j-a_{j-1})\\ &=\sum_{j=1}^n(n-j+1)(a_j-a_{j-1})\tag{2} \end{align} $$ The following diagram illustrates $(2)$ for $n=4$:

$\hspace{4.5cm}$enter image description here

Consider the product $$ \overbrace{(1+x^n+x^{2n}+\dots)}^{\large x^{(a_1-a_0)n}} \overbrace{(1+x^{n-1}+x^{2(n-1)}+\dots)}^{\large x^{(a_2-a_1)(n-1)}} \dots\overbrace{(1+x+x^2+\dots)}^{\large x^{a_n-a_{n-1}}}\tag{3} $$ In the first factor, we choose $x^{(a_1-a_0)n}$. In the second factor, we choose $x^{(a_2-a_1)(n-1)}$. In the $k^\text{th}$ factor, we choose $x^{(a_k-a_{k-1})(n-k+1)}$. In the product, the coefficient of $x^m$ is the number of ways to make the sum in $(2)$.

The product in $(3)$ can be rewritten as $$ \prod_{k=1}^n\frac1{1-x^k}\tag{4} $$ The coefficient of $x^m$ in $(4)$ is the number of non-decreasing sequences of $n$ non-negative integers which sum to $m$.


The number of non-decreasing sequences of $n$ positive integers that sum to $m$ is the number of non-decreasing sequences of $n$ non-negative integers that sum to $m-n$. Just add $1$ to each element of the latter to get the former.

The number of increasing sequences of $n$ positive integers that sum to $m$ is the number of non-decreasing sequences of $n$ non-negative integers that sum to $m-n(n+1)/2$. Just add $k$ to the $k^\text{th}$ element of the latter to get the former.

The number of increasing sequences of $n$ non-negative integers that sum to $m$ is the number of non-decreasing sequences of $n$ non-negative integers that sum to $m-n(n-1)/2$. Just add $k-1$ to the $k^\text{th}$ element of the latter to get the former.


The number of non-decreasing sequences of $3$ positive integers that sum to $2010$ is the coefficient of $x^{2007}$ in $$ \prod_{k=1}^3\frac1{1-x^k}\tag{5} $$ which is $336675$. This matches the answer you give.

The number of increasing sequences of $3$ positive integers that sum to $203$ is the coefficient of $x^{197}$ in $(5)$, which is $3333$. This matches the official solution. However, the question asks for the number of non-decreasing sequences of $3$ positive integers that sum to $203$, which is the coefficient of $x^{200}$ in $(5)$, $3434$.


Closed Form for $(5)$

Since $(5)$ is the inverse of $$ (1-x)(1-x^2)(1-x^3)=1-x-x^2+x^4+x^5-x^6\tag{6} $$ the coefficients of $(5)$ are determined by $$ a_n=a_{n-1}+a_{n-2}-a_{n-4}-a_{n-5}+a_{n-6}\\ (a_0,a_1,a_2,a_3,a_4,a_5,\dots)=(1,1,2,3,4,5,\dots)\tag{7} $$ Since the roots of $(6)$ are $\left\{1,1,1,-1,e^{2\pi i/3},e^{-2\pi i/3}\right\}$, the solution of $(7)$ looks like $$ a_n=c_0+c_1n+c_2n^2+c_3(-1)^n+c_4\cos(2\pi n/3)+c_5\sin(2\pi n/3)\tag{8} $$ Using the initial values from $(7)$, we can compute the coefficients in $(8)$: $$ a_n=\frac1{72}\left(47+36n+6n^2+9(-1)^n+16\cos(2\pi n/3)\right)\tag{9} $$ Note that $9(-1)^n+16\cos(2\pi n/3)$ repeats mod $6$: $(25,-17,1,7,1,-17)$. Putting this together with $(9)$ yields $$ a_n=\left\lfloor\frac{12+6n+n^2}{12}\right\rfloor\tag{10} $$ Using $(10)$, we get $a_{2007}=336675$, $a_{197}=3333$, and $a_{200}=3434$, just as above.

robjohn
  • 353,833
4

You are looking for the partition of $m$ in $n$ positive parts.

You can solve this using a generating function, taking the coefficient of $x^m$ in the expansion of $$\frac{x^n}{\displaystyle\prod_{i=1}^{n} (1-x^i)}$$ or by recursion, which is used in my Java applet at http://www.se16.info/js/partitions.htm : so if you ask for partitions of $2010$ into exactly $3$ parts you get a result of $336675$; partitions of $203$ into exactly $3$ parts gives $3434$.

Looking at what you call the "office solution", there are indeed $20301$ compositions of $203$ into $3$ positive parts and $3 \times 101$ of these have two parts the same. So there are $\frac{20301-3\times 101}{3!} = 3333$ partitions of $203$ into $3$ distinct positive parts. But there are also $101$ partitions of $203$ into $3$ positive parts where two (but not three) are identical, giving the correct answer of $3333+101=3434$.

Henry
  • 169,616
  • Thank you,can we find this $f(m,n)$ Gradual estimate expression? – math110 Oct 13 '13 at 18:02
  • becasuse I know this $$\sum_{n=0}^{\infty}f(n)x^n=\prod_{k=1}^{\infty}\dfrac{1}{1-x^k}$$,then we have $$\lim_{n\to+\infty}\dfrac{\ln{f(n)}}{\sqrt{n}}=\dfrac{\sqrt{6}}{3}\pi$$,so I guess $f(m,n)$ maybe have same as nice results?Thank you – math110 Oct 13 '13 at 18:05
  • 2
    For $m$ much bigger than $n$, I suspect you have something like the number of partitions of $m$ in $n$ positive parts is of the order of $\dfrac{m^{n-1}}{n! (n-1)!}$ – Henry Oct 13 '13 at 18:59
  • 1
    I believe that the generating function should be $$\frac{x^n}{\displaystyle\prod_{i=1}^{n} (1\color{#C00000}{-}x^i)}$$ otherwise, the coefficient of $x^{203}$ would be $34$ and the coefficient of $x^{2010}$ would be $-335$. – robjohn Oct 14 '13 at 12:14
  • @robjohn - Thank you - I will edit the $+$ to a $-$. – Henry Oct 14 '13 at 13:13
3

The theorem gives you the number of solutions of $x_{1} + \cdots + x_{n} = m$ that are permutations dependent ; this is called the stars & bars theorem. For example, $(1;2;1;2)$ and $(1;1;2;2)$ are 2 distinct solutions if $n=4$ and $m=6$.

However here you would only consider increasing sequences as solutions. These are called integer partitions. More precisely you want to find the number $f(m,n)$ of partitions of $m$ in $n$ parts $\geq 1$. Unfortunately, as far as I know, there is no (simple) closed form of $f(m,n)$. Its generating function, on the other hand, has a simple expression $$\sum_{m,n=1}^{\infty} f(m,n) x^{n}q^{m} = \prod_{m=1}^{\infty} \frac{1}{1-xq^{m}}$$

To find $f(m,n)$, one can then compute the term in front of $x^{n}q^{m}$ in the RHS. One can then use Taylor expansion to find it numerically.

Some closed forms of $f(m,n)$

The wikipedia article about integer partitions happens to have closed forms of $f(m,n)$ for the first few values of $n$

  • $n=1$ : Obviously for all $m$, $f(m,1) =1$
  • $n=2$ : $$f(m,2)=\left\lfloor \frac{m}{2} \right\rfloor$$
  • $n\leq 3$ : According to Hardy's paper Some Famous Problems of the Theory of Numbers, $\displaystyle f(m,n\leq 3) = \sum_{n=1}^{3}f(m,n)$ is the nearest integer to $$\frac{(m+3)^2}{12}$$
Tristan
  • 446
  • 2
  • 4
  • Thank you,can we find this $f(m,n)$ Gradual estimate expression? – math110 Oct 13 '13 at 18:06
  • becasuse I know this $$\sum_{n=0}^{\infty}f(n)x^n=\prod_{k=1}^{\infty}\dfrac{1}{1-x^k}$$,then we have $$\lim_{n\to+\infty}\dfrac{\ln{f(n)}}{\sqrt{n}}=\dfrac{\sqrt{6}}{3}\pi$$,so I guess $f(m,n)$ maybe have same as nice results?Thank you – math110 Oct 13 '13 at 18:06
  • @chinamath I don't know what you exactly mean by gradual estimate, but you can use Taylor expansion to derive $f(m,n)$ - at least for the first few values of $m$ and $n$. However, even if you can find the asymptotic behaviour of $$\sum_{n=1}^{\infty} f(m,n)$$ The asymptotic behaviour of $f(m,n)$ itself doesn't really make sense (except if you fix $n$, and in that case I don't know if it has the same behaviour sorry). – Tristan Oct 13 '13 at 18:21
  • @Tristan: in my answer, I derive the exact formula for $f(m,3)=\left\lfloor\frac{12+6m+m^2}{12}\right\rfloor$. – robjohn Oct 14 '13 at 12:41