in Theory of Computation edited by
568 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
in Theory of Computation edited by
568 views

4 Comments

e is epsilon
0
0

i think its terminal . plzz next time write full : )

then i think  is correct

0
0
It should be aabb and length =4
0
0

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)

1 comment

i have assumed e as a terminal not epsilon
0
0