Tools · A Level
Build a finite state machine by clicking to add states and shift-dragging to create transitions. Switch to Test mode to run an input string one symbol at a time and watch the execution trace. Free, no account needed. Covers AQA 7517 Section 3.2 and OCR H446.
A finite state machine is an abstract model of computation. It has a finite number of states, exactly one of which is active at any given moment, and it moves between those states in response to inputs according to a fixed set of transitions.
Every FSM has a start state, marked with an arrow coming from nowhere. A finite state automaton also has one or more accepting states, drawn as a double circle, which determine whether an input string is accepted or rejected.
This is the single most commonly examined skill on this topic, and the method never changes:
The string is accepted only if you have consumed every symbol and ended in an accepting state. Both conditions must hold. If at any point there is no valid transition for the symbol you are reading, the string is rejected immediately.
Marking this topic, the same handful of errors cost students marks year after year. They are all avoidable.
A state transition diagram and a state transition table hold identical information in different formats. The diagram draws states as circles and transitions as labelled arrows. The table lists every current-state-and-input pair with the resulting next state.
Exam questions ask you to convert between them in both directions, so practise both. Building a machine in the simulator above and then writing out its table by hand is a genuinely effective way to rehearse this.
Not every FSM simply accepts or rejects — some produce output. In a Mealy machine the output depends on the current state and the current input, so outputs are labelled on the transitions. In a Moore machine the output depends only on the current state, so outputs are written inside the states. AQA A Level expects you to recognise and work with both.
A finite state machine (FSM) is an abstract model of computation with a finite number of states, one of which is active at any moment. It changes state in response to inputs according to a defined set of transitions. An FSM has a start state and, in a finite state automaton, one or more accepting states that determine whether an input string is accepted.
They contain the same information in different forms. A state transition diagram shows states as circles and transitions as labelled arrows. A state transition table lists every current state and input combination alongside the resulting next state. Exam questions frequently ask you to convert one into the other, so practise both directions.
In a Mealy machine the output depends on both the current state and the current input, so outputs are written on the transitions. In a Moore machine the output depends only on the current state, so outputs are written inside the states. AQA A Level requires you to recognise and use both.
Start at the start state and follow one transition per input symbol, in order. The string is accepted only if you have consumed every symbol and finished in an accepting state. If at any point no valid transition exists for the current symbol, the string is rejected.
FSMs appear in AQA A Level Computer Science 7517 (Section 3.2, Theory of Computation) and OCR A Level H446. They are an A Level topic and do not appear at GCSE.