Editing 1266: Halting Problem
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 30: | Line 30: | ||
The proof that the halting problem is unsolveable is to write a new function that uses Randall's program: | The proof that the halting problem is unsolveable is to write a new function that uses Randall's program: | ||
− | < | + | <code> |
DEFINE META_DOESITHALT(): | DEFINE META_DOESITHALT(): | ||
− | + | ::IF ( DOESITHALT(META_DOESITHALT) ) | |
− | + | ::::WHILE ( TRUE ) DO_NOTHING; | |
− | + | ::ELSE | |
− | + | ::::HALT; | |
− | </ | + | </code> |
If Randall's function says that <code>META_DOESITHALT</code> halts by returning "TRUE" - then that makes <code>META_DOESITHALT</code> loop forever. But if it decides that it must not halt by returning "FALSE" - then <code>META_DOESITHALT</code> halts. | If Randall's function says that <code>META_DOESITHALT</code> halts by returning "TRUE" - then that makes <code>META_DOESITHALT</code> loop forever. But if it decides that it must not halt by returning "FALSE" - then <code>META_DOESITHALT</code> halts. |