1.

Let L denotes the language generated by the grammar S – OSO/00. Which of the following is true?(a) L = O(b) L is regular but not O(c) L is context free but not regular(d) L is not context freeThis question was addressed to me in an interview for internship.Asked question is from Finite Automata and Regular Expressions in division Compiler Introduction of Compiler

Answer»

The correct answer is (b) L is regular but not O

Easiest EXPLANATION: The grammar itself is not regular but LANGUAGE L is regular as L can be REPRESENTED USING a regular grammar, for example S -> S00/00.



Discussion

No Comment Found

Related InterviewSolutions