This is an old revision of the document!
5. Regex to NFA to DFA conversions
Thompson's algorithm is used to convert from a Regex to an NFA. Subset construction is used to convert from an NFA to an equivalent DFA.
Thompson's algorithm applies the following rules recursively:
Exercises
5.1. Convert one of the following regular expressions to an NFA using Thompson's algorithm and then to a DFA using subset construction.
- $ (1 \cup \varepsilon)(0^*1)^*0^* $
- $ (0\cup 01) \cup 1(10^*)^* \cup \varepsilon $
- $ (((00 \cup 11)^*1)^*0)^* $
5.2. What would happen if the construction step for $ e^* $ in Thompson's algorithm were defined as follows?