GATE 2021 CS – Question 49
For a Turing machine $M$, $\langle M \rangle$ denotes an encoding of $M$. Consider the following two languages.
$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}\}$
Which one of the following options is correct?
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (A) Both $L_1$ and $L_2$ are decidable.
Explanation
Within 2021 steps M can read at most 2021 input symbols, so it suffices to simulate M for 2021 steps on the finitely many inputs of length at most 2021. Both properties are therefore decidable.