/steɪt trænsˈɪʃən/
noun … “Change from one system state to another.”
State Transition refers to the movement of a system, device, or computational model from one defined state to another in response to inputs, events, or conditions. State transitions are fundamental in finite-state machines, sequential circuits, software workflows, and control systems, enabling predictable and deterministic behavior based on system rules.
Key characteristics of State Transition include:
- Trigger: an event, input, or condition that causes the transition.
- Source state: the current state before the transition occurs.
- Destination state: the state entered after the transition.
- Deterministic vs nondeterministic: may have one or multiple possible outcomes per input.
- Output association: may produce an output or action during the transition (Mealy machine) or after reaching the new state (Moore machine).
Applications of State Transition include traffic light controllers, protocol handling, UI navigation, software state management, and digital circuit design.
Workflow example: Traffic light transition:
states = ["Green", "Yellow", "Red"]
current_state = "Green"
def transition(event):
if current_state == "Green" && event == "timer":
return "Yellow"
elif current_state == "Yellow" && event == "timer":
return "Red"
elif current_state == "Red" && event == "timer":
return "Green"
return current_state
current_state = transition("timer")
Here, the system moves between states predictably based on input events.
Conceptually, a State Transition is like a person moving between rooms in a building: the transition occurs only when certain conditions are met, and the person occupies only one room at a time.
See Finite-State Machine, Sequential Circuit, Control Logic, Flip-Flop, Digital.