GateAI
Turing Machines and Undecidability

GATE CSE 2021 Set 1 · Q39

MCQ2 marksMedium

Time

For a Turing machine MM, ⟨M⟩\langle M \rangle denotes an encoding of MM. Consider the following two languages. L1={⟨M⟩∣M takes more than 2021 steps on all inputs}L_1 = \{\langle M \rangle \mid M \text{ takes more than } 2021 \text{ steps on all inputs}\} L2={⟨M⟩∣M takes more than 2021 steps on some input}L_2 = \{\langle M \rangle \mid M \text{ takes more than } 2021 \text{ steps on some input}\} Which one of the following options is correct?

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: A) Both L1 and L2 are decidable.

Turing Machines and Undecidability

To determine whether L1L_1 and L2L_2 are decidable, consider how many tape cells a Turing machine MM can access in at most 20212021 steps:

  1. In 20212021 computation steps, the tape head of MM can visit at most the first 20212021 tape cells starting from the initial position. Any input symbols located at positions beyond cell 20212021 cannot influence the machine's execution during the first 20212021 steps.

  2. Since the input alphabet Σ\Sigma is finite, the set of all possible input prefixes of length at most 20212021 is finite (specifically, ∑k=02021∣Σ∣k\sum_{k=0}^{2021} |\Sigma|^k).

  3. Decidability of L1L_1: To check if MM takes more than 20212021 steps on *all* inputs, a decider can simulate MM for up to 20222022 steps on each of the finitely many input strings of length ≤2021\le 2021. If MM halts within 20212021 steps on any such input, it rejects ⟨M⟩\langle M \rangle; otherwise, it accepts ⟨M⟩\langle M \rangle. Since the simulation always terminates in finite time, L1L_1 is decidable.

  4. Decidability of L2L_2: Similarly, to check if MM takes more than 20212021 steps on *some* input, a decider simulates MM for 20222022 steps on each string of length ≤2021\le 2021. If MM takes more than 20212021 steps on at least one string, it accepts; otherwise, it rejects. Thus, L2L_2 is also decidable.

Therefore, both L1L_1 and L2L_2 are decidable, which corresponds to Option (A).

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 Q39 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. 13 of them are 2-mark MCQs 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 · Q39 · MCQ

For a Turing machine M, M denotes an encoding of M. Consider the following two languages. L1 = { M M takes more than 2021 steps on all inputs} L2 = { M M takes more than 2021 steps on some input} Which one of the following options is correct?

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.