Follow your curiosity

What discovery has been shared with you?

Start with one fact. Explore it, go deeper, then follow whichever branch catches your imagination.

Choose subjects for a surprise

Exploring any topic

Begin your discovery

Your next discovery is one click away.

Choose one or more subjects above, or leave Any Topic selected and let curiosity decide.

Technology

The Halting Problem and the Limits of Computability

Quick fact

The halting problem is so undecidable that even a supercomputer of any size could never solve it, because its impossibility is a fundamental property of logic, not just technology.

Why this is interesting

Imagine you had a magic app that could flawlessly detect whether any computer program would ever stop running or run forever. Would you be able to create it? Alan Turing proved that no such app can ever exist, no matter how powerful the computer.

Read the full explanation

Understanding The Halting Problem and the Limits of Computability

Think of a computer program as a step-by-step recipe. Most recipes eventually finish, but some, like one that says 'keep adding 1 to a number forever', never stop. The halting problem asks: can we build a master recipe checker that looks at any recipe and tells us in advance if it will stop or not? This checker would be a program itself, operating on other programs. At first, it seems possible—we might try to simulate the program and see, but if the program runs for a million years, how do we know it won't stop later? The challenge is to have a definite answer for every possible program, not just most.

A deeper explanation

The key is a self-referential contradiction. Suppose we had a program H that takes another program P and its input, and outputs 'halts' or 'doesn't halt'. Then we can construct a new program D that uses H. D does the opposite of what H says: if H says that D will halt, then D runs forever; if H says D will never halt, then D stops immediately. When we ask H about D itself, we get a paradox—if D halts, it doesn't halt, and vice versa. This logical impossibility shows that H cannot exist. Turing's proof uses diagonalization, similar to Cantor's proof that there are more real numbers than integers. The halting problem is the canonical example of an undecidable problem, meaning no algorithm can solve it for all possible inputs. This discovery established the field of computability theory and revealed inherent limits to what computers can do, distinguishing between problems that are solvable in principle and those that are not.

Keep FACTREE close

Internet access is required. Updates arrive when you reopen or reload the app. You may need to sign in again in the installed app.