Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I was just reading a chapter about LOOP-computable functions and I have the following question: Is it possible to numerate every LOOP program with an algorithm?

Formally: Is it possible to have a LOOP program M, s.t M(n,m)=P_n(m) (input is n,m. output is P_n(m), where P_n is the numeration of the loop programs).

share|improve this question

1 Answer 1

up vote 0 down vote accepted

No. Assume M is a loop-program. Define program D(x) = M(x, x). Then D is trivially a loop-program. Let i be the index of D in the enumeration, i.e. P_i = D; then M(i, i) doesn't halt because it's an infinite loop (D(i) calls M(i,i) calls D(i) ...). Therefore M can't be a loop-program.

share|improve this answer
    
Thank you, could you explain me the second part a little bit more in detail? If i is the index you mean D_i(x)=? Where is the difference between M(i,i) and M(x,x)? –  Voyage Mar 10 '13 at 11:48
    
@Voyage "D(x) = M(x,x)" defines D for any argument x (In other words: D = lambda x. M(x, x)). "M(i,i)" and "D(i)" are calls of the functions with whatever the value of "i" might be (we don't know what it is, but its existence is guaranteed by the fact that D is a loop-program) –  valtron Mar 10 '13 at 18:47

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.