Skip to content
GATEiit

GATE CSE 2021 Set 1 Q49: Decidability of TMs taking more than 2021 steps on all/some inputs

Question

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}L2={⟨M⟩∣M takes more than 2021 steps on some input}\begin{aligned} L_1 &= \{\langle M \rangle \mid M \text{ takes more than 2021 steps on all inputs}\} \\ L_2 &= \{\langle M \rangle \mid M \text{ takes more than 2021 steps on some input}\} \end{aligned}

Which one of the following options is correct?

Try it: multiple choice: exactly one correct option

Select one option
Wrong answer costs 2/3 mark in GATE.
Show answer and explanation

Answer: A (official GATE 2021 final answer key)

Concept used: In 2021 steps a TM reads at most the first 2021 input symbols, so only finitely many input prefixes matter.

First step: Simulate MM for 2022 steps on every string of length at most 2021; this finite check decides both properties.

Full step-by-step solution

Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.

Share this question

WhatsAppDownload image

Source: official GATE 2021 Set 1 CS question paper and final answer key, organised by IIT Bombay. Question paper · Answer key