Library

DFA · Regular

Every block of a’s has even length

Words built from b and aa. The machine is in the middle of a pair of a’s or not; a b in the middle of a pair has nowhere to go.

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

The author’s examples, run

ε → acceptbaabb → acceptb → acceptaaaaaabbaa → accepta → rejectaaabb → rejectab → rejectbaaaaabbaa → reject