Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
lfa:2023:lab05 [2023/11/06 17:10] alexandra.udrescu01 |
lfa:2023:lab05 [2023/11/11 12:29] (current) alexandra.udrescu01 |
||
---|---|---|---|
Line 12: | Line 12: | ||
5.1.1. Identify a pair of states which are **indistinguishable**. (Solve the exercise for the 2 given DFAs.) | 5.1.1. Identify a pair of states which are **indistinguishable**. (Solve the exercise for the 2 given DFAs.) | ||
- | /* | + | |
<hidden DFA 1> | <hidden DFA 1> | ||
<note tip> | <note tip> | ||
Line 32: | Line 32: | ||
</note> | </note> | ||
</hidden> | </hidden> | ||
- | */ | + | |
5.1.2. Identify a pair of final or non-final states which are **distinguishable**. The pair must be distinguished by a word different from the empty word. (Solve the exercise for the 2 given DFAs.) | 5.1.2. Identify a pair of final or non-final states which are **distinguishable**. The pair must be distinguished by a word different from the empty word. (Solve the exercise for the 2 given DFAs.) | ||
- | /* | + | |
<hidden DFA 1> | <hidden DFA 1> | ||
<note tip>** DFA 1** | <note tip>** DFA 1** | ||
Line 49: | Line 49: | ||
</hidden> | </hidden> | ||
- | */ | + | |
5.1.3. Compute the table of indistinguishable states for the DFA. (Solve the exercise for the 2 given DFAs.) | 5.1.3. Compute the table of indistinguishable states for the DFA. (Solve the exercise for the 2 given DFAs.) | ||
- | /* | + | |
<hidden DFA 1><note tip> | <hidden DFA 1><note tip> | ||
** DFA 1 ** | ** DFA 1 ** | ||
Line 199: | Line 200: | ||
</note> | </note> | ||
</hidden> | </hidden> | ||
- | */ | + | |
===== 5.2. Minimisation ====== | ===== 5.2. Minimisation ====== | ||
Line 205: | Line 206: | ||
5.2.1. Minimise the DFA. (Solve the exercise for the 2 given DFAs.) | 5.2.1. Minimise the DFA. (Solve the exercise for the 2 given DFAs.) | ||
- | /* | + | |
<hidden DFA 1> | <hidden DFA 1> | ||
** DFA 1 ** | ** DFA 1 ** | ||
Line 217: | Line 218: | ||
{{ :lfa:2022:lfa2022_lab5_dfa2_min.png?400 |}} | {{ :lfa:2022:lfa2022_lab5_dfa2_min.png?400 |}} | ||
</hidden> | </hidden> | ||
- | */ | + | |
5.2.2. How can we algorithmically determine if two minimal DFAs accept the same language? | 5.2.2. How can we algorithmically determine if two minimal DFAs accept the same language? | ||
- | /* | + | |
<hidden><note tip> | <hidden><note tip> | ||
Line 233: | Line 234: | ||
</note></hidden> | </note></hidden> | ||
- | */ | + | |
5.2.3. Determine if the following regexes are **equivalent**: $math[(1\cup\epsilon)(00^*1)^*0^*] and $math[(10\cup 0)^*(01 \cup 1)^*(0 \cup \epsilon)] | 5.2.3. Determine if the following regexes are **equivalent**: $math[(1\cup\epsilon)(00^*1)^*0^*] and $math[(10\cup 0)^*(01 \cup 1)^*(0 \cup \epsilon)] | ||
- | /* | + | |
<hidden> | <hidden> | ||
<note tip>The two languages are not equivalent because of word "110" which is accepted by the second regex, but rejected by the first regex.</note> | <note tip>The two languages are not equivalent because of word "110" which is accepted by the second regex, but rejected by the first regex.</note> | ||
</hidden> | </hidden> | ||
- | */ | + | |
5.2.4. Remember exercise 3.3.4 from Lab3. Show that the two regexes are equivalent: $ E1 = ((ab^*a)^+b)^* $ and $ E2 = (a(b\mid aa)^*ab)^* $ | 5.2.4. Remember exercise 3.3.4 from Lab3. Show that the two regexes are equivalent: $ E1 = ((ab^*a)^+b)^* $ and $ E2 = (a(b\mid aa)^*ab)^* $ | ||
- | /* | + | |
<hidden> | <hidden> | ||
<note tip> | <note tip> | ||
Line 337: | Line 338: | ||
</note></hidden> | </note></hidden> | ||
- | */ | + | |
Line 346: | Line 347: | ||
<note important>Brzozowski minimisation: **minDfa(A) = toDfa(reverse(toDfa(reverse(A))))**</note> | <note important>Brzozowski minimisation: **minDfa(A) = toDfa(reverse(toDfa(reverse(A))))**</note> | ||
- | /* | + | |
<hidden> | <hidden> | ||
<note tip> | <note tip> | ||
Line 385: | Line 386: | ||
</hidden> | </hidden> | ||
- | */ | + | |
===== Conclusion ===== | ===== Conclusion ===== |