A deterministic finite automaton (DFA) is a 5-tuple (Q, Σ, δ, q0, F), where
Qis a finite set called the statesΣis a finite set called the alphabetδ:Q x Σ->Qis the transition functionq0inQis the start state, andF(a subset ofQ) is the set of accept states
Refer to [1] for a complete discussion on DFAs.
An example of how to define and simulate your own DFA is provided in the test directory.
Build the project with
$ stack buildTest the project with
$ stack test[1] Sipser, Michael (1997). Introduction to the Theory of Computation. Boston: PWS. ISBN 0-534-94728-X.. Section 1.1: Finite Automata, pp. 31–47.