GATE | Sudo GATE 2020 Mock II (10 January 2019) | Question 34

Given the grammar (G),

S → abc/ aAbc,
Ab →bA,
AC →Bbcc,
bB →Bb,
aB →aa/ aaA 

Language produced by the above grammar is ?
(A) L = {anbncn: n≥0}
(B) L = {anbncn: n>0}
(C) L = {anbncn+2: n≥0}
(D) L = {anbncn+2: n>0}

Answer: (B)

Explanation: Clearly it is anbncn, the condition for n can be checked from stopper or minimum string, since ε is not possible here and minimum string is abc therefore n>0

Option (B) is correct.

Quiz of this Question

My Personal Notes arrow_drop_up
Article Tags :

Be the First to upvote.

Please write to us at to report any issue with the above content.