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

Quiz: Simplifying CFGs and CNF · Question 1 of 10

In the grammar S → AB | a, A → b, B → BC, C → c, which variable is not generating?

In the grammar S → AB | a, A → b, B → BC, C → c, which variable is not generating?

  1. A.S
  2. B.A
  3. C.B
  4. D.C
Answer & explanation

Correct answer: B

Every B-rule contains B again, so B never derives a string of terminals only.

Can you get the rest right without peeking?

Take the timed Quiz: Simplifying CFGs and CNF quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →