🎙 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 2 of 10

Why must non-generating symbols be removed before unreachable ones?

Why must non-generating symbols be removed before unreachable ones?

  1. A.Removing non-generating symbols can make other symbols unreachable
  2. B.Unreachable symbols cannot be found until the grammar is in CNF
  3. C.It does not matter which comes first
  4. D.Generating symbols are always reachable
Answer & explanation

Correct answer: Removing non-generating symbols can make other symbols unreachable

Deleting S → AB made A and C unreachable. In the other order, A and C survive.

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 →