Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
lfa:lab06-closure-properties [2022/11/17 19:15] pdmatei |
lfa:lab06-closure-properties [2022/11/17 19:16] (current) pdmatei |
||
---|---|---|---|
Line 4: | Line 4: | ||
<hidden> All strategies require building DFAs from the regexes. | <hidden> All strategies require building DFAs from the regexes. | ||
- | + | - You can use an existing minimisation algorithm to find the minimal DFAs. Then, label each state from each DFA from 0 to |K|. Fix an ordering of the symbols of the alphabet. Sort the transitions by symbol. Make a textual representation of each DFA which includes the number of states and the sorted transition function. If the textual representations of the two DFAs are identical then they accept the same language. | |
- | + | - Use the indistinguishability algorithm to check if the two initial states of the two DFAs are indistinguishable. | |
- | 1. You can use an existing minimisation algorithm to find the minimal DFAs. Then, label each state from each DFA from 0 to |K|. Fix an ordering of the symbols of the alphabet. Sort the transitions by symbol. Make a textual representation of each DFA which includes the number of states and the sorted transition function. If the textual representations of the two DFAs are identical then they accept the same language. | + | - Check $math[L(A_1) \subseteq L(A_2)] and $math[L(A_2) \subseteq L(A_1)]. The condition $math[L(A) \subseteq L(B)] can be restated as $math[L(A) \cap complement(L(B)) = \emptyset]. Build the complement DFA for B, and use the product construction with A. Check if the resulting DFA has any final state accessible from the initial one. |
- | + | ||
- | + | ||
- | 2. Use the indistinguishability algorithm to check if the two initial states of the two DFAs are indistinguishable. | + | |
- | + | ||
- | + | ||
- | 3. Check $math[L(A_1) \subseteq L(A_2)] and $math[L(A_2) \subseteq L(A_1)]. The condition $math[L(A) \subseteq L(B)] can be restated as $math[L(A) \cap complement(L(B)) = \emptyset]. Build the complement DFA for B, and use the product construction with A. Check if the resulting DFA has any final state accessible from the initial one. | + | |
</hidden> | </hidden> | ||