Reference no: EM132170666
Using JFLAP
Consider the two provided DFAs for the L1 = { all strings with an odd number of a's } and L2 = { all strings with an odd number of b's }. The alphabet SIGMA = { a, b }.
We know that the class of regular languages is CLOSED under intersection, so the language L1 intersect L2 is also regular, and must also have a DFA. Construct the DFA for L1 intersect L2 by complete the following steps.
Create a DFA that accepts ! L1 by toggling all the final and non-final states in M1. Save this DFA in a file called M3.
Create a DFA that accepts ! L2 by toggling all the final and non-final states in M2. Save this DFA in a file called M4.
Create an NDFA that accepts ( ! L1 union ! L2 ) by combining M3 and M4 (select the Menu labeled "Convert" and then select "Combine Automata"). Add a new state (which should be labelled as state q4) and make q4 be the start state. Draw a lambda-arrow from q4 to the start state of M3 and to the start state of M4. Save this NDFA in a file called M5.
Convert M5 into a DFA by using the JFLAP menu option. Click on "Complete" and then on "Done". Save this DFA in a file called M6.
How many states are in the DFA M6?
Now minimize the DFA M6. Click on the "Convert" menu and select "Minimize DFA". Click on the root of the tree that appears to the right, and then click on "Complete Subtree". Click on "Finish". Click on "Complete" and then "Done". Save this minimized DFA in a file called M7
How many states are in M7?
You can complete the construction of the DFA for L1 intersect L2 by toggling all the final and non-final states in M7.