======================================================================== TextualDFAs Author: Bob Dondero ======================================================================== ------------------------------------------------------------------------ Textual representation of the "binary numbers that are multiples of 3" DFA from the Wikipedia "Deterministic finite automaton" page ------------------------------------------------------------------------ S0 (accept) <-- the start state 0: S0 1: S1 S1 (reject) 0: S2 1: S0 S2 (reject) 0: S1 1: S2 ------------------------------------------------------------------------ Textual representation of the "Does the string have 'nano' in it" DFA from the Appendix of the "A Taste of C" lecture slides ------------------------------------------------------------------------ START (reject) <-- the start state n: N other: START N (reject) n: N a: NA other: START NA (reject) n: NAN other: START NAN (reject) n: N a: NA o: NANO other: START NANO (accept) other: NANO ======================================================================== Note that each DFA explicitly indicates which state is the start state, and whether each state is an accepting state or a rejecting state. ========================================================================