0

I've seen in many textbooks if say we have a problem $Q$, we write a non-deterministic algorithm in polynomial time to solve problem $Q$, and then from that point it results that $Q\in NP$. Why is that? Just because we could write a non-deterministic algorithm in polynomial time? Can't we do that for every problem?

C. Cristi
  • 187
  • 5
  • 1
    No we cannot do that for the halting problem – Narek Bojikian Dec 15 '19 at 18:50
  • 1
    The definition of NP is the class of problems that have a polynomial time nondeterministic algorithm. So by showing such an algorithm, you show that the problem is a member of NP. – Shaull Dec 15 '19 at 18:52

0 Answers0