GateAI
Turing Machines and Undecidability

GATE CSE 2021 Set 1 · Q12

MSQ1 markMedium

Time

Let ⟨M⟩\langle M \rangle denote an encoding of an automaton MM. Suppose that Σ={0,1}\Sigma = \{0, 1\}. Which of the following languages is/are NOT recursive?

Select all that applyOne or more correct

Pick every correct option

Solution

Step-by-step verified solution

Official answer: D) L = { M M is a PDA such that L(M) = *}

Turing Machines and Undecidability

A language is recursive if there exists a halting Turing machine (decider) that decides membership in the language.

  • (A) L={⟨M⟩∣M is a DFA such that L(M)=∅}L = \{\langle M \rangle \mid M \text{ is a DFA such that } L(M) = \emptyset\}: Decidable/Recursive. The emptiness problem for DFAs (EDFAE_{\text{DFA}}) can be decided by graph reachability algorithms (BFS/DFS) to check if any accept state is reachable from the start state.

  • **(B) L={⟨M⟩∣M is a DFA such that L(M)=Σ∗}L = \{\langle M \rangle \mid M \text{ is a DFA such that } L(M) = \Sigma^*\}:** Decidable/Recursive. Since DFAs are closed under complementation, we can construct M‾\overline{M} such that L(M‾)=Σ∗∖L(M)L(\overline{M}) = \Sigma^* \setminus L(M) and then check if L(M‾)=∅L(\overline{M}) = \emptyset.

  • (C) L={⟨M⟩∣M is a PDA such that L(M)=∅}L = \{\langle M \rangle \mid M \text{ is a PDA such that } L(M) = \emptyset\}: Decidable/Recursive. The emptiness problem for CFLs/PDAs (ECFGE_{\text{CFG}}) is decidable by checking whether the start variable can derive any terminal string.

  • **(D) L={⟨M⟩∣M is a PDA such that L(M)=Σ∗}L = \{\langle M \rangle \mid M \text{ is a PDA such that } L(M) = \Sigma^*\}:** Undecidable (NOT recursive). The universality problem for context-free languages (ALLCFGALL_{\text{CFG}} / ALLPDAALL_{\text{PDA}}) is undecidable via reduction from the Post Correspondence Problem (PCP) or by representing valid computation histories of a Turing machine.

Therefore, only D is NOT recursive.

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Turing Machines and Undecidability previous year question is Q12 of the GATE CSE 2021 Set 1 paper. Find more GATE CSE PYQs on Turing Machines and Undecidability in Theory of Computation, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Turing Machines and Undecidability PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Turing Machines and Undecidability in GATE CSE

Turing Machines and Undecidability has 30 GATE CSE PYQs across 20 papers from 2012 to 2026. 3 of them are 1-mark MSQs like this one, and GATE CSE 2021 Set 1 has 2.

How GATE tests Turing Machines and Undecidability

More from GATE CSE 2021 Set 1

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2021 Set 1 · Q12 · MSQ

Let M denote an encoding of an automaton M. Suppose that = {0, 1}. Which of the following languages is/are NOT recursive?

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.