Password pattern validator
CO2BTL 3 – ApplySDG 16 — Peace, Justice & Strong InstitutionsModule 2
Starts with a letter and contains at least one digit. The alphabet abstracts a password into three classes: "a" a letter, "d" a digit, "s" a symbol. Note what is *hard* here — "at least one of each class" is an intersection of three conditions, and writing it as a single expression is painful even though the language is plainly regular. That is a good argument for the closure lab.
The expression
a(a+d+s)*d(a+d+s)*The machine below is its minimal DFA — 4 states over {a, d, s}. Open it in the playground to see the parse tree and the ε-NFA it came from.
Input
Narration
Start in state {{q0}} with "ad" still to read.
Run many strings
One string per line. A blank line means the empty string.