DFA · Regular
Letters alternate
No aa and no bb: each letter must differ from the one before. Three states — nothing read yet, last was a, last was b.
The author’s examples, run
ε → acceptaba → accepta → acceptababababab → acceptbba → rejectaa → rejectbbabababab → rejectabba → reject