StreakPeaked· Practice

ExamsGATETechnical

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}

  1. L1 is decidable and L2 is undecidable
  2. L1 is undecidable and L2 is decidable
  3. Both L1 and L2 are decidable
  4. Both L1 and L2 are undecidable

Correct answer: Both L1 and L2 are undecidable

Solution

Both languages L1 and L2 are undecidable because they involve determining the behavior of Turing machines over all inputs or some inputs, which relates to the Halting Problem. Specifically, there is no algorithm that can universally decide whether a Turing machine will exceed a certain number of steps for all or any input.

Related GATE Technical questions

⚔️ Practice GATE Technical free + battle 1v1 →