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

A rule A → XYZ has X and Z nullable. How many non-empty bodies does it give after ε-removal?

A rule A → XYZ has X and Z nullable. How many non-empty bodies does it give after ε-removal?

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

Correct answer: 4

Keep or drop X, keep or drop Z: XYZ, YZ, XY, Y.

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 →