Sum of subsets with k elements having a total sum of r
|
I love Physics, Mathematics and Science.
|
Add comments > |
|
19 Aug 10
In fact, your problem is quite difficult. Since it involves 3 indices.
Let Now, I am going to give you the generating function.
And
At last, to find
However it should be very difficult to find a closed-form of it. Finally, you can write down a partial difference equation of A as well. |
Please login to post answer.
This question is a mirror of the question Sum of subsets which I found interesting. The problem is like this:
Let
, how many subsets with k elements that are having the sum of value r?
For instance, if n = 6, k = 3, r = 10:
The following sets:
{1,3,6}
{1,4,5}
{2,3,5}
are all the solutions. So the number of solutions is 3.