Finite state machine (FSM) is a term used by programmers, mathematicians and other professionals to describe a mathematical model for any system with a limited number of conditional states of being. A finite state machine may be any model implemented through software or hardware to simplify a complex problem. Within an FSM, all states in consideration exist in a finite list and the abstract machine can only take on one of those states at a time. This allows each input and output scenario to be studied and tested. An FSM may be something very abstract, like a model for a business represented by an illustration, or it may be something concrete, like a vending machine or computer.
Finite state machines are considered computational models within automata theory. The types of computational models within automata theory include:
- Finite state machines—Models for any system with a limited number of conditional states of being.
- Pushdown automata – More complicated than finite state machines, these use regions of memory called stacks to store information as part of a model.
- Linear-bounded automata (LBA) – Similar to a Turing machine, but the data is limited to a portion of input within a finite group of inputs.
- Turing machines—The most complex mathematical model within automata theory for testing different input combinations to analyze a larger system or problem.
A practical example of a finite state machine is a set of buttons on a video game controller connected to a specific set of actions within the game. When a user inputs hitting certain buttons, the system knows to implement the actions that correspond.
When a finite state machine switches between states, it is called a state transition. Testing the quality of a system includes checking each state and state transition by considering all of the potential inputs that might be entered. In some cases, the finite state machine is set up using a programming language, and state transition functions are executed. In addition, artificial intelligence can be used to collect data about systems with pattern recognition and automated models.
For simpler problems, the same information can be displayed in tables, matrices, illustrations and flow charts, but finite state machines allow researchers to model larger and more complicated scenarios. Finite state machine diagrams show the flow of logic between input and output combinations that may appear within a specific machine.
While the word machine traditionally includes a physical component, this term refers to an abstract machine that could take the form of anything from a set of input events, to a computer, simple analog machine or theoretical model of an abstract concept.
Finite state machine vs. fuzzy state machine
The makeup of a finite state machine consists of a set of potential input events, the set of probable output events that correspond to them and the set of expected states the system can exhibit. The list of possible combinations of those elements is limited within a finite state machine. Alternatively, a fuzzy state machine allows the possibility of points of data that are not within discrete, pre-designated categories.