[Math] Is this undecidable language recognizable

computabilityturing-machines

Is this language:

$L = \{\langle M\rangle : \text{$M$ is a Turing machine and $L(M)$ is decidable}\}$

which I know that is undecidable, turing-recognizable?
Is its complement recognizable?

Thanks is advance

Best Answer

No, your $L$ (which is sometimes called $\text{REC}$) is $\Sigma_3^0$-complete. However, this proof is somewhat technical. If you just want to show that it and its complement is not c.e., there is a fairly easy proof:

It well known that $K = \{e : \Phi_e(e) \downarrow\}$ is c.e. and but not computable. ($K$ is a variant of the Halting Problem.) It is easy to show that if a set and its complement is c.e., then it must be computable. Hence the complement of $K$, denoted $\bar{K}$, is not c.e.

Define

$\Psi(e,x) = \begin{cases} 0 & \quad \Phi_{e,x}(e)\uparrow \\ 0 & \quad \Phi_{e,x}(e) \downarrow \wedge (\exists s)\Phi_{x,s}(x)\downarrow \\ \uparrow & \quad \Phi_{e,x}(e) \downarrow \wedge \Phi_{x}(x)\uparrow \end{cases}$

$\Psi$ is clearly a partial computable function. By the s-m-n theorem, there exists a computable $f$ such that $\Psi(e,x) = \Phi_{f(e)}(x)$. Thus if $e \in \bar{K}$, then $\Psi(e,x) = \Phi_{f(e)}(x) = 0$ for all $x$ so $W_{f(e)} = \omega$. $\omega$ is computable. So $f(e) \in L$. If $x \in K$, then there is a least $M$ such that $\Phi_{e,M}(e) \downarrow$. So then for all $x > M$, $\Psi(e,x)\downarrow = \Phi_{f(e)}(x)\downarrow$ if and only if $x \in K$. So $W_{f(e)}$ is equal to $K$ except for a finite difference. Since $K$ is not computable, $W_{f(e)}$ is also not computable. Hence $f(e) \notin L$. Thus it has been shown $f$ is the reduction of $\bar{K} \leq_m L$. Since $\bar{K}$ is not c.e., $L$ can not be c.e.

To show that the complement $\bar{L}$ is not c.e. Use

$$\Psi(e,x) = \begin{cases} 0 & \quad \Phi_{e,x}(e) \uparrow \wedge (\exists s)\Phi_{x,s}(x)\downarrow \\ \uparrow & \quad \Phi_{e,x}(e)\uparrow \wedge \Phi_x(x)\uparrow \\ 0 & \quad \Phi_{e,x}(e)\downarrow \end{cases}$$

By a similar argument as above, $\bar{K} \leq_m \bar{L}$. Hence $\bar{L}$ can not be c.e. either.

It has been shown that $L$ and $\bar{L}$ is not c.e.


The basic idea is: The set $K = \{\langle M \rangle : M(\langle M \rangle) \text{ halt }\}$ is recognizable but not decidable. Hence its complement $\bar{K} = \{\langle M \rangle : M(\langle M \rangle) \text{ does not halt}\}$ is not recognizable.

Let $M_x$ denote the Turing machine with code $x$. You want to construct a Turing machine $U$ that reduces $\bar{K}$ to $L$. Given $M$ define $T_M$ to the be Turing machine such that:

$T_M(x)$ halts if $M(\langle M \rangle)$ does not halt by stage $x$

$T_m(x)$ halts if $M(\langle M \rangle)$ halts by stage $x$ and $M_x(x)$ eventually halts

$T_M$ does not halt otherwise

Let $U(\langle M \rangle) = \langle T_M \rangle$

Then if $\langle M \rangle \in \bar{K}$, $T_M$ halts on all input. Hence $L(T_M)$ is decidable. So $U(M) = \langle T_M \rangle \in L$ If $\langle M \rangle \notin \bar{K}$, then $L(T_M)$ agrees with $K$ except on a finite set. Since $K$ is not decidable, $L(T_M)$ is not decidable. So $U(M) = \langle T_M \rangle \notin L$. This give the reduction of $\bar{K} \leq L$. Since $\bar{K}$ is not recognizable, $L$ is not either.

Using a similar idea, you can reduce $\bar{K} \leq \bar{L}$, where $\bar{L}$ is the complement of $L$.