BCS 402 · Dr. Arash Kermani · CUD

Computability & Complexity

Interactive companion to Sipser, Ch. 3–9 (MIT 18.404J L7–21)
Seven hands-on modules: simulate machines, walk through proofs, build reductions, practice problems.
📖 Prerequisites · what to know before Day 1 → 📂 Student assignment tools (60 problems) →

How to use this site

Each of the seven modules below corresponds to a cluster of lectures from Michael Sipser's MIT 18.404J course. Inside every module you will find: a short narrative that builds the intuition; one or more interactive widgets (machine simulators, proof walkthroughs, reduction builders); and a set of practice problems taken from Introduction to the Theory of Computation (Sipser, 3rd ed.), each with hints and staged solutions.

The modules are designed to be read in order — later modules assume the language of earlier ones — but you can jump in anywhere if you already know the prerequisite vocabulary.

One sentence per module. Every module ends with a one-sentence statement of the central theorem of that module. If you can re-derive that sentence on a blank page, you understand the module.

The seven modules

Module 1 · Lecture 7
Decidable problems for automata & grammars
ADFA, EDFA, EQDFA, ACFG, ECFG — every "natural question about a DFA / CFG" is decidable. Run the algorithms on machines you build yourself.
Sipser §4.1 · 5 widgets · 6 exercises
Module 2 · Lectures 8–9
Undecidability & the Halting Problem
The diagonal argument made visual: ATM is undecidable, HALTTM is undecidable, and the world splits into decidable / recognizable / co-recognizable / neither.
Sipser §4.2, §5.1 · 4 widgets · 7 exercises
Module 3 · Lectures 10–11
Computation-history method & Recursion theorem
Use the computation-history trick to prove ALBA decidable but ELBA, ALLCFG undecidable; then the recursion theorem: programs that print themselves.
Sipser §5.1, §6.1, §6.3 · 3 widgets · 6 exercises
Module 4 · Lecture 12
Time complexity & the class P
From counting steps on a tape to the formal class P. Compare single-tape vs multi-tape running times; see why P is robust across reasonable models.
Sipser §7.1, §7.2 · 4 widgets · 5 exercises
Module 5 · Lectures 14–16
NP, NP-completeness, Cook–Levin
Verifiers, polynomial-time reductions, the Cook–Levin tableau, and the chain SAT → 3SAT → CLIQUE → VERTEX-COVER → HAMPATH → SUBSET-SUM, all interactive.
Sipser §7.3, §7.4, §7.5 · 6 widgets · 9 exercises
Module 6 · Lectures 17–19
Space complexity, PSPACE, games
Savitch's theorem visualized as a recursion tree; TQBF as the canonical PSPACE-complete problem; play Generalized Geography and feel why it is PSPACE-hard.
Sipser §8.1–§8.3 · 5 widgets · 7 exercises
Module 7 · Lectures 20–21
L, NL, hierarchy theorems
Log-space reductions, PATH is NL-complete, Immerman–Szelepcsényi (NL = coNL) via inductive counting, and the diagonalization at the heart of the hierarchy theorems.
Sipser §8.4–§9.1 · 4 widgets · 6 exercises

What you will be able to do at the end

The course's five learning outcomes line up cleanly with the modules:

CLOStatementPrimary modules
CLO-1Use diagonalization to prove undecidabilityModule 2, Module 7
CLO-2Use informal and formal reductions to establish algorithmic unsolvabilityModule 2, Module 3
CLO-3Distinguish the complexity of finding vs verifying a solutionModule 4, Module 5
CLO-4Use mapping reductions to establish hardness of computational problemsModule 5, Module 6
CLO-5Use hierarchy theorems to establish separation between complexity classesModule 7

Every module ends with a row of Sipser exercises you should now be able to solve. By the end of Module 7 you will be ready for the Sipser problems in chapters 4 through 9.

The big picture, in one diagram

The whole course is, in the end, about drawing the following picture and knowing where each landmark lives:

All languages over {0,1}* Turing-recognizable (RE) co-Turing-recognizable Decidable PSPACE NP P ATM ∈ RE \ Decidable ATM⁻ ∈ co-RE \ Decidable TQBF SAT, 3SAT, CLIQUE, … PATH, primes, 2-COL, …

Every solid boundary on this map is either a theorem we will prove together (P ⊆ NP ⊆ PSPACE ⊆ Decidable ⊊ RE) or an open question (P =? NP, NP =? PSPACE). By Module 7 you'll know which is which, and how the few known separations are forced by diagonalization.

About the design

Every interactive widget is hand-built; there is no math library running underneath. That is on purpose: the point is to see the algorithm execute, not to take its output on faith. If the diagonalization tableau looks like cheating, you can step through the construction one cell at a time and convince yourself it isn't.

The site is self-contained — no internet connection or login required. You can use it on a laptop in class, on a tablet at home, or projected on a board.