2
$\begingroup$

After looking at the definition of nondeterministic TMs, it seems that, while guessing, the machine could go to at most $|Q|\times | \Gamma |$ configurations, being in a particular one.

However, if we look at several concrete NTMs, the guessing part depends on the size of the input, i.e. it's not bounded. For instance, let's take this machine finding Hamiltonian Path here: How does this non-deterministic algorithm to find if a Hamiltonian path exists work?

A part of the algorithm says "Each number in this list is non-deterministically selected to be from 1 to x.", where x is the number of nodes of the graph(and we may have arbitrarily big number of nodes).

I know the answer is perhaps trivial, but I couldn't find it.

$\endgroup$
2
$\begingroup$

Suppose that the input has length $n$, and suppose that the machine already knows $n$. In order to non-deterministically choose a number from 1 to $n$, it performs the following algorithm:

  • Choose $m = \lceil \log_2 n \rceil$ bits non-deterministically, and interpret them as a number $x$ from $0$ to $2^m-1$.
  • Increase $x$ by one.
  • Reject if $x > n$.

The first step is implemented by a loop.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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