1

Suppose, for the sake of argument, that it was proved that $P \not= NP$. Then, this would imply that for every $NP$-complete problem, there is a "hardest instance" of the problem that cannot be solved in polynomiall time. Then, if $P$ were to not equal $NP$, what properties would be known about the hardest instances of $NP$-complete problems?

In particular, my question is:

If $H$ is the set of all hardest instances of some $NP$-complete problem (take subset-sum for instance), thereby not solvable in polynomial time, then do we know if $H$ would contain both "yes" and "no" instances of the problem, or only "yes" or only "no" instances? (By "yes" instance I mean the answer to the decision problem is "yes"; i.e., "yes, there is a subset of some integer set that sums to a target value").

My gut tells me the set of all hardest instances of a problem must contain at least one "yes" instance, and not necessarily a "no" instance, but I do not have a proof and am wondering if someone has one.

My general thought for a proof of why there must be "yes" instances in the hardest set is as follows:

Suppose, for the sake of contradiction, that the set of problems that no algorithm could solve in polynomial time are all "no" instances. Then this implies there is an algorithm that can solve all "yes" instances in polynomial time, and hence for parameter $n$ is gauranteed to halt after $n^d$ iterations, where $d$ is a fixed positive integer. But then this implies that if the algorithm does not return "yes" after $n^d$ iterations, then it knows it must be a "no" instance, and hence returns "no" in polynomial time ($n^d$ iterations). But then this is an algorithm solving all instances of the problem in polynomial time, a contradiction.

user918212
  • 295
  • 1
  • 9

1 Answers1

9

This would imply that for every NP-complete problem, there is a "hardest instance" of the problem that cannot be solved in polynomiall time.

No. This is incorrect. For every single instance, there is a polynomial-time algorithm that solves that instance correctly. The algorithm can hardcode a check to check for that one instance and output a hardcoded answer (the correct solution).

As this also shows, the notion of "hardest instance" is not well-defined. So, your proposal that we define $H$ to be the set of hardest instances is not well-defined. The set $H$ is not well-defined, because there is no sensible definition of what it means for a single instance to be a hardest instance.

This means that your question is not answerable because it is not meaningful/well-posed.


For any set of instances, if the set contains only "yes" instances it can be solved in polynomial time (simply use an algorithm that ignores its input and always outputs "yes"). Similarly, any set that contains only "no" instances can be solved in polynomial time. So, if you have a set that is not solvable in polynomial time, then it must contain both yes instances and no instances. In fact, it must contain infinitely many yes instances and infinitely many no instances.

D.W.
  • 167,959
  • 22
  • 232
  • 500