Finite automaton in Haskell
问题 What is a good way to represent finite automaton in Haskell? How would the data type of it look like? In our college, automata were defined as a 5-tuple (Q, X, delta, q_0, F) where Q is the set of automaton's states, X is the alphabet (is this part even necessery), delta is the transition function taking 2-tuple from (Q,X) and returning state/-s (in non-deterministic version) and F is the set of accepting/end states. Most importantly, I'm not sure what type delta should have... 回答1: There are