Open In App

GATE | GATE CS 2011 | Question 24

Like Article
Like
Save
Share
Report

Let P be a regular language and Q be context-free language such that Q âŠ† P. (For example, let P be the language represented by the regular expression p*q* and Q be {pn qn  | n âˆˆ N}). Then which of the following is ALWAYS regular? 

(A) P âˆ©

(B) P – Q 

(C) âˆ‘* – P 

(D) âˆ‘* – Q

(A)

A

(B)

B

(C)

C

(D)

D



Answer: (C)

Explanation:

1. P ∩ Q would be Q, due to the given fact that Q ⊆ P, hence context free but not regular. 

2. P − Q = P ∩ Q might not even be a context free language, due to the closure properties of context free languages. 

3. Σ∗ − P is equivalently complement of P, hence regular. 

4. Σ∗ − Q is equivalently complement of Q, hence it might not even be a context free language. 

Hence, option C is the correct answer 


Quiz of this Question
Please comment below if you find anything wrong in the above post


Last Updated : 08 Oct, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads