This is an old revision of the document!


Regular Expressions and NFA Exercises

Regular Expression to NFA

1. What language does $ (1 \cup \varepsilon)(00^*1)^*0^*$ generate?

2. Convert the previous regex to an NFA.

NFAs

3. Consider the following NFA:

What are all reachable configurations from (0,ABBA) ?

4. 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\}$.

6. Consider the following NFA:

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 3.

8. Convert the NFA from exercise 3 to a DFA.

9. Convert the NFA from exercise 6 to a DFA.

10. Convert the NFA from exercise 2 to a DFA.