Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

( a ) Convert the given regular expression into a context - free grammar. a ( b a ) * * + # a *

(a) Convert the given regular expression into a context-free grammar.
a(ba)**+#a**b
Let ={a,b,#}. Consider the following languages over . Recall that for a string w,|w| denotes the length
of w.
L1={a4i where i0}
L2={b2j where j0}
L3={x#y, where xinL1,yinL2 and |x|=|y|}
Now solve the following problems.
(b) Your Friend writes the following context-free grammars for the language L1. Choose the correct grammar
for L1. There could be more than one correct grammar.
(i)
SASA|
Aaa
(ii)
SAAS|
Aaa|
(iii)
SAAAAS|
Aa
(iv)
SaP|aQ|
PaR
RaQ
QaS
(c) Write down a string of any length in L0.
d) Give a context-free grammar for the language L3.
image text in transcribed

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_2

Step: 3

blur-text-image_3

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

Transactions On Large Scale Data And Knowledge Centered Systems Xxviii Special Issue On Database And Expert Systems Applications Lncs 9940

Authors: Abdelkader Hameurlain ,Josef Kung ,Roland Wagner ,Qimin Chen

1st Edition

3662534541, 978-3662534540

More Books

Students also viewed these Databases questions

Question

5. How would you describe your typical day at work?

Answered: 1 week ago

Question

7. What qualities do you see as necessary for your line of work?

Answered: 1 week ago