Generating function for all partitions of given length.

118 Views Asked by At

I would like to find a generating function for all the distinct ways in which the positive number $r$ can be written as the sum of $m$ (possibly repeated) positive numbers. If the order of the solutions matters, the generating function for $r$ would be: $$ (x + x^2 + \ldots)^m $$ In my case, however, the order doesn't matter.

1

There are 1 best solutions below

0
On BEST ANSWER

You are counting the number of partitions of an integer $r$ into $m$ parts. (See, for instance, section 3.16 of Wilf's generatingfunctionology.) Then, accounting for the number of ones, the number of twos, the number of threes,..., the number of partitions of $r$ into $m$ parts would be the coefficient $x^ry^m$ of $$(1+xy+(xy)^2+(xy)^3+\cdots)(1+x^2y+(x^2y)^2+\cdots)(1+x^3y+(x^3y)^2+\cdots)\cdots$$ or equivalently $$\prod_{i\ge1}\frac{1}{1-x^iy}.$$