🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: DFA: all 10 questions

Quiz: DFA · Question 4 of 10

How many states does a minimal DFA need for "binary strings with exactly two 1s"?

How many states does a minimal DFA need for "binary strings with exactly two 1s"?

  1. A.2
  2. B.3
  3. C.4
  4. D.5
Answer & explanation

Correct answer: 4

Seen 0, 1 or 2 ones, plus a dead state for 3 or more.

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 →