A finite-state machine (FSM) is a mathematical model of computation that describes an abstract machine in one of a finite number of states at any point in time. The FSM can change from one state to another as it responds to data inputs, or when some condition is satisfied. The change from one state to another is called a transition. An FSM is defined by a list of its states, its initial state, and the conditions for each transition. Often, state machines are illustrated as graphs whose nodes are the states and whose links are the transition conditions.
Completing this unit should take you approximately 2 hours.
How we illustrate a finite-state machine has a great deal to do with how well others will understand our design. There is also an opportunity for objective review and evolution of the underlying system. This video continues with a discussion on the design of a combination lock.
Review these example designs of relatively simple practical applications of finite-state machines.
Watch these videos for examples of using FSMs in the real world. They also discuss some subtle issues related to implementing FSMs.
Take this assessment to see how well you understood this unit.