NFA diagram examples.
Same tool, four requests. Every drawing below is a real render.
Rather start from a finished drawing? Browse 40 state diagram templates →
What an NFA diagram is.
An NFA diagram is a state diagram for a nondeterministic finite automaton. Circles are states, arrows are transitions, an incoming arrow marks the start, and a double circle marks an accepting state.
Unlike a DFA, an NFA may take more than one transition on the same input symbol and may use epsilon transitions that consume no input. A string is accepted when at least one possible path finishes in an accepting state.
- Standard
- OMG UML 2.5.1 §14 + Harel (1987) statechart
- Engine
- schematex-state
- Editable
- Double-click text, drag nodes
- Export
- SVG · PNG · PDF
Who uses NFA diagrams.
Regular-language exercises that show how a machine recognizes a suffix, prefix or substring.
Small epsilon-NFA constructions that make a regular-expression union visible in class notes.
Alternative token prefixes drawn as branches before they are converted into an implementation.
How to make an NFA diagram in three steps.
Describe it
One paragraph is enough to start.
See the drawing
Drawn by the right engine.
Say what changes
Every edit keeps a version.
Common questions
What is an NFA?
A nondeterministic finite automaton is a finite-state machine that may have several possible transitions for one input symbol. It accepts when at least one path through the machine ends in an accepting state.
How is an NFA different from a DFA?
A DFA has one next state for each state and input symbol. An NFA can branch to several states and can include epsilon transitions, but NFAs and DFAs recognize the same class of regular languages.
What is an epsilon transition?
An epsilon transition changes state without consuming a character from the input. It is commonly used to join or split branches when building an NFA from a regular expression.
How are accepting states shown?
An accepting, or final, state is shown with a double circle. The machine accepts only if some path ends in that state after all input is read.
Can I make an NFA from a regular expression?
Yes. Describe the expression and its alphabet, then name any grouping or alternation you want to make explicit in the state diagram.
Other drawings for the same work.
Draw your first NFA now.
Free account, no card. Describe the language and see the state diagram in under a minute.
Open the editor