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

In the DFA-to-grammar method, which variables get an ε-rule?

In the DFA-to-grammar method, which variables get an ε-rule?

  1. A.The start variable only
  2. B.The variables of accepting states
  3. C.Every variable
  4. D.Variables with self-loops
Answer & explanation

Correct answer: The variables of accepting states

X → ε lets the derivation stop exactly when the DFA run ends in an accepting 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 →