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. ====== 4. Regex to DFA conversion ====== ==== 4.1. Nondeterministic Finite Automata ==== 4.1.1. Consider the following NFA: {{:lfa:lab03-nfa2.png|}} What are all reachable configurations from (0,abba) ? <hidden> <note tip> (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 </note> </hidden> 4.1.2. What is the accepted language of the previous NFA? <hidden> <note tip> L( (a $\cup$ b)* a (a $\cup$ b) (a $\cup$ b $\cup$ $\varepsilon$) ) </note> </hidden> 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\}$. <hidden> {{:lfa:2022:lfa2022_lab2_ex1_4.png?400|}} </hidden> 4.1.4. Consider the following NFA: {{:lfa:lab02-nfa2.png|}} What are all reachable configurations from $ (0,abbabbb)$? <hidden> {{:lfa:2022:lfa2022_lab4_ex1_4.png?300|}} </hidden> ==== 2. Regex to NFA ===== 4.2.1. What language does $ (1 \cup \varepsilon)(00^*1)^*0^*$ generate? <hidden><note tip> 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" } </note></hidden> 4.2.2. Convert the previous regex to an NFA. <hidden> {{:lfa:2022:lfa2022_lab4_ex2_2_v2.png?600|}} </hidden> ==== 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. <hidden><note tip> E(0) = {0, 2} E(1) = {1, 3} E(2) = {2} E(3) = {1, 3} </note></hidden> 4.3.2. Convert the NFA from exercise 4.1.1 to a DFA. <hidden> {{:lfa:2022:lfa2022_lab4_ex3_2.png?400|}} </hidden> 4.3.3. Convert the NFA from exercise 4.1.4 to a DFA. <hidden> {{:lfa:2022:lfa2022_lab4_ex3_3.png?400|}} Barred transitions go to a sink state. </hidden> 4.3.4. Convert the NFA from exercise 4.2.2 to a DFA. <hidden> {{:lfa:2022:lfa2022_lab4_ex3_4_v2.png?400|}} Barred transitions go to a sink state. </hidden>