Theory of computation

  1. Finite automata: Run a DFA, NFA or ε-NFA on any string and watch the active states light up.
  2. NFA to DFA: The subset construction with ε-closures, the DFA growing one move at a time.
  3. DFA minimisation: Partition refinement: 0-, 1-, 2-equivalence until equivalent states merge.
  4. Regex to NFA: Thompson's construction, fragment by fragment, for any regular expression.
  5. DFA to regex & product: State elimination with edge labels rerouting as states vanish, plus union and intersection of DFAs.
  6. Pumping lemma: Play the pumping game against an adversary: pick s, it splits xyz, you pick i. Can you prove L isn't regular?
  7. Pushdown automata: Nondeterministic PDAs searched breadth first, the stack animated, and CFG → PDA.
  8. CFG to CNF and GNF: Chomsky normal form step by step (ε, unit and useless rules, binarise), then on to Greibach normal form.
  9. CYK parsing: Fill the CYK triangle cell by cell and get the parse tree for CNF grammars.
  10. Turing machine: A live tape and head: aⁿbⁿcⁿ, palindromes, binary increment, busy beaver.