← all subjects

Theory of Computation

Before we ask how to compute something efficiently, theory asks a deeper question: can it be computed at all — and if so, how powerful a machine do you need?

FIG_002
101010startq0q1q2111000
A finite automaton reading its input, symbol by symbol.

Start small. A finite automaton has no memory beyond its current state, yet it already captures every regular language — the patterns a regex can match, the tokens a lexer can split.

Finite automata, grammars, and Turing machines form a ladder of power. Climbing it tells you exactly which problems each model can and cannot solve — the foundation under every parser, regex, and compiler you’ll ever use.

FIG_003
101101q1
The tape: unbounded memory, one cell at a time.

Add a stack and you get a pushdown automaton — enough to parse balanced brackets and the grammars behind real languages. Add an unbounded tape and you get a Turing machine: the most powerful model we have, and, we believe, the most powerful there is.

That belief has a name — the Church–Turing thesis. Anything any reasonable machine can compute, a Turing machine can compute too; it is why one simple model gets to define computation itself.

FIG_004
regularcontext-freedecidablerecognizableHALTundecidable
The ladder of languages — and a wall: HALT.
FIG_001
▸ computing n + 1 — binary increment10111011R/Wstartq0q1qH␣→L0→10,1→R1→0,Ltape — infinite, both wayshaltfinite control[ THE TURING MACHINE ]
The Turing machine: a tape, a head, and a finite control — computation, distilled.

Undecidability is the punchline. Once a model is powerful enough to describe itself, it can ask questions about itself that it cannot answer — and the halting problem is the first and sharpest of them.

FIG_005
ET+TidF*Fidid
A grammar parses a string into a tree.

It also draws hard limits. Some problems — like deciding whether an arbitrary program halts — are provably unsolvable by any computer, ever. Knowing where those walls are saves you from running head-first into them.

Theory is the map of what’s possible. It turns “I couldn’t get it to work” into “this cannot work, and here’s the proof” — or “this can, and here’s why.”

Coming soonNotes for this subject are in progress — check back later.

***

| STUDY · NOTES |

A reference for the ideas behind computer science.

Written and illustrated by Amittai Siavava.

| § 2026 |