1

Having the function:

$$f(y) = \begin{cases} \ 1 &\text{if }\forall n \Phi_y(n)=n\lor \Phi_y(n) \!\uparrow\\ \ 0 &\text{otherwise.} \end{cases}$$

By the rule of thumb it should not be computable. How to prove it formally? If it's computable, I assumed a function like this exists: $$g(y) = \begin{cases} \ 1 &\text{if $f$(y) = 1 }\\ \ 0 &\text{if $f$(y) = 0} \end{cases}$$

I assumed $g(y)$ is computable. Now there exists a function $\Phi_{x_0}(x_0)$ which simulates $g(y)$. This means: $\Phi_{x_0}(x_0) \downarrow$ iff $\Phi_{x_0} (x_0) \uparrow$, which is a contradiction. Is this sufficient as a proof?

TechCrap
  • 145
  • 6

2 Answers2

3

Since I assume this is a homework question, I won't give a fully detailed proof but rather a sketch with some gaps to fill.

Consider the function $$g(x)= \begin{cases} x+1 & \text{ if } \varphi_x(x)\downarrow\\ \uparrow & \text{ otherwise}.\end{cases}$$ This function is computable (convince yourself of that!), so it has an index $e$.

Now consider the function $f$ on $e$, then computing $f(e)$ comes down to verifying whether $\forall n\ \varphi_e(n)\uparrow$. Can you see why this contradicts that the halting problem is not computable?

3

Here's how to solve the halting problem using $f$. Suppose that we are given a Turing machine $T$, and we want to know whether it halts on the empty input. Construct a Turing machine $T'$ which on input $n$ runs $T$, and if it ever halts, it outputs $n+1$. So $T$ halts on the empty input iff $f(\langle T' \rangle) = 0$.

Conversely, we can calculate $f$ using an oracle for the halting problem. Given a Turing machine $T$, construct a Turing machine $T'$ which runs $T$ on all possible inputs in parallel, and stops if it finds out that $T(n) \neq n$ for some $n$. Then $f(\langle T \rangle) = 0$ iff $T'$ halts.

What we have shown is that $f$ (more exactly, the set of 1-inputs of $f$) is $\Pi_1$-complete.

Yuval Filmus
  • 280,205
  • 27
  • 317
  • 514