GateAI
Turing Machines and Undecidability

GATE CSE 2016 Set 2 · Q44

MCQ2 marksMedium

Time

Consider the following languages. L1={⟨M⟩∣M takes at least 2016 steps on some input},L2={⟨M⟩∣M takes at least 2016 steps on all inputs} andL3={⟨M⟩∣M accepts ε}, \begin{aligned} L_1 &= \{\langle M \rangle \mid M \text{ takes at least 2016 steps on some input}\}, L_2 &= \{\langle M \rangle \mid M \text{ takes at least 2016 steps on all inputs}\} \text{ and} L_3 &= \{\langle M \rangle \mid M \text{ accepts } \varepsilon\}, \end{aligned} where for each Turing machine MM, ⟨M⟩\langle M \rangle denotes a specific encoding of MM. Which one of the following is TRUE?

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: C) L1, L2 are recursive and L3 is not recursive

Turing Machines and Undecidability

To determine the decidability (recursiveness) of each language:

  1. Language L1L_1: In 20162016 steps, a Turing Machine MM can scan at most the first 20162016 cells of its tape. Therefore, its behavior within the first 20162016 steps depends exclusively on the prefix of the input string of length at most 20162016. Over a finite input alphabet Σ\Sigma, the set of all possible input strings of length at most 20162016 is finite. A decider can simulate MM on each of these finitely many input strings for up to 20162016 steps. If MM takes at least 20162016 steps on at least one such input, accept; otherwise, reject. Since the simulation is guaranteed to terminate in finite time, L1L_1 is recursive.

  2. Language L2L_2: Using the exact same reasoning, if MM takes at least 20162016 steps on all inputs of length at most 20162016, it will take at least 20162016 steps on every possible input (since longer inputs cannot affect the first 20162016 steps). A decider can simulate MM on all inputs of length ≤2016\le 2016 up to 20162016 steps. If MM executes at least 20162016 steps on every one of them, accept; otherwise, reject. Thus, L2L_2 is recursive.

  3. Language L3L_3: L3L_3 is the empty string (or blank tape) acceptance problem for Turing machines. By Rice's Theorem (or via standard reduction from the Halting Problem HTMH_{\text{TM}}), deciding whether a Turing machine accepts the empty string ε\varepsilon is undecidable. Thus, L3L_3 is not recursive.

Therefore, L1,L2L_1, L_2 are recursive and L3L_3 is not recursive, matching option (C).

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 Q44 of the GATE CSE 2016 Set 2 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 2-mark MCQs like this one, and GATE CSE 2016 Set 2 has 2.

How GATE tests Turing Machines and Undecidability

More from GATE CSE 2016 Set 2

Share this solution

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

GateAI solution cardGATE CSE 2016 Set 2 · Q44 · MCQ

Consider the following languages. L1 &= { M M takes at least 2016 steps on some input}, L2 &= { M M takes at least 2016 steps on all inputs} and L3 &= { M M accepts }, where for each Turing machine M, M denotes a specific encoding of M. Which one of the following is TRUE?

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.