Menu

© 2025 369 Tesla Private Limited

All Rights Reserved

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)

Move without reading input
Spontaneous state changes
ε-closure computation needed

Real-World Analogy

Express Lanes

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

0

Start
a*

ε
1

b*

ε
2

c*
ACCEPT

Transition Table
Stateabcε
0{0}{1, 2}
1{1}{2}
2{2}

String Processing: "abc"

a
b
c
Current States: {0}
Position: 0/3

Example Strings

"abc"
Accept

Follows the pattern a*b*c*

"aabbcc"
Accept

Multiple a's, b's, and c's in order

"aaabbbccc"
Accept

Extended pattern matching

"ac"
Accept

ε-transitions allow skipping b's

"bc"
Accept

ε-transitions allow skipping a's

"c"
Accept

Direct to final state via ε-transitions

"bac"
Reject

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