Engineering & Science
GATE Computer Science
GATE Computer Science Context-free grammars practice questions and solutions
7 questions on Context-free grammars, part of Context-Free Languages in the GATE CS Theory of Computation syllabus. Every question has a worked solution and an explanation of why each wrong option fails. Open a question to attempt it and see the answer.
- Questions
- 7 questions
- Easy
- 5 easy
- Medium
- 2 medium
Questions
- 1The language L = {a^nb^n : n ≥ 0} isEasy
- 2Which language is generated by the grammar S → aSb | ε?Easy
- 3The grammar E → E + E | E * E | id isEasy
- 4Which of the following languages is NOT context-free?Easy
- 5A grammar is in Chomsky Normal Form. How many production applications does a derivation of a string of length…Medium
- 6Which of the following languages is regular?Easy
- 7Context-free languages are NOT closed under which operation?Medium
Practise all GATE CS Theory of Computation questions with filters