Edit this page Backlinks This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== 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: {{:lfa:2024:lab5-base_case.png?400|}} {{:lfa:2024:lab5-concat.png?600|}} {{:lfa:2024:lab5-union.png?400|}} {{:lfa:2024:lab5-kleene_star.png?400|}} ==== 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? - {{:lfa:2024:lab5-2_1.png?200|}} - {{:lfa:2024:lab5-2_2.png?200|}}