GATE | Sudo GATE 2020 Mock III (24 January 2019) | Question 24

Let L1 and L2 be any deterministic context-free language and R be any regular language. Then, which of the following is correct ?

I. L1 ∪ L2 is deterministic context-free.
II. L1′ is context-free.
III. L1-R is context-free.
IV. L1 ∩ L2 deterministic context-free.

(A) I, II and IV only
(B) I and III only
(C) II and IV only
(D) II and III only


Answer: (D)

Explanation: The set of deterministic context-free languages is closed under the following operations:

  • complement
  • inverse homomorphism
  • right quotient with a regular language
  • pre: pre(L) is the subset of all strings having a proper prefix that also belongs to L.
  • min: min(L) is the subset of all strings do not have a proper prefix in L.
  • max: max(L) is the subset of all strings that are not the prefix of a longer string in L.

The set of deterministic context-free language is not closed under the following operations:

  • union
  • intersection
  • concatenation
  • Kleene star
  • ε-free morphism
  • Mirror image

statements (II) and (III) only are correct.

Option (D) is true.


Quiz of this Question

My Personal Notes arrow_drop_up
Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.