Finite State Machine can be used the model the behavior of system by identifying what states the system can be in, what inputs or events trigger state transitions, and how the system will behave in each state.
In this model, we view the execution of the software as a sequence of transitions that move the system through its various states.
Key characteristics of a system that can be modeled with a FSM
- The system must be describable by a finite set of states
- The system must have a finite set of inputs and/or events that can trigger transitions between states
- The behavior of the system at a given point in time depends upon the current state and the input or event that occur at that time
- For each state the system may be in, behavior is defined for each possible input or event
- The system has a particular initial state