Question: 2. Given the following regular expression over the alphabet fa, b), a (a* + b)b aa* to transform it to a regular grammar, we first



2. Given the following regular expression over the alphabet fa, b), a (a* + b)b aa* to transform it to a regular grammar, we first transform it to an NFA as the one shown below 0 2 Instead of converting this NFA to a regular grammar directly, we convert it a DFA first and then convert the DFA to a regular grammar (why?) So we construct/closures of the above NFA Then convert the table representation to a digraph representation as follows: (3.5 points) However, we don't need the portion circled in the above digraph representation of the DFA (why?). By removing that portion, the DFA is like the one shown on the left side of the following figure. By constructing production rules from this FA, we get the production set of the regular grammar on the right side of the above figure. (4.5 points) The above FA can be further simplified to be of the form shown on the left side of the following figure. (2.5 points) By constructing production rules from this FA, we get the production set on the right side of the above figure (3.5 points). This is the production set of the regular grammar for the regular expression a"(a" + b)b"aa"-a"b"a
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
