1

I have a variation of Subset-Sum problem where the size of the subset is k and all the integers are positive (not zero).

As can be seen online, this question can be fairly solved using dynamic programming in pseudo-polynomial time.

I need to decide wether this problem is NPC, or in P (while assuming P!=NP).

I've tried to reduce from subset-sum problem, but had a problem with the constraint that all integers must be greater than zero. Since otherwise I would have just padded the input with k zero integers.

Formal definition of the problem:

L={<S1,S2,...,Sn,T,k>|There exists a subset I of S1,...,Sn of size m which sums up to T}

Mugen
  • 8,301
  • 10
  • 62
  • 140

2 Answers2

2

The problem is in NPC.

If you could find polynomial time solutions to your problem then you could have polynomial time solutions to Subset Sum problem with upper bound Time of Subset Sum = k * (Your Problem's Time)

catpol
  • 68
  • 1
  • 4
  • Your initial sentence is correct, but your argument only shows hardness under [disjunctive](https://en.wikipedia.org/wiki/Logical_disjunction) reductions, not membership in NPC. ​ ​ –  Jun 15 '16 at 15:11
2

That problem is NPC. ​ In fact, when k is in n1-Ω(1), even the combination of

the numbers all being in nO(k)
with
the promise that there is at most one solution

is not suspected to put it in ​ coNTIME(n^(o(k))) / 2o(k*n*log(n)) ​ infinitely-often,
since this paper's Proof of Theorem 5.1 gives a reduction
that works for such k and preserves the number of solutions.