Library

DFA · Regular

Contains both aa and bb

Two searches at once: the state records the last letter and which of the two pairs has been seen. A product construction drawn out — and smaller than the full product, because seeing a pair also says what the last letter was.

none·-none·anone·baa·abb·baa·bbb·abothabababababababa, b
The machine as drawn — 8 states, 16 transitions.Every word up to length 8, one row per length in shortlex order, inked where it is accepted.

The author’s examples, run

aabb → acceptaabba → acceptaaaabb → acceptaaaaaaabba → acceptbabb → rejectbabba → rejectaaaaab → rejectaaaaaaaaba → reject