Library

DFA · Regular

(ab)* with noise

Delete every c and what remains must be ab repeated. c is a self-loop on every state, so the machine for (ab)* needs nothing else to ignore it — inserting a letter anywhere is a regular operation, and this is what it looks like.

evenoddabcc
The machine as drawn — 2 states, 4 transitions.Every word up to length 5, one row per length in shortlex order, inked where it is accepted.

The author’s examples, run

ε → acceptabc → acceptcabaccb → acceptccacccbcc → accepta → rejectbbc → rejectaabaccb → rejectacacccbcc → reject