I have a problem similar to IntegerPartitions
function, in that I want to list all non-negative integer xi
's such that, for a given list of integers {c1,c2,...,cn}
and an integer n
:
x1*c1+x2*c2+...+xn*cn=n
Please share your thoughts. Many thanks.