0
$\begingroup$

This is from an exercise in Boolos' Computability text. My problem is as follows:

I am looking for a method that encode numbers for recursive functions. Then given such an encoding for recursive functions by natural numbers, let d(x) = 1 if the one-place recursive function with encoding number x is defined and has value 0 for argument x, and d(x) = 0 otherwise. Show that this function is not recursive.

I am thinking the actual question is just a diagonalization argument, and it doesn't depend in any way on details of the coding.

  • 0
    No, that's not the coding scheme, and as I said, the coding scheme doesn't matter if all you want is to solve the exercise. (In other words, you're asking two separate questions here.)2012-05-05

1 Answers 1

1

The subject of enumerating the recursive functions in a reasonable way is rather sophisticated. However, it is easy to see that the set of all recursive functions $\mathbb{N} \rightharpoondown \mathbb{N}$ must be a countable set, so there is some surjection from $\mathbb{N}$ to the set of all recursive functions.

Fix one such surjection, and let $d$ be the function as described by Boolos. Suppose $d$ is recursive; then it has a number, say $x$. What is $d (x)$? If it's $0$, then that by definition of $d (x)$ we must have $d(x) = 1$ – contradiction. If it's not $0$, then that means $d (x) = 0$ – contradiction. If it's not defined, then that means $d (x) = 0$ – contradiction. So $d$ can't be recursive.