3

As you probably know, the SUBSET-SUM problem is defined as determining if a subset of a set of whole numbers sum to a specified whole number. (there is another definition of subset-sum, where a group of integers sum to zero, but let's use this definition for now)

For example ((1,2,4,5),6) is true because (2,4) sums to 6. We say that (2,4) is a "solution"

Furthermore, ((1,5,10),7) is false because nothing in the arguments sum to 7

My question is, given a set of argument numbers for SUBSET-SUM is there a polynomial upper bound on the number of possible solutions. In the first example there was (2,4) and (1,5).

We know that since SUBSET-SUM is NP-complete deciding in polynomail time probably is impossible. However my question is not related to the decision time, I'm asking strictly about the size of the list of solutions.

Obviously the size of the power set of the argument numbers can be an upper bound on solution list size, however this has exponential growth. My intuition is that there should be a polynomial bound, but I cannot prove this.

nb I know this sounds like a homework question, but please trust me it isn't. I am trying to teach myself certain aspects of CS theory and this is where my thoughts have taken me.

Mike
  • 58,961
  • 76
  • 175
  • 221
  • Consider `((2 2 2 2 2 2 2 2 2 2) 10)`. Here, there's 252 combinations of 5 2's you can choose to get 10. If you count answers with the same numbers but different indices as the same, then there's only one solution in this case. Would you count the above as 252 solutions or just 1? – Joey Adams Jan 03 '10 at 05:29
  • 1, I should have mentioned I'm interested in unique solutions – Mike Jan 03 '10 at 05:47
  • Karp reduction is what I used once for this problem still arranging it welcoming Mike and all bringing it – Niklas Rosencrantz Feb 24 '10 at 21:33
  • @Joey I think your list of numbers is also not a set, which must have unique elements, although I think subset sum might still be a "difficult" (np-complete) problem even if the list we are taking subsets of contains duplicates; just thought I should bring up that minor distinction – eipxen Feb 25 '11 at 07:44

2 Answers2

3

No; take numbers:

(1, 2, 1+2, 4, 8, 4+8, 16, 32, 16+32, ..., 22n, 22n+1, 22n+22n+1)

and ask about forming the sum 1 + 2 + 4 + ... + 22n + 22n+1. (For example: with n = 3 take the set (1,2,3,4,8,12,16,32,48) and ask about the subsets summing to 63.)

You can form 1+2 either using 1 and 2 or using 1+2.

You can form 4+8 either using 4 and 8 or using 4+8.

....

You can form 22n + 22n+1 either using 22n and 22n+1 or 22n+22n+1.

The choices are independent, so there are at least 3n=3m/3, where m is the size of your set. I bet this can be sharply strengthened, but this proves there's no polynomial bound.

sdcvvc
  • 25,343
  • 4
  • 66
  • 102
1

Sperner's Theorem provides a nice (albeit non-polynomial) upper bound, at least in the case when the numbers in the set are strictly greater than zero (as seems to be the case in your problem).

The family of all subsets with a given sum form a Sperner family, which is a collection of subsets where no subset in the family is itself a subset of any of the other subsets in the family. This is where the assumption that the elements are strictly greater than zero is used. Sperner's theorem states that the maximum size of such a Sperner family is given by the binomial coefficient n Choose floor(n/2).

If you drop the assumption that the n numbers are distinct, it is easy to see that this upper bound can't be improved (just take all numbers = 1 and let the target sum be floor(n/2)). I don't know if it can be improved under the assumption that the numbers are distinct.

John Coleman
  • 51,337
  • 7
  • 54
  • 119