GATE / CS ARCHIVE

GATE CSE 2008 / QUESTION 10

Decidability questions about automata and grammar

Theory of Computation · Decidability & Computability · Full GATE CSE 2008 paper

GATE 2008, Q10 1 mark · MCQ
Report issue

Decidability & Computability

Question 10, GATE 2008: Which are decidable? I: whether the intersection of two regular languages is infinite. II: whether a given context-free language is regular. III: whether two pushdown automata accept the same language. IV: whether a given grammar is context-free.

(A) I and II
(B) I and IV
(C) II and III
(D) II and IV
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

1. For I, construct a product DFA for the intersection and test whether a reachable cycle can reach an accepting state; this decides infinitude. IV is a syntactic check of the grammar’s productions: every left side must be a single nonterminal.
2. Regularity of an arbitrary CFL and equivalence of arbitrary nondeterministic PDAs are undecidable. Thus I and IV, B.
3. IV asks whether the presented grammar is context-free in form, not whether an arbitrary grammar’s language happens to be a CFL.

Original paper, page 3