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