Editing 1266: Halting Problem

Jump to: navigation, search

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 16: Line 16:
 
From a '''physical''' perspective, according to our current understanding of physics, this is right. 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, or the {{w|second law of thermodynamics}} will lead to the {{w|Heat death of the universe}}. Nothing lasts forever, and this includes a running program.
 
From a '''physical''' perspective, according to our current understanding of physics, this is right. 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, or the {{w|second law of thermodynamics}} will lead to the {{w|Heat death of the universe}}. Nothing lasts forever, and this includes a running program.
  
From a '''mathematical''' point of view, this is not true: a Turing machine will never have a hardware failure because it's not a physical machine. It's a theoretical construct, and it's '''defined''' mathematically, independent of any physical hardware. Similarly, ⅓ + ⅓ + ⅓ = 1 no matter what any physical hardware you are computing it on claims.
+
From a '''mathematical''' point of view, this is not true: a Turing machine will never have a hardware failure because it's not a physical machine. It's a theoretical construct, and it's '''defined''' mathematically, independent of any physical hardware. Similarly, ⅓ +  +  = 1 no matter what any physical hardware you are computing it on claims.
  
 
Another interpretation of [[Randall]]'s code is that, assuming the language uses an eager evaluation strategy, the Program in the parentheses is actually being run whenever his function is called. In this case, the function would wait until the program finishes and exits before returning "True". Therefore, [[Randall]]'s function is mathematically accurate. It does not solve the problem though, as it simply shifts the question to whether the function itself will ever halt. If his language uses lazy evaluation, the input program is completely ignored, and it reduces to the incorrect mathematical interpretation.
 
Another interpretation of [[Randall]]'s code is that, assuming the language uses an eager evaluation strategy, the Program in the parentheses is actually being run whenever his function is called. In this case, the function would wait until the program finishes and exits before returning "True". Therefore, [[Randall]]'s function is mathematically accurate. It does not solve the problem though, as it simply shifts the question to whether the function itself will ever halt. If his language uses lazy evaluation, the input program is completely ignored, and it reduces to the incorrect mathematical interpretation.

Please note that all contributions to explain xkcd may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see explain xkcd:Copyrights for details). Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel | Editing help (opens in new window)