Some things follow a plan. 
Some machines follow a set plan. 
Imagine a gate at a subway station. 
A finite-state machine is a way to model how things work. It can only be in one state at a time. It changes states when it receives an input. This change is called a transition. These machines are used in many things. Vending machines, elevators, and traffic lights all use them.
There are different kinds of these machines. Some are called acceptors. They look at a sequence of symbols to see if it fits a rule. Others are called transducers. These machines produce an output based on the state or the input.
A finite-state machine is a way to model how a system works. It is an abstract machine that can be in exactly one state at any time. A state is a description of what the system is doing while it waits for something to happen. When the machine receives an input, it can change from one state to another. This change is called a transition.
To understand how they work, imagine a simple turnstile at a subway station. 
People use these models in many different areas of study. Scientists and experts study them in a field called automata theory. This field looks at how machines process information. You can find these ideas in electrical engineering and computer science. They are also used in biology, philosophy, and even video game programming. 
There are different types of these machines based on what they do. Acceptors are machines that look at a sequence of symbols. They decide if the input is accepted or rejected based on a rule.
These machines are much simpler than some other models of computation. A famous model called a Turing machine is much more powerful. This is because a finite-state machine has limited memory. Its memory is restricted by the total number of states it has.
A finite-state machine (FSM) is a mathematical model of computation. It is an abstract machine that exists in exactly one of a finite number of states at any given time. These states represent the current status of a system while it waits for an event. When the machine receives a specific input, it can undergo a transition. A transition is the process of changing from one state to another.
To understand the mechanism, consider the inputs and transitions that define an FSM. An FSM is formally defined by a list of its states, its initial state, and the inputs that trigger each transition. For example, a turnstile can be modeled as a state machine with two states: Locked and Unlocked. 
There are two primary types of finite-state machines: deterministic and non-deterministic. In a deterministic finite-state machine (DFSM), each input leads to exactly one specific next state. This makes the behavior predictable and certain. In a non-deterministic finite-state machine (NFSM), an input might allow for multiple possible next states. Despite this difference, any non-deterministic machine can be converted into an equivalent deterministic one. This mathematical equivalence allows engineers to use non-deterministic models to simplify complex designs before implementing them as deterministic systems.
FSMs are categorized by their specific functions into four groups: acceptors, classifiers, transducers, and sequencers. Acceptors, also known as recognizers, produce a binary output to indicate if an input sequence is accepted or rejected.
Transducers are machines that produce outputs based on inputs and current states. They are used heavily in control applications and computational linguistics. There are two major models of transducers: Moore machines and Mealy machines. In a Moore machine, the output depends solely on the current state.
Historically and theoretically, FSMs occupy a specific place in the hierarchy of computational power. An FSM has less computational power than a Turing machine. This limitation exists because an FSM's memory is strictly limited by its finite number of states. A Turing machine can perform tasks that an FSM cannot because it has much more flexible memory. However, an FSM is equivalent in power to a Turing machine that is restricted to only "read" operations and can only move its head in one direction, from left to right.
Today, the applications of finite-state machines are vast and diverse. They are used in electrical engineering to design digital hardware and in computer science for software engineering and network protocols. In linguistics, they help model how languages function. 
🖼️ Images & Media (10)
More to explore
✨ What else?
Related topics you might enjoy
🔬 Go deeper
More advanced topics to explore
🪜 Step back
Simpler topics to build understanding
What is Nepedia?
A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.