← Quiz: Simplifying CFGs and CNF: all 10 questions
Quiz: Simplifying CFGs and CNF · Question 3 of 10
In S → ASA | aB, A → B | S, B → b | ε, which variables are nullable?
In S → ASA | aB, A → B | S, B → b | ε, which variables are nullable?
- A.Only B
- B.A and B
- C.S, A and B
- D.None
Answer & explanation
Correct answer: A and B
B → ε and A → B. S is not nullable because S → aB contains a terminal and S → ASA needs S itself.
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 →