Library

DFA · Regular

A password with a letter, a digit and a symbol

Three yes-or-no facts, eight states — a cube, one axis per requirement. a, 0 and # stand for any letter, digit and symbol.

nonea0#a0a#0#a0#a0#a0#a0#a0#a, 0#a, #0a0, #a, 0, #
The machine as drawn — 8 states, 24 transitions.Every word up to length 5, one row per length in shortlex order, inked where it is accepted.

The author’s examples, run

#0a → accept##aa00# → accept#0a# → accept#0#a00a#aaaa## → accepta0a → reject#aa# → rejectε → reject##00# → reject