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

When converting a DFA to a right-linear grammar, what does the arrow P --1-- Q become?

When converting a DFA to a right-linear grammar, what does the arrow P --1--> Q become?

  1. A.P → 1Q
  2. B.Q → 1P
  3. C.P → Q1
  4. D.P → 1
Answer & explanation

Correct answer: P → 1Q

Each arrow becomes a rule from the source state's variable: read 1, then continue as Q.

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 →