1
$\begingroup$

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.

$\endgroup$
2
$\begingroup$

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.)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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