Library

DFA · Regular

Contains 01

The first DFA in Hopcroft, Motwani and Ullman. q0 has seen no 0 yet (or only 1s since), q2 has just seen a 0 and is waiting for a 1, and q1 has found 01 and will never leave.

q0q2q110010, 1
The machine as drawn — 3 states, 6 transitions.Every word up to length 8, one row per length in shortlex order, inked where it is accepted.

The author’s examples, run

01 → accept00110 → accept001 → accept0000000110 → accept11 → reject000 → rejectε → reject1100 → reject