Computing the transition function

This can be done according to its definition, and takes $O(m^3\vert\Sigma\vert)$.

More clever versions can achieve $O(m\vert\Sigma\vert)$.

This brings the total running time for FINITE-AUTOMATON-MATCHER to $O(n + m\vert\Sigma\vert)$.

Actually, not too bad if pattern is small relative to the size of the text.


next up previous
Up: STRING MATCHING WITH FINITE Previous: Finite-Automaton-Matcher