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
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