Mathematical Logic And Computation Codexery

Halting problem

No algorithm can decide if any program halts.

Halting problem

The halting problem is a decision problem in computability theory: given an arbitrary computer program and an input, determine whether the program will eventually halt or run forever.

field
Computability theory
known_for
Undecidability of the halting problem
proved_by
Alan Turing
type
Decision problem

Lore & Background

The halting problem asks whether a given program, run with a particular input, will eventually finish or loop forever. Simple cases, like a program that prints 'Hello, world!' and halts, are easy to decide, but Turing showed that no single algorithm works for all cases. His proof constructs a 'pathological' program that uses any candidate halting detector to produce a contradiction.

Reader's Guide

The halting problem is central to computability theory because it demonstrates that some mathematically definable functions are not computable. Its undecidability has practical consequences: in hard real-time computing, programmers use restricted languages like MISRA C, SPARK, and Rocq to ensure subroutines finish before deadlines. The problem is decidable for finite-memory machines such as linear bounded automata, though the number of possible states can be astronomically large.

Did You Know?

More in Mathematical Logic And Computation 1-21

Spotted an error? Know more?

This is a living reference — every entry is fact-audited, and reader corrections feed straight into our audit queue. Suggest an edit · See this site's audit record

Comments

Loading…
Open in the interactive codex →