-2
$\begingroup$

As we know, NP (nondeterministic polynomial time) is a complexity class used to classify decision problems. NP is the set of decision problems for which the problem instances, where the answer is "yes", have proofs verifiable in polynomial time by a deterministic Turing machine, or alternatively the set of problems that can be solved in polynomial time by a nondeterministic Turing machine.

If we have a solution of P problems, what is the computational complexity to verify the solution with a deterministic Turing machine?

$\endgroup$
1
  • 8
    $\begingroup$ When you say "If we have a solution of P problems, what is the computational complexity to verify the solution with a deterministic Turing machine?" are you talking about about verifying that a program (i.e., another Turing machine) correctly answers the decision problem on all inputs, or are you talking about verifying that an instance of the decision problem gives the answer "yes"? $\endgroup$ Commented Aug 27 at 1:03

1 Answer 1

1
$\begingroup$

In general it is computationally undecidable to determine if a given program $p$ solves a given decision problem, and also to decide whether it does so in polynomial time. For example, consider the trivial decision problem $D$, for which the answer is always Yes. This is clearly polynomial time decidable. But to decide if a program $p$ accepts every input is a $\Pi^0_2$-complete property, which is strictly harder than the halting problem. It's definitely not decidable. To see this, consider any $\Pi^0_2$ assertion $\forall n\exists k\varphi(n,k)$, where $\varphi$ has only bounded quantifiers. The program $p$ which accepts input $n$ if it finds a $k$ for which $\varphi(n,k)$ will accept all input if and only if the statement is true, and so $\Pi^0_2$ truth reduces to accepting all input.

Meanwhile, even if a program $p$ runs in polynomial time, to decide if it accepts all input is still not computably decidable. If it were, we could design a program $p$ that pretended to halt immediately with accept on all input, unless on input $n$ it found that the decision procedure on input $p$ halted in $n$ steps saying that it accepted all input, in which case it would immediately start to reject all input. There is such a procedure by the Kleene recursion theorem, and it runs in polynomial time, but refutes the given decision procedure.

$\endgroup$
4
  • 1
    $\begingroup$ The question is written in a very confusing way, but I think you might be misunderstanding what is being asked. To me the answer to "If we have a solution of P problems, what is the computational complexity to verify the solution with a deterministic Turing machine?" is "polynomial time complexity" simply because P is a subset of NP (which might be what the question-asker fails to see). Anyways I think the question should be closed unless it is edited to be more clear. $\endgroup$ Commented Aug 27 at 0:56
  • 1
    $\begingroup$ I think the OP is asking what is the complexity of verifying that a given solution does in fact solve a given decision problem in P. And my answer is that this is actually very difficult, not even computably decidable. If this is indeed what the OP intends, then I suggest leaving it as is, but if not, then I agree the question is not clear enough and should be closed. $\endgroup$ Commented Aug 27 at 1:00
  • 4
    $\begingroup$ The question is unclear regardless of whether you personally have managed to guess the intended meaning. $\endgroup$ Commented Aug 27 at 13:44
  • $\begingroup$ Yes, there are several questions, and I have to ask about them respectively and clearly. $\endgroup$ Commented Aug 27 at 14:38

Not the answer you're looking for? Browse other questions tagged .