GATE Computer ScienceVery hardGATE CS (PYQ pattern)
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. The inverse homomorphic image h⁻¹(L) of a CFL L is a CFL. III. The right quotient L / R = { x : xy ∈ L for some y ∈ R } of a CFL L by a regular R is a CFL. IV. L − R is a CFL for every CFL L and regular R.
- A. II and IV only
- B. II, III and IV only
- C. I, II and IV only
- D. II and III only
Correct answer: B. II, III and IV only
I is false: { aⁿbⁿcᵐ } (a DCFL) ∩ { aᵐbⁿcⁿ } (a CFL) = { aⁿbⁿcⁿ }. II holds (simulate h on the PDA's input). III holds (CFLs are closed under quotient with any regular set). IV holds since L − R = L ∩ complement(R), a CFL ∩ regular.
More Theory of Computation questions
- 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?
- Which of the following problems is undecidable?