{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,9,21]],"date-time":"2026-09-21T05:01:02Z","timestamp":1789966862727,"version":"4.0.1"},"reference-count":23,"publisher":"Society for Industrial & Applied Mathematics (SIAM)","issue":"3","content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["SIAM J. Comput."],"published-print":{"date-parts":[[1992,6]]},"abstract":"<jats:p>It is shown that, for any pattern of length m and for any text of length n, it is possible to find all occurrences of the pattern in the text in overall linear time and at most $\\frac{4}{3}n - \\frac{1}{3}m$ character comparisons. In fact, the bound on the number of character comparisons is usually tighter than this, for the bound is expressed in terms of the structure of the pattern. The algorithm here need not have any knowledge of the alphabet. This improves the best previous bound of $1.5n-.5(m - 1)$ obtained by Colussi [Inform. and Comput., to appear] and Apostolico and Crochemore [Tech. Report TR89-75, LITP, Universit\u00e9 de Paris, Paris, France, 1989]. In a companion paper [SIAM J. Comput., 20 (1991), pp. 1008\u20131020], the authors show a lower bound for on-line algorithms that is equal to $\\frac{4}{3}n - \\frac{1}{3}m$ for $m = 3$. For $m = 1,2,n$ character comparisons is optimal. This algorithm is based on a new analysis of the string matching algorithm by Colussi. Moreover, this new analysis of Colussi\u2019s algorithm confirms the experimental results showing that his algorithm performs very well in practice [Inform. and Comput., to appear].<\/jats:p>","DOI":"10.1137\/0221028","type":"journal-article","created":{"date-parts":[[2005,2,24]],"date-time":"2005-02-24T06:38:23Z","timestamp":1109227103000},"page":"407-437","source":"Crossref","is-referenced-by-count":32,"title":["On the Exact Complexity of String Matching: Upper Bounds"],"prefix":"10.1137","volume":"21","author":[{"given":"Zvi","family":"Galil","sequence":"first","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Raffaele","family":"Giancarlo","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"351","published-online":{"date-parts":[[2006,7,31]]},"reference":[{"key":"R1","volume-title":"The design and analysis of computer algorithms","author":"Aho Alfred V.","year":"1975"},{"key":"R2","unstructured":"A. Apostolico, M. Crochemore,  Optimal canonization of all substrings of a string, Tech. Report, TR 89-75, LITP, Universit\u00e9 de Paris 7, Paris, France,  1989, October"},{"key":"R3","doi-asserted-by":"publisher","DOI":"10.1137\/0215007"},{"key":"R4","doi-asserted-by":"crossref","unstructured":"S. W. Bent, J. W. John,  Finding the median requires  $2n$ comparisons,  Proc. 17th Symposium on Theory of Computing, Association for Computing Machinery,  1985,  213\u2013216","DOI":"10.1145\/22145.22169"},{"key":"R5","doi-asserted-by":"publisher","DOI":"10.1145\/359842.359859"},{"key":"R6","unstructured":"Richard Cole,  Tight bounds on the complexity of the Boyer-Moore string matching algorithm,  Proceedings of the Second Annual ACM-SIAM Symposium on Discrete Algorithms (San Francisco, CA, 1991), ACM, New York,  1991,  224\u2013233 1 095 8370800.68505"},{"key":"R7","doi-asserted-by":"publisher","DOI":"10.1016\/0890-5401(91)90046-5"},{"key":"R8","unstructured":"M. Crochemore, D. Perrin,  Two way pattern matching, Tech. Report, Dept. of Computer Science, Universit\u00e9 de Paris, Paris, France,  1989"},{"key":"R9","doi-asserted-by":"publisher","DOI":"10.1080\/00029890.1959.11989306"},{"key":"R10","doi-asserted-by":"publisher","DOI":"10.1145\/359146.359148"},{"key":"R11","doi-asserted-by":"publisher","DOI":"10.1137\/0220063"},{"key":"R12","unstructured":"R. Giancarlo, Ph.D. Thesis,  Efficient Algorithms on Strings, Dept. of Computer Science, Columbia University, New York,  1990"},{"key":"R13","doi-asserted-by":"publisher","DOI":"10.1137\/0209051"},{"key":"R14","unstructured":"D. G. Kirkpatrick,  Topics in the complexity of combinatorial algorithms, Tech. Report, Dept. of Computer Science, University of Toronto, Toronto, Canada,  1974"},{"key":"R15","doi-asserted-by":"publisher","DOI":"10.1145\/322234.322245"},{"key":"R16","first-page":"557","volume":"5","author":"Kislisyn S. S.","year":"1964","journal-title":"Sibirsk. Mat. \u017d."},{"key":"R17","volume-title":"The art of computer programming. Volume 3","author":"Knuth Donald E.","year":"1973"},{"key":"R18","doi-asserted-by":"publisher","DOI":"10.1137\/0206024"},{"key":"R19","doi-asserted-by":"publisher","DOI":"10.1307\/mmj\/1028998766"},{"key":"R20","doi-asserted-by":"publisher","DOI":"10.1145\/361405.361423"},{"key":"R21","doi-asserted-by":"publisher","DOI":"10.1016\/S0022-0000(76)80029-3"},{"key":"R22","first-page":"154","volume":"7","author":"Schreier J.","year":"1932","journal-title":"Mathesis Polska"},{"key":"R23","doi-asserted-by":"publisher","DOI":"10.1145\/360336.360339"}],"container-title":["SIAM Journal on Computing"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/epubs.siam.org\/doi\/pdf\/10.1137\/0221028","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,8,21]],"date-time":"2026-08-21T18:48:54Z","timestamp":1787338134000},"score":1,"resource":{"primary":{"URL":"https:\/\/epubs.siam.org\/doi\/10.1137\/0221028"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[1992,6]]},"references-count":23,"journal-issue":{"issue":"3","published-print":{"date-parts":[[1992,6]]}},"alternative-id":["10.1137\/0221028"],"URL":"https:\/\/doi.org\/10.1137\/0221028","relation":{},"ISSN":["0097-5397","1095-7111"],"issn-type":[{"value":"0097-5397","type":"print"},{"value":"1095-7111","type":"electronic"}],"subject":[],"published":{"date-parts":[[1992,6]]}}}