retagged by
658 views
0 votes
0 votes

retagged by

1 Answer

0 votes
0 votes
CFG1 is ambiguous, CFG2 is unambiguous grammar.

Both Cfgs generate same set. Epsilon is generated with 2 different derivations in cfg1 whereas in cfg1 it generated with one derivation. Remaining all strings have one derivation in both grammars.

Language generated by both cfgs is same.

L(CFG1)=L(CFG2)={a^m b^n | m=2n or n=2m}

Related questions

0 votes
0 votes
2 answers
2
garg div asked Nov 19, 2017
410 views
PLEASE anyone can explain the states step wise Ans is given D
1 votes
1 votes
1 answer
3
2 votes
2 votes
1 answer
4
Kai asked Nov 19, 2016
401 views
Is the following question even valid? Shouldn't there be a production for all variables?