Finite State Machine Simulator
One transition per line, e.g. q0,0,q0 or q0 -0-> q0 or q0 0 -> q1. NFA targets may be several, written {q1,q2} or q1|q2; epsilon may be e, eps, epsilon, ε or @.
Machine type:
Input format:
Start state:
Accept states:
Test string:
Strings to test:
Alphabet:
Max length:
Trace:
Transition table:
:
Separator:
Calculation Result
Download CSV
| No. | Result | State | Details |
|---|
Introduction to the tool and how to use it
Online finite state machine (FSM) simulator: paste a transition table into the input box to simulate both DFA and NFA; results appear as a table and plain text, ready to copy or export as CSV.
Input format (one transition per line; all three styles are supported and detected automatically by default):
1.
2.
3.
Key parameters: choose DFA or NFA as the machine type; for NFA several target states may be written using
Results have three parts: a normalized transition table (same state-plus-symbol merges into one line, all targets listed), the step-by-step transition trace (NFA shown as a state set), and the test result (accepted or not, terminal state set). The summary area also gives the state set, alphabet, initial state, final states, determinism check, and reachability analysis.
Two notes: when the same state plus symbol has multiple targets it is not a DFA, and the tool warns explicitly instead of silently taking the first; an undefined transition is treated as entering a dead state and marked clearly, and a symbol outside the alphabet in the test string triggers a separate notice.
Input format (one transition per line; all three styles are supported and detected automatically by default):
1.
q0,0,q0 (comma separated);2.
q0 -0-> q0, q0 -a-> q1 (arrow style; symbol may be empty);3.
q0 0 -> q1 (space plus arrow).Key parameters: choose DFA or NFA as the machine type; for NFA several target states may be written using
{q1,q2} or q1|q2. The initial state defaults to the source state of the first transition. Enter final states as a comma-separated list; leave it empty when there are none. Enter one concrete string to test; alternatively choose enumerate all short strings to auto-generate from the alphabet and max length. Empty-transition symbols supported: ε, eps, @.Results have three parts: a normalized transition table (same state-plus-symbol merges into one line, all targets listed), the step-by-step transition trace (NFA shown as a state set), and the test result (accepted or not, terminal state set). The summary area also gives the state set, alphabet, initial state, final states, determinism check, and reachability analysis.
Two notes: when the same state plus symbol has multiple targets it is not a DFA, and the tool warns explicitly instead of silently taking the first; an undefined transition is treated as entering a dead state and marked clearly, and a symbol outside the alphabet in the test string triggers a separate notice.
How to use
- Paste the transitions line by line into the input box.
- Choose the machine type and input format, and fill in the initial state, final states, test string, and other parameters.
- Click Run.
- Review the transition table, simulation trace, and test result, then copy or export.
Message board
All messages →-
No one has spoken up yet — want to go first?