State machine

From WikiMD's 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]


E-to-the-i-pi.svg
   This article is a mathematics-related stub. You can help WikiMD by expanding it!


Emoji u1f4bb.svg
   This article is a computing stub. You can help WikiMD by expanding it!
WikiMD
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 / Zepbound) available.
Advertise on WikiMD

WikiMD's Wellness Encyclopedia

Let Food Be Thy Medicine
Medicine Thy Food - Hippocrates

Medical Disclaimer: WikiMD is not a substitute for professional medical advice. The information on WikiMD is provided as an information resource only, may be incorrect, outdated or misleading, and is not to be used or relied on for any diagnostic or treatment purposes. Please consult your health care provider before making any healthcare decisions or for guidance about a specific medical condition. WikiMD expressly disclaims responsibility, and shall have no liability, for any damages, loss, injury, or liability whatsoever suffered as a result of your reliance on the information contained in this site. By visiting this site you agree to the foregoing terms and conditions, which may from time to time be changed or supplemented by WikiMD. If you do not agree to the foregoing terms and conditions, you should not enter or use this site. 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