Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

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 build the following tree, (3 points) A(0,-(0, 1 ,2} {3} and use distinct nodes of this tree (distinct nodes of the tree are identified level by level and, within each level, from left to right), (1 points) to build a transition table, and rename the states as S (start state), I, J, K and L: points) (4 S (0.1.2 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database 101

Authors: Guy Kawasaki

1st Edition

0938151525, 978-0938151524

More Books

Students also viewed these Databases questions

Question

5. Describe the relationship between history and identity.

Answered: 1 week ago