Thompson's construction, also called the McNaughton-Yamada-Thompson algorithm, is a method of transforming a regular expression into an equivalent nondeterministic finite automaton, or NFA. The resulting NFA can then be used to match strings against the regular expression. The algorithm is credited to Ken Thompson. Text processing utilities describe advanced search patterns with regular expressions, but NFAs are better suited to execution on a computer, so the construction is of practical interest as a way to compile regular expressions into automata. In theory it forms part of the proof that regular expressions and nondeterministic finite automata accept exactly the same languages, the regular languages. An NFA built this way can be made deterministic by the powerset construction and then minimized to an optimal automaton, and two regular expressions describe the same language exactly when their minimal deterministic automata agree up to renaming of states. An NFA may also be interpreted directly without conversion.
Facts
Time Complexity
Time Complexity (category) Connections
Credited To
Source Thompson's construction (Wikipedia)
In Field
Source Thompson's construction (Wikipedia)
Invented
Source Thompson's construction (Wikipedia)
Uses Design Technique
Source Thompson's construction (Wikipedia)
Sources
1. Thompson's construction (Wikipedia)
The algorithm [complexity-category]
a Thompson NFA can do pattern matching in linear time, assuming a fixed-size alphabet
In Group: Formal Languages and Automata Theory, Lead
is a method of transforming a regular expression into an equivalent nondeterministic finite automaton (NFA)
Credited To: Ken Thompson, Lead [credited-to]
This algorithm is credited to Ken Thompson.
Invented: Ken Thompson, Lead
This algorithm is credited to Ken Thompson.
In Field: Theory of Computation, Lead [in-field]
is a method of transforming a regular expression into an equivalent nondeterministic finite automaton (NFA)
Uses Design Technique: Divide and Conquer, The algorithm
The algorithm works recursively by splitting an expression into its constituent subexpressions
View the SourceReader Challenges (0)
No disputes yet. Spotted an error or a better source? Open the first one.
Sign in to dispute this or suggest a correction.