Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You have the following two tokens ( t 1 and t 2 ) and their corresponding regular expressions. Token : regular expression t 1 :
You have the following two tokens t and t and their corresponding regular expressions.
Token : regular expression
t : a b
t : a b a
In the above, a b is the set of alphabets, represents Kleene closure, and t has higher precedence than t
Problem points
Convert two regular expressions for t and t into twin NFAs through the following two steps:
Build their own parse trees, and
Convert the parse trees into NFA using the McNaughtonYamadaThompson algorithm.
The NFA you construct must be precisely produced by the McNaughtonYamadaThompson algorithm you should not omit any states or etransitions no matter how unnecessary they may seem especially for Kleene closure and union
Problem points
Add a new state, and merge the two NFAs to share the same "start" state, like the right figure that merges two regular expressions a and abb. Then, convert your NEA to DFA using the algorithm discussed in class. Draw your transition table or DFA diagram, and show your work to get full points
In your transition table, if you cannot define a transition state since it becomes an empty set a dead state mark in as In your DFA diagram, you do not need to draw dead states.
After determining DFA, mark the final states using double circles, and identify their accepting tokens.
Problem points
Minimize your DFA by performing the following steps:
Add a dead state into your DFA you can omit this step of adding the dead state;
Minimize its states using the Moore's algorithm discussed in class;
Delete the dead state from your minimized DEA;
Draw its final minimized diagram.
You can minimize DFA using Moore's algorithm without explicitly introducing dead states in step
After determining minimized DFA, mark the final states using double circles, and identify their corresponding accepting tokens.
Note that the final states also can be split based on the accepting tokens.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started