GATE Computer ScienceVery hardGATE CS (PYQ pattern)
Which of the following statements about deterministic context-free languages (DCFLs) are correct? I. The complement of a DCFL is a DCFL. II. The union of two DCFLs is always a DCFL. III. The intersection of a DCFL with a regular language is a DCFL. IV. The reversal of a DCFL is always a DCFL.
- A. I, II and III only
- B. II and IV only
- C. I, III and IV only
- D. I and III only
Correct answer: D. I and III only
DCFLs are closed under complement and under intersection with regular languages; they are not closed under union (their union can be the non-deterministic {aⁱbʲcᵏ : i = j or j = k}) nor under reversal.
More Theory of Computation questions
- Which of the following statements about context-free languages are correct? I. The intersection of a CFL with a DCFL is always a CFL. II…
- Which of the following languages over {a, b, c} is NOT context-free?
- Which one of the following languages is regular?
- To show that L = { aⁱbʲ : i > j } is not regular by the pumping lemma with pumping length p, which string and pumping choice give a valid…
- Consider these problems about a Turing machine M (given as input): I. Does M ever move its head to the left when started on the blank…
- Which of the following problems is decidable?