Consider the following grammars:

G1 : S → aSb|bSa|aa

G2 : S → aSb|bSa|SS|λ

G3 : S → aSb|bSa|SS|a

G4 : S → aSb|bSa|SS|SSS|λ

Which of the following is correct w.r.t. the above grammars?

1
G1 and G3 are equivalent
2
G2 and G3 are equivalent
3
G2 and G4 are equivalent
4
G3 and G4 are equivalent

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation