Every programmer has stared at a spinning cursor and wondered: is it still working, or stuck in an infinite loop? It feels like something a smart enough tool should be able to tell you. Couldn't a perfect analyzer read any program and announce, before you run it, whether it will eventually stop or loop forever?
That tool is the dream of the halting problem: a single program H that takes any other program and its input, and always answers "halts" or "runs forever" â correctly, every time.
Everywhere else on this site, "hard" has meant slow â problems that take impractically long. The halting problem is a different beast. In 1936 Alan Turing proved that H cannot exist. Not that it's slow, not that we haven't found it yet â that no algorithm can ever decide halting in general. It's our first encounter with a problem that is not hard but impossible.
Comments
Loading comments...