Commentz-Walter algorithm
In computer science, the Commentz-Walter algorithm is a string searching algorithm invented by Beate Commentz-Walter. Like the Aho–Corasick string matching algorithm, it can search for multiple patterns at once. It combines ideas from Aho–Corasick with the fast matching of the Boyer–Moore string-search algorithm. For a text of length n and maximum pattern length of m, its worst-case running time is O(mn), though the average case is often much better. GNU grep once implemented a string matching algorithm very similar to Commentz-Walter.
In computer science, the Commentz-Walter algorithm is a string searching algorithm invented by Beate Commentz-Walter. Like the Aho–Corasick string matching algorithm, it can search for multiple patterns at once. It combines ideas from Aho–Corasick with the fast matching of the Boyer–Moore string-search algorithm. For a text of length n and maximum pattern length of m, its worst-case running time is O(mn), though the average case is often much better. GNU grep once implemented a string matching algorithm very similar to Commentz-Walter.
References
- ^ Watson, Bruce William (1995-09-15). Taxonomies and toolkits of regular language algorithms . Eindhoven University of Technology . doi : 10.6100/IR444299 . ISBN 90-386-0396-7 . Wikipedia revision 1321675524, retrieved 2026-11-20 · 1795129200.0
- ^ "grep: remove Commentz-Walter code" . GNU grep . 2017-01-18 . Retrieved 2022-05-15 . Wikipedia revision 1321675524, retrieved 2026-11-20 · 1652569200.0
- ^ Dewasurendra, SD; Vidanagamachchi, SM (2018). "Average time complexity analysis of Commentz-Walter algorithm" . Journal of the National Science Foundation of Sri Lanka . 46 (4): 547– 557. doi : 10.4038/jnsfsr.v46i4.8630 . Wikipedia revision 1321675524, retrieved 2026-11-20 · 1795129200.0
- ^ a b c Akinul Islam Jony (2014). "Analysis of Multiple String Pattern Matching Algorithms" (PDF) . International Journal of Advanced Computer Science and Information Technology . 3 (4): 344– 353. ISSN 2296-1739 . Wikipedia revision 1321675524, retrieved 2026-11-20 · 1795129200.0
- ^ a b c Commentz-Walter, Beate (1979). A String Matching Algorithm Fast on the Average (PDF) . International Colloquium on Automata, Languages and Programming . LNCS . Vol. 71. Graz, Austria: Springer. pp. 118– 132. doi : 10.1007/3-540-09510-1_10 . ISBN 3-540-09510-1 . Archived from the original (PDF) on 2017-10-10. Wikipedia revision 1321675524, retrieved 2026-11-20 · 1795129200.0
- Commentz-Walter, Beate. A String Matching Algorithm Fast on the Average . · 1762815600.0
- grep: remove Commentz-Walter code . GNU . 2017-01-18. · 1762815600.0
- Akinul Islam Jony. Analysis of Multiple String Pattern Matching Algorithms . · 1762815600.0
Cite this
"Commentz-Walter algorithm". 1762902646. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1321675524 JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy