10

Is the class $\sf NP$ closed under complement or is it unknown? I have looked online, but I couldn't find anything.

Raphael
  • 73,212
  • 30
  • 182
  • 400
user16742
  • 235
  • 2
  • 3
  • 6

4 Answers4

18

First of all, the question you are asking is open, since an affirmative answer shows that $\sf NP = coNP$. In fact it is one of the most prominent open problems in computer science.

If $\sf P= NP$, then the class $\sf NP$ is closed under complement since $\sf P$ is. If on the other hand $\sf P \not = NP$ then we cannot say whether $\sf NP = coNP$ or not. Notice that $\sf NP = coNP$ implies that the polynomial hierarchy collapses to the first level. However this would not imply that $\sf P= NP$.

A.Schulz
  • 12,252
  • 1
  • 42
  • 64
7

The answer is "not known to science". It is known that P is closed under complement. So if P = NP then NP is closed under complement as well. Also, if NP is not closed under complement, then P != NP.

joebloggs
  • 90
  • 2
-2

"Every deterministic complexity class (DSPACE(f(n)), DTIME(f(n)) for all f(n)) is closed under complement, because one can simply add a last step to the algorithm which reverses the answer. This doesn't work for nondeterministic complexity classes, because if there exist both computation paths which accept and paths which reject, and all the paths reverse their answer, there will still be paths which accept and paths which reject — consequently, the machine accepts in both cases". Source

-2

It is unknown. A proof of the P vs. NP problem would give you an answer.

user119264
  • 349
  • 1
  • 9