UGC-NET | UGC NET CS 2015 Dec – III | Question 26

The context free grammar given by
X → aX|bX|λ
Y → bbb
generates the language which is defined by regular expression:

(A) (a + b)*bbb
(B) abbb(a + b)*
(C) (a + b)*(bbb)(a + b)*
(D) (a + b)(bbb)(a + b)*

Answer: (C)

Explanation: S → XYX
X → aX|bX|λ
i.e. (a + b)*
Y → bbb
S → (a + b)*(bbb)(a + b)*
So, option (C) 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.