Fiveable
Fiveable

State Machines

Definition

State machines are computational models that consist of a set of states and transitions between those states. They are used to represent systems that change from one state to another based on inputs or events.

Analogy

Think of a vending machine as a state machine. It has different states (e.g., idle, accepting money, dispensing product) and transitions between those states based on user actions (e.g., inserting coins, pressing buttons).

Related terms

Finite Automaton: A type of state machine with a finite number of states and transitions.

Mealy Machine: A type of state machine where outputs depend on both the current state and input.

Moore Machine: A type of state machine where outputs depend only on the current state.

"State Machines" appears in:



© 2024 Fiveable Inc. All rights reserved.

AP® and SAT® are trademarks registered by the College Board, which is not affiliated with, and does not endorse this website.


© 2024 Fiveable Inc. All rights reserved.

AP® and SAT® are trademarks registered by the College Board, which is not affiliated with, and does not endorse this website.