Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

A partial computable function is also known as effectively computable, and is defined as any function that can be computed by a Turing machine with $Dom(f) \subseteq \Sigma^*$, where $\Sigma^*$ is the Kleene star of the alphabet $\Sigma$ for the Turing machine that satisfies partial computability.

How do we know that there exists a function from $\mathbb{N}$ to $\mathbb{N}$ that is not partial computable?

share|improve this question
6  
Hint: how many functions from $\mathbb{N}$ to $\mathbb{N}$ are there? –  Ross Millikan Apr 27 '11 at 13:41
3  
Hmm... I'm going to guess uncountably many? Because there are countably many Turing machines, then that implies there must exist some function from $\mathbb{N}$ to $\mathbb{N}$ that cannot be represented by a Turing machine. –  robjb Apr 27 '11 at 13:53
1  
You got it. One proof that there are uncountably many: Think of the set of functions that for each $k \in \mathbb{N}$ either take $2k$ to $2k$ and $2k+1$ to $2k+1$ or interchange them ($2k$ to $2k+1$ and $2k+1$ to $2k$). There is a bijection of this set of functions with binary bit strings (interchange at $k$ if there is a $1$ bit at position $k$) –  Ross Millikan Apr 27 '11 at 14:17
    
you could write up an answer so this doesn't keep coming back (the robot on the site returns unanswered questions periodically) –  Ross Millikan Apr 27 '11 at 14:22
    
@Ross. Thanks, I will do that. –  robjb Apr 27 '11 at 20:56

2 Answers 2

up vote 4 down vote accepted

The counting argument is very beautiful but you should also know Alan Turing's demonstration,

According to set theory every Turing machine either halts or does not halt, so let us encode Turing machines as natural numbers and write a map from them to "1" if they halt and "0" if they do not.

That function $\text{halts} : \mathbb N \to \mathbb N$ cannot be implemented in a Turing machine, if it were then you could also build a Turing machine that uses it as a subroutine for the following

natural liar(natural t) { if(halts(t)) { loop(); } else { return 0; } }

This Turing machine takes a Turing machine encoded as a number and loops if it halts and halts if it loops! When you apply this Turing machine to the number encoding it's self you get a paradox, which contradicts the possibility of the "halts" function being implemented in a Turing machine.

share|improve this answer
    
Coincidentally, I've also seen the halting problem presented more explicitly in my theory of CS course; I just hadn't considered halts() being defined from $\mathbb{N}$ to $\mathbb{N}$. –  robjb Apr 29 '11 at 1:11

A pure "counting" argument, as in the comments, does the job. But perhaps it is worthwhile to be more explicit.

There are countably many Turing machines, so they may be enumerated as $T_0$, $T_1$, $T_2$, and so on.

Let $f(e,x)=0$ if the Turing machine $T_e$ does not halt on numerical input $x$, and let $f(e,x)$ be $1$ more than the result of applying $T_e$ to $x$ otherwise. Finally, let $g(x)=f(x,x)+17$.

We show that $g$ is not Turing computable. For if it is, there is a Turing machine $T_a$ such that $f(a,x)=g(x)$ for all $x$. Put $x=a$. We find that $f(a,a)=g(a)$. But $g(a)=f(a,a)+17$, so $17=0$.

In a way, the above argument is implicit in the "counting" argument, since one shows that the set of functions from $\mathbb{N}$ to $\mathbb{N}$ is uncountable in precisely this way. But it is worthwhile to be explicit, as an easy prelude to more subtle but similar arguments.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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