This is a question I found in a practice exam while I am preparing for my mid term exam.

The answer needs justification, either a pseudo code or a logical explanation why not.

What puzzled me about that question is that we already know that all LOOP programs terminate at some point, the question seems odd to me.

Any references about LOOP and/or WHILE programs are welcome. Our professor didn't give much.


1 Answer 1


If all LOOP programs terminate that there is a Turing machine that decides whether a LOOP program stops on input 0: it just always accepts. For WHILE programs the picture is rather different - I'll let you find out yourself. (Perhaps your professor really meant WHILE programs.)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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