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

Quiz: Regular Grammars and Finite Automata · Question 5 of 10

When converting a right-linear grammar to an NFA, what does the rule A → b become?

When converting a right-linear grammar to an NFA, what does the rule A → b become?

  1. A.A becomes an accepting state
  2. B.A self-loop on A labelled b
  3. C.An arrow A --b--> F, where F is a new final state
  4. D.It is deleted
Answer & explanation

Correct answer: An arrow A --b--> F, where F is a new final state

The rule ends the derivation after reading b, so it leads to a final state.

Can you get the rest right without peeking?

Take the timed Quiz: Regular Grammars and Finite Automata quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →