State machine
State Machine
A state machine, also known as a finite state machine (FSM), is a mathematical model of computation. It is an abstract machine that can be in exactly one of a finite number of states at any given time. The FSM can change from one state to another in response to some external inputs; 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.
Overview[edit | edit source]
State machines are used in applications where an algorithm can be in one of a set number of states. These applications range from embedded systems to user interfaces and language parsing. State machines can be divided into two types: Mealy machines, where the output is determined by the current state and the input, and Moore machines, where the output is determined by the current state alone.
States and Transitions[edit | edit source]
A state is a description of the status of a system that is waiting to execute a transition. A transition is a set of actions to be executed when a condition is fulfilled or when an event is received. The behavior of state machines can be observed in many devices in modern society that perform a predetermined sequence of actions depending on a sequence of events with which they are presented.
State Machine Diagrams[edit | edit source]
State machine diagrams, also known as state diagrams, are used to illustrate the states an object or interaction may be in, as well as the transitions between those states in the Unified Modeling Language (UML). State diagrams can be used to graphically represent finite state machines.
Applications[edit | edit source]
State machines have a wide range of applications in both software and hardware designs. They are often used in computer science, cybernetics, and electrical engineering to model systems and their interactions. Some common applications include control systems, user interfaces, protocol systems, language parsing, and operating systems.
See Also[edit | edit source]
Search WikiMD
Ad.Tired of being Overweight? Try W8MD's physician weight loss program.
Semaglutide (Ozempic / Wegovy and Tirzepatide (Mounjaro / Zepbound) available.
Advertise on WikiMD
WikiMD's Wellness Encyclopedia |
Let Food Be Thy Medicine Medicine Thy Food - Hippocrates |
Translate this page: - East Asian
中文,
日本,
한국어,
South Asian
हिन्दी,
தமிழ்,
తెలుగు,
Urdu,
ಕನ್ನಡ,
Southeast Asian
Indonesian,
Vietnamese,
Thai,
မြန်မာဘာသာ,
বাংলা
European
español,
Deutsch,
français,
Greek,
português do Brasil,
polski,
română,
русский,
Nederlands,
norsk,
svenska,
suomi,
Italian
Middle Eastern & African
عربى,
Turkish,
Persian,
Hebrew,
Afrikaans,
isiZulu,
Kiswahili,
Other
Bulgarian,
Hungarian,
Czech,
Swedish,
മലയാളം,
मराठी,
ਪੰਜਾਬੀ,
ગુજરાતી,
Portuguese,
Ukrainian
WikiMD is not a substitute for professional medical advice. See full disclaimer.
Credits:Most images are courtesy of Wikimedia commons, and templates Wikipedia, licensed under CC BY SA or similar.
Contributors: Prab R. Tumpati, MD