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?
Asked
Active
Viewed 18 times
0
-
1No we cannot do that for the halting problem – Narek Bojikian Dec 15 '19 at 18:50
-
1The 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