The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+18 votes
1.7k views

Which one of the following problems is undecidable?

  1. Deciding if a given context-free grammar is ambiguous.
  2. Deciding if a given string is generated by a given context-free grammar.
  3. Deciding if the language generated by a given context-free grammar is empty.
  4. Deciding if the language generated by a given context-free grammar is finite.
asked in Theory of Computation by Veteran (106k points)
retagged by | 1.7k views

3 Answers

+21 votes
Best answer

(A) is the answer. Proving (A) is undecidable is not so easy. But we can easily prove the other three options given here are decidable.

https://gatecse.in/grammar-decidable-and-undecidable-problems/

answered by Veteran (363k points)
edited by
0
@Arjun sir option A is undecidable but option D is saying Is CFG closed under finite(Regular Grammar) is it Decidable, please explaine.
0
If A were decidable, then the PCP problem would have been decidable implying that PCP problem is reducible to finding whether a given context-free grammar is ambiguous. Hence undecidable.
0
PCP -> post correspondence problem  ??
0
yes.
+3 votes

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.

answered by Loyal (8.6k points)
–1 vote
A.

CFG is not closed under ambiguity.
answered by Boss (19.7k points)
+12
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, CFG generates a CFL and set of all CFLs is the set. But ambiguity is not an operation and hence you can never say "closed" here.
0

Sir what's the difference between option c) of this question and "G is a CFG. Is L(G)=ϕ?"(which is undecidable as per Rice's Theorem https://gateoverflow.in/1553/gate2013_41).

0
Both are same and both are decidable.
0
but it's proven undecidable in the link I provided. I think "G is a CFG" means it's for any CFG so property becomes non-trivial but here it says "by a given CFG" so here we can see the specific CFG's productions & decide. @Arjun sir is it the reason?
0
where undecidable is given in link can you tell the name of person who write
0
by "Kai". It's not the best answer but I'm not getting why it's wrong.

"Since the Language is (<G>| G is a CFG and L(G) is empty). We can find one TM which accepts an empty string and one which doesn't. Then by Rice's theorem, this property is non trivial and thus undecidable for Recursively Enumerable languages which involve CFLs."
0

#Pcs See it ... Its a trivial property i think ... We jst need to care abt the terminals to  get the result ...

http://www3.cs.stonybrook.edu/~cse350/slides/decide2.pdf

Answer:

Related questions



Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

42,599 questions
48,599 answers
155,652 comments
63,718 users