Table of Contents

4. Regex to DFA conversion

4.1. Nondeterministic Finite Automata

4.1.1. Consider the following NFA:

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

Click to display ⇲

Click to hide ⇱

(0, abba) → (0, bba) → (0, ba) → (0, a) → (0, $\varepsilon$) reject

(0, abba) → (0, bba) → (0, ba) → (0, a) → (1, $\varepsilon$) reject

(0, abba) → (1, bba) → (2, ba) → (3, a) stuck

4.1.2. What is the accepted language of the previous NFA?

Click to display ⇲

Click to hide ⇱

L( (a $\cup$ b)* a (a $\cup$ b) (a $\cup$ b $\cup$ $\varepsilon$) )

4.1.3. Write an NFA without $ \varepsilon$-transitions, which accepts the language $ L = \{abc,abd,aacd\}$ over the alphabet $ \Sigma = \{a,b,c,d\}$.

Click to display ⇲

Click to hide ⇱

4.1.4. Consider the following NFA:

What are all reachable configurations from $ (0,abbabbb)$?

Click to display ⇲

Click to hide ⇱

2. Regex to NFA

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

Click to display ⇲

Click to hide ⇱

L($ (1 \cup \varepsilon)(00^*1)^*0^*$) = { w $\in$ {0, 1}* | w has the property that there are no sequences of 2 or more consecutive “1” }

4.2.2. Convert the previous regex to an NFA.

Click to display ⇲

Click to hide ⇱

3. The subset construction

4.3.1. Write the $ \varepsilon$-closure ($ E(q)$) for each state q in the NFA from exercise 4.1.4.

Click to display ⇲

Click to hide ⇱

E(0) = {0, 2}

E(1) = {1, 3}

E(2) = {2}

E(3) = {1, 3}

4.3.2. Convert the NFA from exercise 4.1.1 to a DFA.

Click to display ⇲

Click to hide ⇱

4.3.3. Convert the NFA from exercise 4.1.4 to a DFA.

Click to display ⇲

Click to hide ⇱

Barred transitions go to a sink state.

4.3.4. Convert the NFA from exercise 4.2.2 to a DFA.

Click to display ⇲

Click to hide ⇱

Barred transitions go to a sink state.