in Theory of Computation edited by
10,912 views
43 votes
43 votes

Which of the following are decidable?

  1. Whether the intersection of two regular languages is infinite
  2. Whether a given context-free language is regular
  3. Whether two push-down automata accept the same language
  4. Whether a given grammar is context-free
  1. I and II
  2. I and IV
  3. II and III
  4. II and IV
in Theory of Computation edited by
10.9k views

4 Comments

It is membership problem and if u check  the decidability table ,it is clearly seen that the context free languages are decidable when it comes to membership problems!
0
0
Whether a given grammar is a context free reduces to membership problem.

So membership of context free grammar is decidable.
0
0

Know the CORRECT Reasoning of Option 4th. Watch the following Detailed Video Solution:

Detailed Video Solution, With Correct Reasoning of 4th Statement

0
0

3 Answers

45 votes
45 votes
Best answer

Lets see options one by one :

  1. The language here will be regular as intersection of regular languages will lead to regular language only. And we know that given a regular language, whether it is finite or not is a decidable problem. This can be seen by observing the DFA -- if DFA contains a state which contains a loop and that state is reachable from the start state and that state is either a final state or leading to final state, then the language will be infinite.
     
  2. The regularity property is undecidable for context free languages. Hence, it is undecidable. Details regarding this : https://cs.stackexchange.com/questions/19482/why-is-deciding-regularity-of-a-context-free-language-undecidable
     
  3. Now equivalence of two CFLs is also an undecidable property. Hence, given $2$ PDAs which is nothing but characterizing CFLs, whether the $2$ CFLs will be same or not cannot be decided.
     
  4. Given a grammar, it is context free iff its productions are of the type $V \to ( V  \cup  \Sigma )^*$ which can be verified with a Turing machine. Hence, it is a decidable property..

Hence, (B) should be correct answer.

edited by

2 Comments

"This can be seen by observing the DFA..If DFA contains a state which contains a loop" there should be a mechanical solution to this problem. we have eyes so we can know that there is a loop in DFA but how a m/c will recognize it?
0
0
0
0
24 votes
24 votes
(1) Intersection of two regular languages is regular. And checking if a regular language is infinite is decidable.

(2) Undecidable

(3) Undecidable

(4) Decidable as we just have to check if the grammar obeys the rules of CFG. (Obviously undecidable had it been language instead of grammar)

Reference: http://gatecse.in/wiki/Grammar:_Decidable_and_Undecidable_Problems

4 Comments

edited by
whether a grammar is context-free or not we can determine it by checking for CFG property on the grammar, not by CYK algorithm. The CYK algorithm is used to check whether a given string could be generated by a CFG grammar or not. and YES if it were language instead of grammar that is undecidable.
2
2

@Nitesh Singh 2 @gatecse, 

I can understand, we can check a Grammar is CFG or not.

But, I can’t understand, why is it mentioned,

Obviously undecidable had it been language instead of grammar

 

1
1
same doubt as Mohank
0
0
1 vote
1 vote

Answer – B ( 1st and 4th )

as we know, every thing is decidable for regular languages.

and for CFL only 3 thing are decidable.

1st) Membership Problems ( Whether the given rammer is CFL )

2nd ) Emptiness problem ( The given language is empty or not)

3rd ) Finitness Problem( Means the given language is finte or not).  

Answer:

Related questions