Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| 
                    lfa:2022:lab05-mindfa [2022/11/07 01:36] mihai.calitescu duplicate states  | 
                
                    lfa:2022:lab05-mindfa [2022/11/12 20:49] (current) alexandra.udrescu01  | 
            ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| Consider the following DFAs: | Consider the following DFAs: | ||
| - | **DFA 1**: {{ :lfa:2022:lfa2022_lab5_ex2_4_cerinta.png?350 |}} | + | ^ **DFA 1** ^ **DFA 2** ^ | 
| - | + | |{{ :lfa:2022:lfa2022_lab5_ex2_4_cerinta.png?350 |}} | {{ :lfa:screenshot_2021-11-03_at_11.25.00.png?400 |}} | | |
| - | **DFA 2**: {{ :lfa:screenshot_2021-11-03_at_11.25.00.png?400 |}} | + | |
| <note important>The first DFA is the solution to exercise 4.3.4 from Lab4.</note> | <note important>The first DFA is the solution to exercise 4.3.4 from Lab4.</note> | ||
| Line 13: | 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> | ||
| Line 35: | Line 33: | ||
| </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> | ||
| Line 53: | 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> | ||
| Line 206: | Line 200: | ||
| </hidden> | </hidden> | ||
| - | */ | ||
| ===== 5.2. Minimisation ====== | ===== 5.2. Minimisation ====== | ||
| Line 212: | Line 205: | ||
| 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> | ||
| Line 226: | Line 218: | ||
| </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 243: | Line 233: | ||
| </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> | ||
| Line 253: | Line 241: | ||
| </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> | ||
| Line 348: | Line 334: | ||
| </note></hidden> | </note></hidden> | ||
| - | |||
| Line 357: | Line 342: | ||
| <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> | ||
| Line 398: | Line 382: | ||
| </hidden> | </hidden> | ||
| - | */ | ||
| ===== Conclusion ===== | ===== Conclusion ===== | ||
| Line 409: | Line 392: | ||
| * DFA -> minDfa | * DFA -> minDfa | ||
| - | **We advise you to include minDfa conversion in your project.** | + | **To get a better performance, include minDfa conversion in your project.** | 
| </note> | </note> | ||