StreakPeaked· Practice

ExamsGATETechnical

Let \(<M>\) be the encoding of a Turing machine as a string over \(\Sigma = \{0,1\}\). Let \(L = \{<M> \mid M\text{ is a Turing machine that accepts a string of length }2014\}\). Then, \(L\) is

  1. decidable and recursively enumerable
  2. undecidable but recursively enumerable
  3. decidable and not recursively enumerable
  4. decidable but not recursively enumerable

Correct answer: decidable and recursively enumerable

Solution

To decide membership in L, enumerate all strings of length 2014 and simulate M on each one. If M accepts at least one such string, accept; otherwise reject. Since the set of candidate strings is finite, the language is decidable, and every decidable language is recursively enumerable.

Related GATE Technical questions

⚔️ Practice GATE Technical free + battle 1v1 →