The thread running through every chapter
Leven (even number of a's) and Leq = {anbn} appear in Chapter 1 as two similarly-simple-looking languages that turn out to need very different amounts of memory — the question that organises the entire course. Leq is proven not regular three times over (Chapters 1, 2, 3) before finally getting an actual machine in Chapter 6. L3eq = {anbncn} goes one step further — not regular, then not context-free either (Chapter 5) — before Chapter 7 finally builds it a Turing machine. The arithmetic-expression grammar (id + id * id) carries Chapters 4–6 the same way, ambiguous at first, then fixed, then converted, then parsed, then turned into a pushdown automaton.
Language Foundation
Alphabets, strings, and Kleene star; grammars and ambiguity introduced; the Chomsky hierarchy as nested rings; pigeonhole and adjacency matrices previewed for the proofs to come.
Finite Automata I
DFA and the extended transition function; minimization and the Myhill–Nerode proof that Leq isn't regular; NFA and subset construction; regular expressions and Kleene's theorem.
Finite Automata II
Closure under ∩, ∪, and complement via product construction; the formal Pumping Lemma; lexical analysis and the longest-match rule; a real DFA-based scanner, built and run.
CFG I
Context-free grammars formalised; leftmost and rightmost derivations over the same parse tree; arithmetic-expression and dangling-else ambiguity, fixed by restructuring; the harder case where no fix exists at all.
CFG II
Chomsky and Greibach Normal Form, fully converted and verified; the context-free Pumping Lemma; the surprising loss of closure under intersection; the CYK parsing table, filled in live.
Pushdown Automata
A stack added to the finite automaton; Leq finally recognised outright; the PDA↔CFG equivalence theorem; the one place nondeterminism stops being free — and where a stack shows up in real systems.
Turing Machines
The tape that moves both ways; L3eq finally decided; decidable versus recognisable made precise; the Halting Problem, proved undecidable by explicit construction — closing the loop Chapter 1 opened.
CEUC302 · Theory of Computation · each chapter is a standalone HTML file — open any one directly, no server or network required.