Overview
NFA simulation advances a set of active states over each input symbol, including epsilon transitions where needed.
Matches input by tracking all possible nondeterministic automaton states.
Compact metadata for implementation and discovery.
NFA simulation advances a set of active states over each input symbol, including epsilon transitions where needed.
Quick facts
Runtime and memory behavior at a glance.
Best
O(n)
Average
O(input_length * states)
Worst
O(input_length * states)
Space
O(states)
S_next = epsilon_closure(move(S, char))Computes all states reachable after consuming one symbol.
Show grammar items, parser states, and consumed input as parsing progresses.
NFA Simulation should be used with the assumptions and tradeoffs of automata Simulation in mind.
What each reference supports for this entry.
Automata textbook support for NFA Simulation's state-machine construction, language recognition, and correctness model.
Good next jumps from the relationship graph, ranked for useful discovery.
NFA simulation and DFA construction are alternative execution strategies for regular expressions.