Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Given natural number $n$, how many multisets are there which sum of their elements equals $n$?

There is a recursive function which can give the value in $O(n^2)$, but is there a formula for that?

$f(n,i)$ = answer where minimum elements of multisets are at least $i$.

$f(n,i) = 1$ for $n=0$

$f(n,i) = 0$ for $i>0$

$f(n,i) = f(n,i+1) + f(n-i,i)$ for $ 0 < i \le n$

share|improve this question

1 Answer 1

up vote 0 down vote accepted

If you're speaking only of positive integers, then you're talking about partitions of an integer. There is an extensive literature on this topic.

See this Wikipedia article.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.