FSMs
Finite state machines (FSMs) are mathematical models of computation used to design both software and hardware that exhibit a finite number of modes or states. An FSM consists of a finite set of states, an input alphabet, a transition function that maps a state and an input symbol to a next state, a designated start state, and, for many definitions, a set of accepting (or final) states. In some contexts an FSM also produces output, leading to two common variants known as Mealy and Moore machines.
Deterministic finite automata (DFAs) have exactly one next state for every combination of current state and
Mealy and Moore machines are FSMs with output. In a Mealy machine the output depends on the
Formal definitions describe an FSM as a 5-tuple. For a DFA, M = (S, Σ, δ, s0, F) where
Applications include lexical analysis, protocol design, control systems, hardware design and simple user interfaces. Limitations include