edited by
21,664 views
59 59 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

3 Answers

Best answer
64 64 votes

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
29 29 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 4 votes

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:
Position:
Show:

Related questions

74 74 votes
4 answers 4 answers
35.3k
35.3k views
Kathleen asked Sep 12, 2014
35,349 views
Which of the following are NOT true in a pipelined processor?Bypassing can handle all RAW hazardsRegister renaming can eliminate all register carried WAR hazardsControl h...
34 34 votes
5 answers 5 answers
13.1k
13.1k views
Kathleen asked Sep 12, 2014
13,126 views
Which of the following statements is false?Every NFA can be converted to an equivalent DFAEvery non-deterministic Turing machine can be converted to an equivalent determi...
40 40 votes
6 answers 6 answers
17.5k
17.5k views
Kathleen asked Sep 11, 2014
17,477 views
If $L$ and $\overline{L}$ are recursively enumerable then $L$ isregularcontext-freecontext-sensitiverecursive
38 38 votes
4 answers 4 answers
14.0k
14.0k views
Kathleen asked Sep 11, 2014
13,997 views
Which of the following is true for the language$$\left\{ a^p \mid p \text{ is a prime } \right \}?$$It is not accepted by a Turing MachineIt is regular but not context-fr...