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

What is the minimum number of states in a DFA for binary strings whose length is divisible by 4?

What is the minimum number of states in a DFA for binary strings whose length is divisible by 4?

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

Correct answer: 4

The DFA only needs to remember the length mod 4, which has 4 possible values.

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 →