edited by
4,846 views
21 votes
21 votes

Which of the following problems is decidable? (Here, CFG means context free grammar and CFL means context free language.)

  1. Given a CFG $G$, find whether $L(G) = R$, where $R$ is regular set.
  2. Given a CFG $G$, find whether $L(G) = \{\}$.
  3. Find whether the intersection of two CFLs is empty.
  4. Find whether the complement of CFL is a CFL.
  5. Find whether CFG $G_1$ and CFG $G_2$ generate the same language, i.e, $L\left (G_1 \right ) = L\left (G_2 \right)$.
edited by

3 Answers

Best answer
19 votes
19 votes
  1. We don't have any standard algorithm to change $CFG$ into $CFL$ 
    from a given $CFG$ deciding a language is finite is decidable but regular its undecidable (Ref: http://gatecse.in/wiki/Grammar:_Decidable_and_Undecidable_Problems)  
  2. From a given given CFG we can determine the $CFL$ and $CFL$ emptiness is Decidable.
  3. Intersection of two CFL is undecidable coz it is not closed under intersection.
  4. $CFL$ is not closed under Complement so its undecidable.
  5. $CFL$ is not closed under equivalence so it is undecidable to compare $2$ language.

Therefore, B is decidable and A,C,D and E are undecidable.

edited by
1 votes
1 votes
Ans : B

By decision property of cfg

1.does L(G) is empty (Decidable)

2.does L(G) is finite(Decidable)

3.does L(G) is regular(Undecidable)

4.does w belong L(G) is or not (Decidable)

5.does G is Ambigeous(Undecidable)

6.equality of cfg is Undecidable

7.compliment of cfl is undecidable

8.intersection of two cfl is undecidable

9.sigma star is also decidable
0 votes
0 votes
There is no algorithm exist by which we can convert CFL to Regular language so Option A undecidable problem.

Emptiness problem is only problem which is decidable under CFL.

Intersetion and complementation are not closed under CFL so it is undecidable problem.

Equality problem L1==L2 is also undecidable problem.
Answer:

Related questions

21 votes
21 votes
3 answers
3
makhdoom ghaya asked Oct 10, 2015
2,627 views
Let $r, s, t$ be regular expressions. Which of the following identities is correct?$(r + s)^* = r^*s^*$$r(s + t) = rs + t$$(r + s)^* = r^* + s^*$$(rs + r)^* r = r (sr + r...