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

Using the ends-in-01 DFA, what is the path for input 1101?

Using the ends-in-01 DFA, what is the path for input 1101?

  1. A.q0 → q1 → q2 → q0 → q1
  2. B.q0 → q0 → q0 → q1 → q2
  3. C.q0 → q1 → q1 → q2 → q2
  4. D.q0 → q2
Answer & explanation

Correct answer: q0 → q0 → q0 → q1 → q2

1 stays in q0, 1 stays, 0 goes to q1, 1 goes to q2 (accept).

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 →