Conversions
The heart of the exam. Each of these is a mechanical procedure whose intermediate working a textbook prints only as a finished answer — here you can step through it and read what each step did.
Finite automata and regular expressions
- NFA → DFAThe subset construction: every set of NFA states the machine could be in becomes one DFA state.
- ε-NFA → NFARemove ε-transitions by giving every state the moves its ε-closure allows.
- Minimise a DFATable filling: mark every distinguishable pair, then merge what is left.
- DFA → regular expressionState elimination: rip out one state at a time, relabelling the paths that went through it.
- Regular expression → ε-NFAThompson's construction, one parse-tree node at a time, bottom-up.
- Regular grammar → NFAbeyond the syllabusEach variable becomes a state and each production becomes a move.
Pushdown automata
- Final state ↔ empty stackThe two PDA acceptance modes, interconverted — the bottom marker, the drain state and the detecting ε-moves, one step at a time.
- Grammar → PDAThe one-state construction: productions become expansion moves, terminals become match moves, and the stack holds the leftmost derivation.