1
$\begingroup$

Consider a nondeterministic TM $M$ that takes as input another TM $M'$, a string $x$ and integer $k$. $M$ decides if there exists a string y s.t. $|y| \leq |x|^2$ and $M'(x, y)$ accepts in $k$ steps. Show that $M$ runs in exponential time.

I don't see why it is exponential time. $M$ guesses $y$ with length $|x|^2$, then verifies by running $M'(x, y)$ in $k$ steps to see if $M'$ accepts, so shouldn't it be polynomial time?

$\endgroup$

1 Answer 1

1
$\begingroup$

Assuming $k$ is represented in binary, it takes $\lg k$ bits to represent $k$. So an algorithm whose running time is $\Theta(k)$ runs in time that is exponential in the length of the input. "Exponential time" means "exponential in the length of the input".

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.