← All topics
Quiz: Regular Grammars and Finite Automata: questions with answers
10 questions, each with the answer and a short explanation.
Take the timed quiz + get a certificate →- Q1. Which rule is NOT allowed in a right-linear grammar?
- Q2. When converting a DFA to a right-linear grammar, what does the arrow P --1-- Q become?
- Q3. In the DFA-to-grammar method, which variables get an ε-rule?
- Q4. What does this print? (code)
- Q5. When converting a right-linear grammar to an NFA, what does the rule A → b become?
- Q6. Why can the automaton built from a right-linear grammar be an NFA rather than a DFA?
- Q7. How do you handle a left-linear grammar?
- Q8. The grammar S → aA, A → Sb | ε mixes right-linear and left-linear rules. Which language does it generate?
- Q9. What does this print? (code)
- Q10. Which statement is true?