← Quiz: DFA: all 10 questions
Quiz: DFA · Question 9 of 10
How do you build a DFA for the complement of a language, given a complete DFA for it?
How do you build a DFA for the complement of a language, given a complete DFA for it?
- A.Reverse every arrow
- B.Add a new start state
- C.Swap accepting and non-accepting states
- D.Remove the trap state
Answer & explanation
Correct answer: Swap accepting and non-accepting states
Every string ends in exactly one state, so swapping F with Q − F flips every answer.
Can you get the rest right without peeking?
Take the timed Quiz: DFA quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →