GATE CS 2011 · Question 24 · Theory of Computation · Multiple choice (MCQ) · 1 mark · −1/3 for a wrong answer

Let P be a regular language and Q be a context-free language such that Q ⊆ P. (For example, let P be the language represented by the regular expression p^*q^* and Q be {pⁿqⁿ | n ∈ ℕ}). Then which of the following is ALWAYS regular?

  1. (A) P ∩ Q
  2. (B) P - Q
  3. (C) Σ^* - P
  4. (D) Σ^* - Q
Answer

Answer (C)

Answer from the official GATE CS 2011 answer key.

The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes