🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← All topics

Quiz: NFA and Subset Construction: questions with answers

10 questions, each with the answer and a short explanation.

Take the timed quiz + get a certificate →
  1. Q1. When does an NFA accept a string?
  2. Q2. What is ε-closure(A) in the demo?
  3. Q3. An NFA has n states. At most how many states can the DFA from subset construction have?
  4. Q4. In the "ending in ab" conversion, which DFA states are accepting?
  5. Q5. Compared with DFAs, NFAs recognise:
  6. Q6. In an NFA, what happens to a path when there is no transition for the next symbol?
  7. Q7. An NFA accepts strings whose 4th symbol from the end is 1. How many states does the smallest DFA need?
  8. Q8. What does this print? (code)
  9. Q9. In subset construction, which DFA state is the start state?
  10. Q10. Why might a regex engine simulate the NFA directly instead of building the full DFA?