What string cannot be derived from the below given grammar? S →

What string cannot be derived from the below given grammar?

S →
|

What string cannot be derived from the below given grammar?

S → aAbc/abc

Ab → bA

Ac → Bbcc

bB → Bb

aB → aa/aaA

A. aaaaaaabbbbbbbccccccc

B. aaaabbbccc

C. aaaaaabbbbbbcccccc

D. aaaabbbbcccc

Please scroll down to see the correct answer and solution guide.

Right Answer is: B

SOLUTION

The language generated by the given grammar is L = anbncn where n ≥ 1.

Option 2: aaaabbbccc → 4 a’s, 3 b’s and 3 c’s it cannot be generated by the given grammar:

It should have been aaabbbccc or aaaabbbbcccc