Computer Science EngineeringHardISRO SC

How many of the following operations are guaranteed to produce a context-free language when applied to context-free languages L1, L2 and a regular language R: (i) L1 intersect R, (ii) L1 intersect L2, (iii) complement of L1, (iv) L1 minus R, (v) L1 union L2, (vi) L1 concatenated with L2?

  1. A. 4
  2. B. 2
  3. C. 3
  4. D. 5

Correct answer: A. 4

(i), (iv) (= L1 intersect complement of R), (v) and (vi) preserve context-freeness; (ii) and (iii) do not.

More Theory of Computation, Compilers & Digital Logic (ISRO CS) questions

Exams that ask this topic