3 ms·
When people talk about state machines, do they mean deterministic finite automatons? Because i can see a lot of ubiquity in state transition tables in code, but
by HumanDrivenDev 9y ago
When people talk about state machines, do they mean deterministic finite automatons? Because i can see a lot of ubiquity in state transition tables in code, but less use in deciding whether to reject or accept a sequence of states which is essentially what a DFA does.
- twtw 9y agoNot usually. "State machine" is typically used to refer to the more general concept of a finite state machine, which includes Mealy and Moore automatons. DFAs typically are not viewed as having an output (or arguably a single bit for the whole input sequence that represents acceptance), while FSMs can have outputs on each transition or in each state, which means it can induce some action.
- HumanDrivenDev 9y agoSo people basically mean a transition table/function, but without the start state or accepting states?
- twtw 9y agoNo. They mean a set of states, a set of input symbols, a set of output symbols, an initial state, a transition function, and an output function. The output function maps from the state to the set of output symbols (or sometimes from the state and input to the output).
- HumanDrivenDev 9y agoIs there a formal name for this?
- twtw 9y agoIt's probably closest to a finite state transducer. No guarantees that what I described above is exactly the definition, though.