Loading 3D engine…
State diagram
Current state
Credit
Checks
Current state
Same pattern as a regular expression
Regular expression says
Mealy machine: outputs on the arrows
Moore machine: outputs in the states
Trace
A drink costs 30. Coins are worth 10 or 20.
The Moore machine also gives an output for its start state, before any coin.
Guard state machine
Current state
Distance to you
Inputs now
Power-up left
Finite machine: counts to 3
Stack
Are the brackets balanced?
Open brackets now
Deepest point so far
Finite machine says
Stack says
Each state of the finite machine stands for one count. With 3 counting states it cannot tell 4 open brackets from 40. The stack grows as far as it needs.