Related Articles

Related Articles

GATE | GATE-CS-2014-(Set-3) | Question 45
  • Difficulty Level : Easy
  • Last Updated : 18 Apr, 2014

Which of the following problems is undecidable?
(A) Deciding if a given context-free grammar is ambiguous.
(B) Deciding if a given string is generated by a given context-free grammar.
(C) Deciding if the language generated by a given context-free grammar is empty.
(D) Deciding if the language generated by a given context-free grammar is finite.


Answer: (A)

Explanation: Context free grammar is not closed under ambiguity.A set is closed under an operation means when we operate an element of that set with that operator we get an element from that set.
Here, context free grammar generates a context free language and set of all context free languages is also a set. But, ambiguity is not an operation and hence we can never say that CFG is closed under ambiguity.

Thus, problem mentioned in option (A) is undecidable.

Please comment below if you find anything wrong in the above post.

Quiz of this Question

sudo-gate-course

My Personal Notes arrow_drop_up
Recommended Articles
Page :