Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| lfa:lab04-regexp-nfa [2021/10/31 09:07] pdmatei | lfa:lab04-regexp-nfa [2021/11/02 18:02] (current) roxana_elena.stiuca [3. The subset construction] | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Regex to DFA conversion ====== | + | ====== 5. Regex to DFA conversion ====== | 
| - | ==== Regular Expression to NFA ===== | + | ==== 5.1. Nondeterministic Finite Automata ==== | 
| - | 1. What language does $ (1 \cup \varepsilon)(00^*1)^*0^*$ generate? | + | |
| - | 2. Convert the previous regex to an NFA. | + | 5.1.1. Consider the following NFA: | 
| - | + | ||
| - | ==== NFAs ===== | + | |
| - | + | ||
| - | 3. Consider the following NFA: | + | |
| {{:lfa:lab03-nfa2.png|}}   | {{:lfa:lab03-nfa2.png|}}   | ||
| Line 14: | Line 9: | ||
| What are all reachable configurations from (0,abba) ? | What are all reachable configurations from (0,abba) ? | ||
| - | 4. What is the accepted language of the previous NFA? | + | 5.1.2. What is the accepted language of the previous NFA? | 
| - | 5. Write an NFA //without// $ \varepsilon$-transitions, which accepts the language $ L = \{abc,abd,aacd\}$ over the alphabet $ \Sigma = \{a,b,c,d\}$. | + | 5.1.3. Write an NFA //without// $ \varepsilon$-transitions, which accepts the language $ L = \{abc,abd,aacd\}$ over the alphabet $ \Sigma = \{a,b,c,d\}$. | 
| - | 6. Consider the following NFA: | + | 5.1.4. Consider the following NFA: | 
| {{:lfa:lab02-nfa2.png|}} | {{:lfa:lab02-nfa2.png|}} | ||
| Line 24: | Line 19: | ||
| What are all reachable configurations from $ (0,abbabbb)$? | What are all reachable configurations from $ (0,abbabbb)$? | ||
| - | ==== NFAs to DFAs ===== | ||
| - | 7. Write the $ \varepsilon$-closure ($ E(q)$) for each state q in the NFA from exercise 6. | + | ==== 2. Regex to NFA ===== | 
| + | 5.2.1. What language does $ (1 \cup \varepsilon)(00^*1)^*0^*$ generate? | ||
| + | |||
| + | 5.2.2. Convert the previous regex to an NFA. | ||
| + | |||
| + | |||
| + | ==== 3. The subset construction ===== | ||
| + | |||
| + | 5.3.1. Write the $ \varepsilon$-closure ($ E(q)$) for each state q in the NFA from exercise 5.1.4. | ||
| - | 8. Convert the NFA from exercise 3 to a DFA. | + | 5.3.2. Convert the NFA from exercise 5.1.1 to a DFA. | 
| - | 9. Convert the NFA from exercise 6 to a DFA. | + | 5.3.3. Convert the NFA from exercise 5.1.4 to a DFA. | 
| - | 10. Convert the NFA from exercise 2 to a DFA. | + | 5.3.4. Convert the NFA from exercise 5.2.2 to a DFA. |