Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please create an original answer and sequentially fill in all red blanks in the question. All information needed to solve is provided. If you have
Please create an original answer and sequentially fill in all red blanks in the question. All information needed to solve is provided. If you have any questions please ask.
1.
Given the following regular expression over the alphabet {a,b}, (ba)(a+b) to transform it to a regular grammar, we first transform it to an NFA as the one shown below. Instead of converting this NFA to a regular grammar directly, we convert it to a DFA first and then convert the DFA to a regular grammar (why?). So we construct -closures of the above NFA, (0)={0,1,3}(1)={1,3}(2)={2}(3)={3}(4)={4}()= and build the following tree, ( 3 points) so that the following nodes of the tree can be used to build a DFA. Fill out the following blanks and blanks in the above tree. {0,1,3} (0.75 points) With the selected nodes from the above tree, we build a DFA by constructing the following transition table (the table on the left), and renaming the states as S (start state), I, J, K and L: (3.25 points) Then convert the table representation to a digraph representation as follows. Fill out the blanks in the following digraph. (1.25 points) However, we don't need the portion circled in the above digraph representation of the DFA (why?). By removing that portion, the FA is like the one shown on the left side of the following figure (no points for this FA). By constructing production rules from this FA, we get the production set of the regular grammar on the right side of the above figure. Fill out the blanks in the above figure. (1.75 points for the production set) Regular expression of the above FA is 2 points) which is equal to the given regular expression (ba)(a+b).(Why ?)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