Learn NFA implementation with interactive examples. Understand non-deterministic transitions, multiple paths, and NFA to DFA conversion.
A Non-deterministic Finite Automaton (NFA) is a finite state machine where for each state and input symbol, there can be zero, one, or multiple transitions to other states. This non-determinism allows for more flexible and compact representations of regular languages.
An NFA is formally defined as a 5-tuple (Q, Σ, δ, q₀, F) where:
NFA that accepts strings containing "01" over alphabet {0, 1}
| State | Input 0 | Input 1 |
|---|---|---|
| q₀ | {q₀, q₁} | {q₀} |
| q₁ | ∅ | {q₂} |
| q₂ | {q₂} | {q₂} |
Build your own NFA by defining states, transitions, and test strings
Test strings with visual step-by-step execution
Test multiple strings at once and see comprehensive results