Finite Automata
ε-NFA Simulator
Simulate and test nondeterministic finite automata with epsilon transitions
NFA with ε-Transitions
NFAs with epsilon transitions can move without consuming input symbols
NFA with ε-Transitions (NFA-ε) ⚡
Free moves without consuming input - like express lanes in computation
NFA-ε Characteristics
ε-Transitions (Epsilon Moves)
Real-World Analogy
Like express lanes in traffic or fast-pass lines at theme parks - you can skip steps without extra cost or time
ε-Closure Computation
ε-closure(0)
Starting from state 0:
{0, 1, 2}
Can reach 1 and 2 via ε-moves
ε-closure(1)
Starting from state 1:
{1, 2}
Can reach 2 via ε-move
ε-closure(2)
Starting from state 2:
{2}
No ε-transitions from 2
Interactive NFA-ε Simulator
Pattern: a*b*c* (zero or more a's, followed by zero or more b's, followed by zero or more c's)
NFA-ε State Diagram
Start
a*
b*
c*
ACCEPT
Transition Table
| State | a | b | c | ε |
|---|---|---|---|---|
| 0 | {0} | ∅ | ∅ | {1, 2} |
| 1 | ∅ | {1} | ∅ | {2} |
| 2 | ∅ | ∅ | {2} | ∅ |
String Processing: "abc"
Example Strings
Follows the pattern a*b*c*
Multiple a's, b's, and c's in order
Extended pattern matching
ε-transitions allow skipping b's
ε-transitions allow skipping a's
Direct to final state via ε-transitions
Wrong order - b before a
Applications of NFA-ε
Regular Expression Engines
NFA-ε is used to implement regular expressions with features like:
- • Optional patterns (a?)
- • Kleene star (a*)
- • Union operations (a|b)
- • Grouping ((ab)*)
Compiler Design
Used in lexical analysis for:
- • Token recognition
- • Keyword identification
- • Comment handling
- • String literal parsing