The context free grammar S → aSb | bSa | ε generates:

1
Equal number of a’s and b’s
2
Unequal number of a’s and b’s
3
Any number of a’s followed by any number of b’s
4
Any number of b’s followed by any number of a’s

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation