Let L denotes the language generated by the grammar S 0S000 Which of the following is true GATE CSE 2000

The Eduladder is a community of students, teachers, and programmers just interested to make you pass any exams. So we solve previous year question papers for you.
See Our team
Wondering how we keep quality?
Got unsolved questions?

gate-cse-2000-->View question

## Let L denotes the language generated by the grammar S -> 0S0/00. Which of the following is true? GATE CSE 2000

A=L = 0+
B=L is regular but not 0+
C=L is context free but not regular
D=L is not context free

By:milan-ransingh

Taged users:

Likes:
Be first to like this question

Dislikes:
Be first to dislike this question

answer: (B) Option A : L is not 0+ , because 0+ will contain any arbitrary string over alphabet 0 with any no of 0’s ( except empty string ), for ex: {0, 00, 000,00000}, but L will only have the strings as { 00, 0000, 000000,…}, i.e only even no of 0’s ( excluding empty string}. Option D : L is a Context Free Language, because the Grammar G which generates the language L is Context Free Grammar. A Grammar G is CFG if all of its productions are of the form A->α, where A is a single non-terminal and α belongs to (V∪ T)* , i.e α can be a string of terminals and/or Non-terminals. (V represents a non-terminal and T represents a terminal) Option C : L is a Regular Language, Because we are able to write a regular expression for it ( and also able to make a Finite Automaton), which is (00)+. DFA (00)+ (1) Option B : Hence This option is Correct, because L is Regular but not 0+, as we proved above.
prajwalamv

Likes:
Be first to like this answer

Dislikes:
Be first to dislike this answer