🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: CFG and PDA: all 10 questions

Quiz: CFG and PDA · Question 4 of 10

Context-free languages are NOT closed under:

Context-free languages are NOT closed under:

  1. A.Union
  2. B.Concatenation
  3. C.Kleene star
  4. D.Intersection
Answer & explanation

Correct answer: Intersection

a^n b^n c^m ∩ a^m b^n c^n = a^n b^n c^n, which is not context-free.

Can you get the rest right without peeking?

Take the timed Quiz: CFG and PDA quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →