Main Page | See live article | Alphabetical index

NP-equivalent

In complexity theory, NP-equivalent is the set of problems that are both NP-easy and NP-hard. NP-equivalent is similar to NP-complete, except the problems in NP-equivalent do not have to be decision problems.

For example, the problem FIND-SUBSET-SUM is in NP-equivalent. Given a set of integers, FIND-SUBSET-SUM is the problem of finding some subset of the integers that adds up to zero (or returning the empty set if there is no such subset). This optimization problem is similar to the decision problem SUBSET-SUM. Given a set of integers, SUBSET-SUM is the problem of finding whether there exists a subset summing to zero. SUBSET-SUM is NP-complete.

To show that FIND-SUBSET-SUM is NP-equivalent, we must show that it is both NP-hard and NP-easy.

Clearly it is NP-hard. If we had a black box that solved FIND-SUBSET-SUM in unit time, then it would be easy to solve SUBSET-SUM. Simply ask the black box to find the subset that sums to zero, then check whether it returned a nonempty set.

It is also NP-easy. If we had a black box that solved SUBSET-SUM in unit time, then we could use it to solve FIND-SUBSET-SUM. If removing one element from the set causes SUBSET-SUM to change its answer, then that element must be part of the solution. Just check each element this way to find the solution.