The Aho/Corasick String Matching Automaton
An Aho/Corasick String Matchin Automaton for a given finite set P of
patterns is a (deterministic) finite automaton G accepting the
set of all words containing a word of P as a suffix.
G consists of the following components:
- finite set Q of states
- finite alphabeth A
-
transition function g: Q × A -> Q + {fail}
-
failure function h: Q -> Q + {fail}
- initial state q0 in Q
- a set F of final states
Example: P = {ab, ba, babb, bb}

Aho/Corasick String Matching Automaton.