Content deleted Content added
Algorithmist (talk | contribs) Added dictionary suffix arcs to the diagram, changed text appropriately |
No edit summary |
||
Line 1:
In [[computer science]], the '''Aho–Corasick string matching algorithm''' is a [[string searching algorithm]] invented by [[Alfred V. Aho]] and
Informally, the algorithm constructs a [[finite state machine]] that resembles a [[trie]] with additional links between the various internal nodes. These extra internal links allow fast transitions between failed pattern matches (e.g. a search for <code>cat</code> in a trie that does not contain <code>cat</code>, but contains <code>cart</code>, and thus would fail at the node prefixed by <code>ca</code>), to other branches of the trie that share a common prefix (e.g., in the previous case, a branch for <code>attribute</code> might be the best lateral transition). This allows the automaton to transition between pattern matches without the need for backtracking.
|