Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

GATE | GATE-CS-2016 (Set 1) | Question 52

  • Last Updated : 01 Oct, 2021

Consider the following context-free grammars:

gt8

Attention reader! Don’t stop learning now.  Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.

Learn all GATE CS concepts with Free Live Classes on our youtube channel.

Which one of the following pairs of languages is generated by G1 and G2, respectively



gt9
(A) A
(B) B
(C) C
(D) D


Answer: (D)

Explanation: In G1, there will be atleast 1 b becase S->B and B->b. But no of A’s can be 0 as well and no of A and B are independent.

In G2, either we can take S->aA or S->bB. So it must have atleast 1 a or 1 b.

So option D is correct.



Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!