Lexical analysis
Subset Construction
Convert an NFA to a DFA using ε-closures, one table row at a time.
- Lecture reference: Lexical Analysis III
- Lecture reference: Lexical Analysis IV
Source
Regular definitions
The NFA is built with Thompson's construction; its states are named A, B, C, … by column. Open in Thompson's construction
DFA state names
Lecture reference: Lexical Analysis IV
Is the previous DFA minimal?
Show answer
No. ABCDHI and FGABCDHI are both non-accepting, and on every symbol they go to the same state (0 → FGABCDHI, 1 → EJGABCDHI), so they can be merged. The minimal DFA has 2 states.
Minimize this DFAConstruction
DFA states: — of 2¹⁰ = 1,024 possible subsets
Click states to pick a set; the order you pick them is the order the seeds are listed.
Set { }
The closure lists the picked states first, then each state reached by ε-edges, depth first, following ε-edges in the order they were made.