State Transition Diagram
Create, edit, and test state machines interactively.
About This Simulation
This state transition diagram tool lets you draw states and labelled transitions, mark start and accepting states, and test how a machine moves between states.
Features
- Draw states and labelled transitions on a canvas
- Mark start and accepting (final) states
- Self-loops and multiple transitions between states
- Pan, zoom and fullscreen editing
Explanation
A state transition diagram is a graph that shows how a system moves between states. Circles are states, arrows are transitions labelled with the input that causes them, an incoming arrow marks the start state and a double circle marks an accepting state.
How it works
- Draw one circle for each state the system can be in.
- Draw an arrow from state A to state B for each input that moves the system from A to B, and label it with that input.
- Mark the start state with an incoming arrow and the accepting states with double circles.
- To trace an input, start at the start state and follow the arrow labelled with each symbol in turn.
- The same machine can be written as a state transition table with one row per state and one column per input.
Why it matters
State diagrams describe automata in CSE331, and also model real systems such as traffic lights, vending machines, protocols and user interfaces. They are part of the A Level Computer Science syllabus.
Frequently Asked Questions
What does a double circle mean in a state diagram?
A double circle marks an accepting (final) state. If the input ends while the machine is in that state, the input is accepted.
What is the difference between a state diagram and a state transition table?
They describe the same machine. A diagram shows states as circles and transitions as arrows; a table lists the next state for every combination of current state and input.
What is a finite state machine?
A model of computation with a finite number of states, a start state and transitions triggered by inputs. DFAs and NFAs are finite state machines that accept or reject strings.
What is a self-loop?
A transition that starts and ends in the same state, meaning that input does not change the state.
Topics covered
- State Transition Diagrams
- Finite State Machines
- States and Transitions
- Start and Accepting States
- State Transition Tables
Tags
- state diagram
- finite automaton
- states
- transitions
Related Simulations
Theory of Computation: Automata and Computability
DFA Simulator
Build, edit, and simulate strings in a DFA visualizer
Theory of Computation: Automata and Computability
CFG (Context Free Grammar) Simulator
Interactive Context-Free Grammar parser and derivation visualizer
Theory of Computation: Automata and Computability
NFA Simulator
Build, edit, and simulate strings in an NFA visualizer
Theory of Computation: Automata and Computability
TM (Turing Machine) Simulator
Design, edit, and run computations in an interactive Turing Machine simulator

