GATE / CS ARCHIVE

GATE CSE 2021 SET 1 / QUESTION 12

GATE CSE 2021 Set 1 Q12

Theory of Computation · Decidability & Computability · Full GATE CSE 2021 Set 1 paper

GATE 2021 Set 1, Q12 1 mark · MSQ
Report issue

Decidability & Computability

Question 12, GATE 2021: For Σ={0,1} and automaton encoding ⟨M⟩, select the languages that are NOT recursive. A {⟨M⟩: M is a DFA and L(M)=∅}; B {⟨M⟩: M is a DFA and L(M)=Σ*}; C {⟨M⟩: M is a PDA and L(M)=∅}; D {⟨M⟩: M is a PDA and L(M)=Σ*}.
Tap to enlarge
Select all that apply
Answer & solution

Official answer: D

DFA emptiness is decidable by reachability of an accepting state. DFA universality is decidable by complementing the complete DFA and checking emptiness. PDA emptiness is decidable, for example by converting to a CFG and marking productive nonterminals. Universality of a general nondeterministic PDA/CFG is undecidable, so only D is not recursive.

A recursive language has an algorithm that halts on both yes and no instances. For DFA universality, first ensure the transition function is total by adding a sink if necessary, then invert final/nonfinal states and run a finite reachability test. PDA emptiness asks whether some derivation produces a terminal string, which productive-variable marking decides. PDA universality is a known undecidable CFG universality problem; enumerating accepted strings cannot certify that no unaccepted string exists.

Original paper, page 17 · Answer key