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 18: Line 18:
 
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 the Program in the parentheses is actually being run whenever his function is called, as is consistent with some programming constructs. 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.
  
 
From a '''practical''' point of view, there are of course times that a programmer would want to return "false", since some programs can be mathematically shown to run forever.
 
From a '''practical''' point of view, there are of course times that a programmer would want to return "false", since some programs can be mathematically shown to run forever.

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)