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

Quiz: Pumping Lemma Proofs · Question 10 of 10

Which of these languages IS context-free?

Which of these languages IS context-free?

  1. A.{aⁿbⁿcⁿ}
  2. B.{ww | w ∈ {a, b}*}
  3. C.{wwᴿ | w ∈ {a, b}*}
  4. D.{a^(n²)}
Answer & explanation

Correct answer: {wwᴿ | w ∈ {a, b}*}

A PDA can push the first half and pop while matching its reverse; the others fail the CFL pumping lemma.

Can you get the rest right without peeking?

Take the timed Quiz: Pumping Lemma Proofs quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →