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?
- A. Both A and B are recursively enumerable but undecidable
- B. A is decidable, so B is decidable too
- C. B is recursively enumerable but A is not
- 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
- Which of the following statements about many-one reductions A ≤ B are correct? I. If B is decidable then A is decidable. II. If A is…
- Which of the following languages is context-sensitive but NOT context-free?
- An ε-NFA has 6 states. When it is converted to a DFA by the subset construction, what is the maximum possible number of states in the…
- A grammar in Chomsky normal form (no ε-productions) derives a string of length 15. Let N be the number of derivation steps and H the…
- A grammar in Greibach normal form generates a string of length 15. How many derivation steps does any derivation of it take?
- A grammar has only rules of the forms A → BC, A → BCD (three variables) and A → a. A parse tree of a string of length 9 uses exactly two…