Differences
This shows you the differences between two versions of the page.
| lfa:2023:lab04 [2023/10/31 11:46] alexandra.udrescu01 created | lfa:2023:lab04 [2023/11/06 17:09] (current) alexandra.udrescu01 | ||
|---|---|---|---|
| Line 9: | Line 9: | ||
| What are all reachable configurations from (0,abba) ? | What are all reachable configurations from (0,abba) ? | ||
| - | /* | + | |
| <hidden> | <hidden> | ||
| <note tip> | <note tip> | ||
| Line 19: | Line 19: | ||
| </note> | </note> | ||
| </hidden> | </hidden> | ||
| - | */ | + | |
| 4.1.2. What is the accepted language of the previous NFA? | 4.1.2. What is the accepted language of the previous NFA? | ||
| - | /* | + | |
| <hidden> | <hidden> | ||
| <note tip> | <note tip> | ||
| Line 29: | Line 29: | ||
| </note> | </note> | ||
| </hidden> | </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\}$. | 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> | <hidden> | ||
| {{:lfa:2022:lfa2022_lab2_ex1_4.png?400|}} | {{:lfa:2022:lfa2022_lab2_ex1_4.png?400|}} | ||
| </hidden> | </hidden> | ||
| - | */ | + | |
| 4.1.4. Consider the following NFA: | 4.1.4. Consider the following NFA: | ||
| Line 45: | Line 45: | ||
| What are all reachable configurations from $ (0,abbabbb)$? | What are all reachable configurations from $ (0,abbabbb)$? | ||
| - | /* | + | |
| <hidden> | <hidden> | ||
| Line 51: | Line 51: | ||
| </hidden> | </hidden> | ||
| - | */ | + | |
| ==== 2. Regex to NFA ===== | ==== 2. Regex to NFA ===== | ||
| Line 57: | Line 57: | ||
| 4.2.1. What language does $ (1 \cup \varepsilon)(00^*1)^*0^*$ generate? | 4.2.1. What language does $ (1 \cup \varepsilon)(00^*1)^*0^*$ generate? | ||
| - | /* | + | |
| <hidden><note tip> | <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" } | 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> | </note></hidden> | ||
| - | */ | + | |
| 4.2.2. Convert the previous regex to an NFA. | 4.2.2. Convert the previous regex to an NFA. | ||
| - | /* | + | |
| <hidden> | <hidden> | ||
| {{:lfa:2022:lfa2022_lab4_ex2_2_v2.png?600|}} | {{:lfa:2022:lfa2022_lab4_ex2_2_v2.png?600|}} | ||
| </hidden> | </hidden> | ||
| - | */ | + | |
| ==== 3. The subset construction ===== | ==== 3. The subset construction ===== | ||
| Line 75: | Line 75: | ||
| 4.3.1. Write the $ \varepsilon$-closure ($ E(q)$) for each state q in the NFA from exercise 4.1.4. | 4.3.1. Write the $ \varepsilon$-closure ($ E(q)$) for each state q in the NFA from exercise 4.1.4. | ||
| - | /* | + | |
| <hidden><note tip> | <hidden><note tip> | ||
| Line 87: | Line 87: | ||
| </note></hidden> | </note></hidden> | ||
| - | */ | + | |
| 4.3.2. Convert the NFA from exercise 4.1.1 to a DFA. | 4.3.2. Convert the NFA from exercise 4.1.1 to a DFA. | ||
| - | /* | + | |
| <hidden> | <hidden> | ||
| {{:lfa:2022:lfa2022_lab4_ex3_2.png?400|}} | {{:lfa:2022:lfa2022_lab4_ex3_2.png?400|}} | ||
| </hidden> | </hidden> | ||
| - | */ | + | |
| 4.3.3. Convert the NFA from exercise 4.1.4 to a DFA. | 4.3.3. Convert the NFA from exercise 4.1.4 to a DFA. | ||
| - | /* | + | |
| <hidden> | <hidden> | ||
| {{:lfa:2022:lfa2022_lab4_ex3_3.png?400|}} | {{:lfa:2022:lfa2022_lab4_ex3_3.png?400|}} | ||
| Line 105: | Line 105: | ||
| Barred transitions go to a sink state. | Barred transitions go to a sink state. | ||
| </hidden> | </hidden> | ||
| - | */ | + | |
| 4.3.4. Convert the NFA from exercise 4.2.2 to a DFA. | 4.3.4. Convert the NFA from exercise 4.2.2 to a DFA. | ||
| - | /* | + | |
| <hidden> | <hidden> | ||
| {{:lfa:2022:lfa2022_lab4_ex3_4_v2.png?400|}} | {{:lfa:2022:lfa2022_lab4_ex3_4_v2.png?400|}} | ||
| Line 115: | Line 115: | ||
| Barred transitions go to a sink state. | Barred transitions go to a sink state. | ||
| </hidden> | </hidden> | ||
| - | */ | + | |