GATE Computer ScienceModerateGATE CS (PYQ pattern)

Let A = { ⟨M⟩ : the TM M halts on at least one input } and B = { ⟨M⟩ : M halts on no input }. Which statement is correct?

  1. A. Both A and B are recursively enumerable but undecidable
  2. B. A is decidable, so B is decidable too
  3. C. B is recursively enumerable but A is not
  4. D. A is recursively enumerable but undecidable; B is not recursively enumerable

Correct answer: D. A is recursively enumerable but undecidable; B is not recursively enumerable

A recogniser for A dovetails M over all inputs and step bounds and accepts when some run halts, so A is RE. A is undecidable (reduce HALT: build M' that ignores its input and runs M on w). B is the complement of A; if B were also RE, A would be decidable. So B is not RE.

More Theory of Computation questions

Exams that ask this topic