A string matching algorithm returns parts of text matching a given pattern, such as a regular expression. Such algorithms have countless applications, from file editing to bioinformatics. Many algorithms compute deterministic finite automata, which can be expensive to build, but are usually efficient to use; they include the Knuth–Morris–Pratt algorithm and the Boyer–Moore algorithm, that build the automaton in time O(m) and O(m + s), respectively, where m is the length of the pattern and s the size of the alphabet, and match a text of length n in time O(n) in the worst case.
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2011 Springer Science+Business Media, LLC
About this entry
Cite this entry
(2011). String Matching Algorithm. In: Sammut, C., Webb, G.I. (eds) Encyclopedia of Machine Learning. Springer, Boston, MA. https://doi.org/10.1007/978-0-387-30164-8_791
Download citation
DOI: https://doi.org/10.1007/978-0-387-30164-8_791
Publisher Name: Springer, Boston, MA
Print ISBN: 978-0-387-30768-8
Online ISBN: 978-0-387-30164-8
eBook Packages: Computer ScienceReference Module Computer Science and Engineering