526 views

1 Answer

0 votes
0 votes

in the grammar G2,U is not directly derive terminal string.it is dependent on M.

so elemenate the unit productions in G2,the grammar is

S->iEtM |iEtMeU|a|iEtM

E->b

so no M productions and U productions and replace M and U by S.

S->iEtS | iEtSeS |a|

E->b

it looks like grammar G1.

Related questions

0 votes
0 votes
1 answer
1
set2018 asked Dec 10, 2017
460 views
Which of the following language generated by given grammar?1) L = {w : na(w) and nb(w) both are even}2) L = {w : na(w) and nb(w) both are odd}3) L = {w : na(w) or nb(w) a...
2 votes
2 votes
2 answers
2
Rajesh R asked Oct 24, 2017
433 views
$S - AB$$A - aA / epsilon$$B ->aBb / epsilon$What is the class of language generated by the above grammar ?
1 votes
1 votes
0 answers
3
Xylene asked Sep 2, 2017
258 views
S - AS / bA - SA / a
0 votes
0 votes
1 answer
4
Ashwani Kumar 2 asked May 7, 2016
595 views
S- +SS | -SS | aGive explanation?