edited by
514 views
0 votes
0 votes
G1: S-→ aSa| bSb|e

G2:S--→ aaS|bbS| e

the shortest length strings which does not belongs to L(g1) but belongs to L(G2) is
edited by

1 Answer

0 votes
0 votes

G1 generates L(G1) = { w e w^r | w Є (a,b) and w^r = reverse of w }

G2 generates L(G2) = {  we | w Є (aa + bb)*  }

-----------------------------------------------------------------------------------------------------

now

1st smallest string generated by L(G2) is e which  belongs to L(G1)

2nd smallest string should be aae or bbe which belongs to L(G2)  and this does not belongs to L(G1).

  Answer = length 3 (aae or bbe)

Related questions

0 votes
0 votes
2 answers
1
suneetha asked Dec 22, 2018
326 views
i thought that it is the language where both start and end symbols are same and i got 65 but the ans is 29
0 votes
0 votes
1 answer
2
1 votes
1 votes
0 answers
3
0 votes
0 votes
1 answer
4
ARUN KUMAR 3 asked Oct 12, 2016
531 views
If a parse tree is made for a w ε L(G), when G is in Chomsky-Normal form then what would be it's least height?? Plz explain what and how...