State machine

From WikiMD's Food, Medicine & Wellness Encyclopedia

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]

Wiki.png

Navigation: Wellness - Encyclopedia - Health topics - Disease Index‏‎ - Drugs - World Directory - Gray's Anatomy - Keto diet - Recipes

Search WikiMD


Ad.Tired of being Overweight? Try W8MD's physician weight loss program.
Semaglutide (Ozempic / Wegovy and Tirzepatide (Mounjaro) available.
Advertise on WikiMD

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