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 8: | Line 8: | ||
==Explanation== | ==Explanation== | ||
− | In 1936 {{w|Alan Turing}} proved that it's not possible | + | {{incomplete}} |
+ | In 1936 {{w|Alan Turing}} proved that it's not possible to decide whether an arbitrary program will eventually halt, or run forever. This was later called the {{w|Halting problem}} by {{w|Martin Davis}}. The official definition of the problem is to write a program (actually, a {{w|Turing Machine}}) that accepts as parameters a program and its parameters. That program needs to decide, in finite time, whether that program will ever halt running these parameters. | ||
The halting problem is a cornerstone problem in computer science. It is used mainly as a way to prove a given task is impossible, by showing that solving that task will allow one to solve the halting problem. | The halting problem is a cornerstone problem in computer science. It is used mainly as a way to prove a given task is impossible, by showing that solving that task will allow one to solve the halting problem. | ||
− | [[Randall]], however, is providing a simpler solution. He implements his own code for the question ''"Does it halt?"'' which always returns | + | [[Randall]], however, is providing a simpler solution. He implements his own code for the question ''"Does it halt?"'' which always returns a positive answer, directing us to look at the bigger picture. |
− | + | For all '''practical''' purposes, this is the correct solution. Given enough time, any program will halt. This is due to factors external to the actual program. Sooner or later, electricity will give out, or the memory containing the program will get corrupted by cosmic rays, or corrosion will eat away the silicon in the CPU. Nothing lasts forever, and this includes a running program. | |
− | From | + | From the '''theoretical''' point of view, this is not true: Turing machine will never have a hardware failure because it's not real machine, it's theoretical construct, and it's '''defined''' to not have any. Similarly, 1/3 + 1/3 + 1/3 = 1 no matter what any real hardware you are computing it on claims. |
− | + | The title text further relates to this issue by claiming to have found a case where something need not die, but Randall does not know how to actually show it to anyone, because just the fact everyone will die sooner that this thing it doesn't prove it will not die. The wording of the title text might also be a reference to {{w|Fermat's Last Theorem}}. | |
− | + | It should be noted that Randall's solution does not, in fact, solve the halting problem in the form it is usually stated. The halting problem requires two parameters (a program and its parameters), while Randall's function only accepts one (the program). The question of wether a program halts for every input can be shown to be equivalent in terms of satisfiablity to the halting problem. | |
− | |||
− | |||
− | |||
− | It should be noted that Randall's solution, | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Transcript== | ==Transcript== | ||
− | |||
'''Define''' DoesItHalt(program): | '''Define''' DoesItHalt(program): | ||
{ | { | ||
− | ''' | + | '''return''' true; |
} | } | ||
− | |||
:The big picture solution to the halting problem. | :The big picture solution to the halting problem. | ||
− | |||
− | |||
− | |||
{{comic discussion}} | {{comic discussion}} | ||
[[Category:Computers]] | [[Category:Computers]] | ||
− |