GATE Computer ScienceEasyGATE CS (PYQ pattern)
If a language L and its complement are both recursively enumerable, then L is
- A. decidable (recursive)
- B. context-free
- C. regular
- D. not necessarily decidable
Correct answer: A. decidable (recursive)
Run the two semi-deciders in parallel: exactly one halts, which decides membership.
More Theory of Computation questions
- Which of the following classes of languages is closed under complement but NOT under union?
- Consider L = { aⁿbⁿ : n ≥ 0 } ∪ { aⁿb²ⁿ : n ≥ 0 }. Which classification is correct?
- Over the alphabet {a, b, c}, what is the status of the complement of { aⁿbⁿcⁿ : n ≥ 0 }?
- Consider the language L of strings over {a, b} that contain both abab and bb as substrings, have na ≡ 1 (mod 3) and have an even number of…
- What is the length of the shortest string over {a, b} that has length divisible by 4, contains both aab and bba, has an odd number of b's…
- L₁ is the set of strings over {a, b} containing aa and L₂ the set containing bb. How many strings of length at most 6 lie in the symmetric…