Most of computer science measures hardness by resources: how many steps does an algorithm need, how much memory? But in the 1970s, logician Ronald Fagin asked an entirely different question: what if we measured hardness by language?
His idea was to describe problems not as algorithms but as logical formulas. Given a finite structure — a graph, a database, a game board — can you write a single sentence in some logical language that is true exactly when the answer is "yes"? If so, what kind of sentence do you need?
The stunning discovery is that the complexity of the formula mirrors the complexity of the problem:
- Fagin's theorem (1974, proven): A property of finite structures is in NP if and only if it can be expressed by a sentence in second-order existential logic (SO∃) — logic where you can quantify over relations, not just elements.
- Immerman–Vardi theorem (1987, proven): On ordered structures, a property is in PTIME if and only if it can be expressed in first-order logic extended with a least-fixed-point operator (FO+LFP).
These are not approximations. They are exact, machine-independent characterizations of complexity classes — no Turing machines, no clocks, just the shape of the sentence that describes the problem.
This field, descriptive complexity, grew from Fagin's insight into a bridge between mathematical logic and the central questions of P vs NP.
Comments
Loading comments...