Pergunta

Hi guys I have a question. I am wondering if anyone know how to proof it.

Here is the question: The Subset Sum problem is shown to be NP-complete. The input is a sequence of positive numbers w1, ... ,wn, W, where W is the target weight. The problem is to decide whether there is a set of weights F ⊆ {1, ... ,n} such that the the sum of some weights equal to the target weight (i.e. w1 + ... + wi = W)
Let the Restricted Subset Sum problem be defined like Subset Sum, but with the extra requirement that the target weight is less than half the sum of all weights. (If this fails then the input must be rejected right away.) Show that Restricted Subset Sum is NP-complete.
Thank you.

Foi útil?

Solução

You have to show (a) your problem is in NP and (b) your problem is NP hard. For (a), show that a solution to some problem in NP would make solving your problem easy (if you think about it, showing this is trivial). For (b), you need to show that a solution to your problem would make solving any problem in NP easy (in other words, find another NP-complete problem whose solution can be rephrased in terms of a solution to your problem).

This is already practically half the proof - (a) is trivial now - I'd prefer not to do the rest.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top