Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

13
  • NO! You are describing an algorithm not a problem! NP-Completeness is defined on problems not algorithms. A problem is NP-Complete if and only if it is: (1) In NP. (2) has a polynomial reduction from each problem in NP. Commented Dec 1, 2012 at 7:43
  • @amit: ...who was talking about NP-completeness in the first place? Commented Dec 1, 2012 at 7:46
  • However - note that the answer is still not complete, a problem is in NP if you can check the correctness of every correct and every incorrect answer for every instance of this problem in polynomial time. Commented Dec 1, 2012 at 7:57
  • @amit: Yeah I forgot to mention that, since it was already in the question... feel free to edit it if you'd like Commented Dec 1, 2012 at 8:03
  • I thought only a "yes" answer needed to be verifiable in poly time for a problem to be in NP? If the answer is "no", it could run forever and still be in NP. Is my understanding wrong? I'm referring to a deterministic machine. Commented Dec 1, 2012 at 16:26