Prove that the following problem is either NP-complete or design a polynomial algorithm:
Given: Description of non-deterministic Turing machine $M$ and two string $x$ and $y$
Question: If machine $M$ runs on string $x$, will there be a branch of $M$'s computation where string $x$ is accepted for no more than $|y|$ steps?
I assume that this problem is NP-complete as:
- We can run this non-deterministic machine for $|y|$ steps and see if the string is accepted
- Wikipedia says about converting from non-deterministic to determistic Turing machine:
Therefore, the length of an accepting computation of the DTM is, in general, exponential in the length of the shortest accepting computation of the NTM.
So the complexity would be at least $\Omega(exp(n))$. But this is a lower bound, what about the upper bound? I guess it is important for proving NP-completeness.
Yes, the problem is NP-complete. But your argument that this is the case doesn't work.
The property you quote in point 2 concerns a specific technique for converting a non-deterministic machine to a deterministic one. But just because that particular technique will not produce a fast solution doesn't automatically mean that there is no possible shortcut for solving this particular problem. For example, the general construction must work without knowing the running time of the nondeterministic machine; a priori it is conceivable that knowing the $|y|$ bound would allow one to do something smart and fast.
Instead, what you need to do is provide a reduction. Usually you would reduce from some known NP-complete problem to your problem, but in this case it will be more instructive to go all the way down to the definition of "NP-complete" and show that you can find a poly-time reduction from an arbitrary (not necessarily complete) problem in NP to your problem in a single, direct step.