GateAI
Turing Machines and Undecidability

GATE CSE 2012 · Q24

MCQ1 markMedium

Time

Which of the following problems are decidable? 1) Does a given program ever produce an output? 2) If LL is a context-free language, then, is L‾\overline{L} also context-free? 3) If LL is a regular language, then, is L‾\overline{L} also regular? 4) If LL is a recursive language, then, is L‾\overline{L} also recursive?

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: D) 3, 4

Turing Machines and Undecidability

Let us analyze the decidability of each statement:

  1. Does a given program ever produce an output? This is equivalent to asking whether a Turing machine enters an output-producing state (a non-trivial semantic property of the language), which is undecidable by Rice's Theorem / the Halting Problem.

  2. If LL is a CFL, is L‾\overline{L} context-free? Determining whether the complement of a context-free language is also context-free is undecidable (and context-free languages are not closed under complementation).

  3. If LL is a regular language, then is L‾\overline{L} also regular? Regular languages are closed under complementation. Thus, the complement of any regular language is guaranteed to be regular, making this a trivially decidable property (always true).

  4. If LL is a recursive language, then is L‾\overline{L} also recursive? Recursive languages (decidable languages) are closed under complementation. Thus, the complement of any recursive language is always recursive, which is also trivially decidable (always true).

Hence, statements 3 and 4 are decidable (Option D).

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 Q24 of the GATE CSE 2012 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. 13 of them are 1-mark MCQs like this one, and GATE CSE 2012 has 2.

How GATE tests Turing Machines and Undecidability

More from GATE CSE 2012

Share this solution

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

GateAI solution cardGATE CSE 2012 · Q24 · MCQ

Which of the following problems are decidable? 1) Does a given program ever produce an output? 2) If L is a context-free language, then, is L also context-free? 3) If L is a regular language, then, is L also regular? 4) If L is a recursive language, then, is L also 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.