Question: 1) Determine L 1 U L 2 , L 1 L 2 , L 1 *, and L 2 *, where L 1 = {a

1) Determine L1 U L2, L1 L2, L1*, and L2*, where L1= {am bn | m, n > 0} and L2= {an bn | n > 0}.

2) Give a regular grammar that generates the strings over (a, b, c} in which the as precede the bs, which in turn precede the cs. It is possible that there are no as, bs, or cs.

3) Consider the grammar G with production rules

S BSA | A

A aA |

B Bba I

Construction an equivalent essentially non-contracting grammar, i.e. there are no production rules of the form V , except S if in L(G)) and with a non-recursive start symbol. Hint: see section 4.2 and the examples.

4) Give a regular expression for the language L(G) where G is the grammar is question 3.

Need solutions for above problems: #1, #2, #3, and #4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!