Direction: Consider the CFG with {S, A, B} as the non-terminal alphabet, {a, b} as the terminal alphabet, S as the start symbol and the following set of production rules
-
Which of the following strings is generated by the grammar?
-
- aaaabb
- aabbbb
- aabbab
- abbbba
- aaaabb
Correct Option: C
Let solve out to get the string generated by the grammar.
S → aB
S → aaBB
S → aabB
S → aabbS
S → aabbaB
S → aabbab
We get the string as aabbab.