Is this language decidable?

234 Views Asked by At

Is this language decidable?

$$\{x\mid \text{$x$ is the code of a Turing machine that always halts on $y$ in less than $y^3$ steps}\}$$

I think it is, because it halts in a finite number of states. Am I right? Is there a more classic way of saying so?

1

There are 1 best solutions below

0
On BEST ANSWER

No, it is not computable. First, the intuition is that you can not know that $\Phi_x$ halts on all $y$ in less than $y^3$ steps without actually checking it for all of the infinitely many $y$.

Let $A$ denote the set above.

Now let $\bar{K}$ denote the complement of $K$. Given $x$, define a Turing machine $T_x$ as follows: On input $y$, run $\Phi_x(x)$ for $y$ steps. If $\Phi_x(x)$ has not halted, then $T_x(y)$ will halt in $y$ steps. If $\Phi_x(x)$ has halted by $y$ steps, then $T_x(y)$ will keep running without ever halting.

It is clear that there is a computable $f$ that takes $x$ to the index of the Turing $T_x$ constructed above.

If $x \in \bar{K}$, then $f(x)$ is the index of a Turing program that halts on all input in $y < y^3$ steps. So $f(x) \in A$.

If $x \notin \bar{K}$, then $x \in K$. So $\Phi_x(x)$ will halt at some stage $k$. Then $T_x$ is a Turing that does not even halt on any $y > s$. So $f(x) \notin A$.

This is a many to one reduction of $\bar{K}$ to $A$. Since $\bar{K}$ is not computable, neither is $A$.