{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,10,7]],"date-time":"2026-10-07T21:07:26Z","timestamp":1791407246475,"version":"4.3.3"},"reference-count":54,"publisher":"Society for Industrial & Applied Mathematics (SIAM)","issue":"6","content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["SIAM J. Comput."],"published-print":{"date-parts":[[2003,1]]},"abstract":"<jats:p>\n                    Given two strings of size n over a constant alphabet, the classical algorithm for computing the similarity between two sequences [D. Sankoff and J. B. Kruskal, eds., {Time Warps, String Edits, and Macromolecules}; Addison-Wesley, Reading, MA, 1983; T. F. Smith and M. S. Waterman, { J.\\ Molec.\\ Biol., 147 (1981), pp. 195-197] uses a dynamic programming matrix and compares the two strings in O(n\n                    <jats:sup>2<\/jats:sup>\n                    ) time. We address the challenge of computing the similarity of two strings in subquadratic time for metrics which use a scoring matrix of unrestricted weights. Our algorithm applies to both {local} and {global} similarity computations. The speed-up is achieved by dividing the dynamic programming matrix into variable sized blocks, as induced by Lempel-Ziv parsing of both strings, and utilizing the inherent periodic nature of both strings. This leads to an $O(n^2 \/ \\log n)$, algorithm for an input of constant alphabet size. For most texts, the time complexity is actually $O(h n^2 \/ \\log n)$, where $h \\le 1$ is the entropy of the text. We also present an algorithm for comparing two {run-length} encoded strings of length m and n, compressed into m' and n' runs, respectively, in O(m'n + n'm) complexity. This result extends to all distance or similarity scoring schemes that use an additive gap penalty.\n                  <\/jats:p>","DOI":"10.1137\/s0097539702402007","type":"journal-article","created":{"date-parts":[[2003,11,17]],"date-time":"2003-11-17T21:00:45Z","timestamp":1069102845000},"page":"1654-1673","source":"Crossref","is-referenced-by-count":90,"title":["A Subquadratic Sequence Alignment Algorithm for Unrestricted Scoring Matrices"],"prefix":"10.1137","volume":"32","author":[{"given":"Maxime","family":"Crochemore","sequence":"first","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Gad M.","family":"Landau","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Michal","family":"Ziv-Ukelson","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"351","published-online":{"date-parts":[[2012,2,17]]},"reference":[{"key":"R1","unstructured":"O. Arbell, G. M. Landau, and J. Mitchell,\n                      Edit distance of run\u2010length encoded strings\n                      , Inform. Process. Lett., to appear."},{"key":"R2","doi-asserted-by":"publisher","DOI":"10.1007\/BF01840359"},{"key":"R3","doi-asserted-by":"crossref","unstructured":"A. Aggarwal and J. Park,\n                      Notes on searching in multidimensional monotone arrays\n                      , in Proceedings of the 29th IEEE Symposium on Foundations of Computer Science, White Plains, NY, 1988, pp. 497\u2013512.","DOI":"10.1109\/SFCS.1988.21966"},{"key":"R4","doi-asserted-by":"publisher","DOI":"10.1006\/jcss.1996.0023"},{"key":"R5","doi-asserted-by":"publisher","DOI":"10.1137\/0219066"},{"key":"R6","doi-asserted-by":"publisher","DOI":"10.1006\/jcom.1998.0493"},{"key":"R7","unstructured":"T. C. Bell, J. C. Cleary, and I. H. Witten,\n                      Text Compression\n                      , Prentice\u2013Hall, Englewood Cliffs, NJ, 1990."},{"key":"R8","doi-asserted-by":"publisher","DOI":"10.1016\/0304-3975(95)92848-R"},{"key":"R9","doi-asserted-by":"publisher","DOI":"10.1016\/0020-0190(95)00005-W"},{"key":"R10","doi-asserted-by":"publisher","DOI":"10.1089\/cmb.1994.1.271"},{"key":"R11","unstructured":"M. Crochemore, G. M. Landau, and M. Ziv\u2010Ukelson,\n                      A sub\u2010quadratic sequence alignment algorithm for unrestricted cost matrices\n                      , in Proceedings of the 13th ACM\u2010SIAM Symposium On Discrete Algorithms, San Francisco, 2002, pp. 679\u2013688."},{"key":"R12","doi-asserted-by":"publisher","DOI":"10.1016\/0304-3975(86)90041-1"},{"key":"R13","volume-title":"Text algorithms","author":"Crochemore Maxime","year":"1994"},{"key":"R14","doi-asserted-by":"publisher","DOI":"10.1109\/TIT.1975.1055349"},{"key":"R15","doi-asserted-by":"publisher","DOI":"10.1016\/0196-6774(90)90031-9"},{"key":"R16","doi-asserted-by":"crossref","unstructured":"D. Eppstein, Z. Galil, and R. Giancarlo,\n                      Speeding up dynamic programming\n                      , in Proceedings of the 29th IEEE Symposium on Foundations of Computer Science, White Plains, NY, 1988, pp. 488\u2013296.","DOI":"10.1109\/SFCS.1988.21965"},{"key":"R17","doi-asserted-by":"publisher","DOI":"10.1145\/146637.146656"},{"key":"R18","doi-asserted-by":"publisher","DOI":"10.1145\/146637.146658"},{"key":"R19","doi-asserted-by":"publisher","DOI":"10.1007\/PL00009202"},{"key":"R20","doi-asserted-by":"publisher","DOI":"10.1016\/0304-3975(89)90101-1"},{"key":"R21","doi-asserted-by":"publisher","DOI":"10.1016\/0020-0190(90)90215-J"},{"key":"R22","doi-asserted-by":"crossref","unstructured":"Leszek Ga\u00b8sieniec, Marek Karpinski, Wojciech Plandowski, Wojciech Rytter, Randomized efficient algorithms for compressed strings: the finger\u2010print approach (extended abstract), Lecture Notes in Comput. Sci., Vol. 1075, Springer, Berlin, 1996, 39\u2013491436872","DOI":"10.1007\/3-540-61258-0_3"},{"key":"R23","doi-asserted-by":"crossref","unstructured":"L. Gasieniec and W. Rytter,\n                      Almost optimal fully LZW compressed pattern matching\n                      , in proceedings of the Data Compression Conference, J. Storer, ed., 1999.","DOI":"10.1109\/DCC.1999.755681"},{"key":"R24","doi-asserted-by":"publisher","DOI":"10.1093\/oso\/9780195113679.001.0001"},{"key":"R25","doi-asserted-by":"publisher","DOI":"10.1017\/CBO9780511574931"},{"key":"R26","doi-asserted-by":"publisher","DOI":"10.1145\/360825.360861"},{"key":"R27","doi-asserted-by":"publisher","DOI":"10.1137\/0216043"},{"key":"R28","doi-asserted-by":"publisher","DOI":"10.1016\/0196-8858(91)90017-D"},{"key":"R29","doi-asserted-by":"publisher","DOI":"10.1137\/S0097539794262677"},{"key":"R30","doi-asserted-by":"crossref","unstructured":"Juha K\u00e4rkk\u00e4inen, Gonzalo Navarro, Esko Ukkonen, Approximate string matching over Ziv\u2010Lempel compressed text, Lecture Notes in Comput. Sci., Vol. 1848, Springer, Berlin, 2000, 195\u20132091789775","DOI":"10.1007\/3-540-45123-4_18"},{"key":"R31","unstructured":"J. Karkkainen and E. Ukkonen,\n                      Lempel\u2013Ziv parsing and sublinear\u2010size index structures for string matching\n                      , in Proceedings of the Third South American Workshop on String Processing (WSP \u201996), Recife, Brazil, 1996, N. Ziviani, R. Baeza\u2010Yates, and K. Guimaraes, eds., Carleton University Press, Montreal, 1996, pp. 141\u2013155."},{"key":"R32","doi-asserted-by":"crossref","unstructured":"T. Kida, M. Takeda, A. Shinohara, M. Miyazaki, and S. Arikawa,\n                      Shift\u2010And approach to pattern matching in LZW compressed text\n                      , in Proceedings of the 10th Annual Symposium on Combinatorial Pattern Matching, Jerusalem, 1999, Lecture Notes in Comput. Sci. 1645, Springer\u2010Verlag, New York, 1999, pp. 1\u201313.","DOI":"10.1007\/3-540-48452-3_1"},{"key":"R33","doi-asserted-by":"publisher","DOI":"10.1137\/0403009"},{"key":"R34","doi-asserted-by":"publisher","DOI":"10.1006\/jagm.2001.1191"},{"key":"R35","doi-asserted-by":"publisher","DOI":"10.1109\/TIT.1976.1055501"},{"key":"R36","first-page":"707","volume":"10","author":"Levenshtein V.","year":"1965","journal-title":"Soviet Physics Dokl."},{"key":"R37","doi-asserted-by":"publisher","DOI":"10.1016\/0196-6774(84)90021-X"},{"key":"R38","doi-asserted-by":"crossref","unstructured":"Veli M\u00e4kinen, Gonzalo Navarro, Esko Ukkonen, Approximate matching of run\u2010length compressed strings, Lecture Notes in Comput. Sci., Vol. 2089, Springer, Berlin, 2001, 31\u2013491904567","DOI":"10.1007\/3-540-48194-X_3"},{"key":"R39","unstructured":"U. Manber,\n                      A text compression scheme that allows fast searching directly in the compressed file\n                      , in Proceedings of the 5th Annual Symposium on Combinatorial Pattern Matching, Asilomar, CA, 2001, Lecture Notes in Comput. Sci. 807, Springer\u2010Verlag, New York, 2001, pp. 31\u201349."},{"key":"R40","doi-asserted-by":"publisher","DOI":"10.1016\/0022-0000(80)90002-1"},{"key":"R41","doi-asserted-by":"publisher","DOI":"10.1016\/S0092-8240(88)80016-8"},{"key":"R42","unstructured":"J. Mitchell,\n                      A Geometric Shortest Path Problem, with Application to Computing a Longest Common Subsequence in Run\u2010Length Encoded Strings\n                      , Technical report, Department of Applied Mathematics, SUNY Stony Brook, 1997."},{"key":"R43","unstructured":"G. Monge,\n                      D\u00e9blai et Remblai\n                      , M\u00e9moires de l\u2019Academie des Sciences, Paris, 1781."},{"key":"R44","doi-asserted-by":"crossref","unstructured":"G. Navarro, T. Kida, M. Takeda, A. Shinohara, and S. Arikawa,\n                      Faster approximate string matching over compressed text\n                      , Proceedings of the Data Compression Conference (DCC2001), 2001, IEEE Computer Society, Snowbird, UT, pp. 459\u2013468.","DOI":"10.1109\/DCC.2001.917177"},{"key":"R45","doi-asserted-by":"crossref","unstructured":"G. Navarro and M. Raffinot,\n                      A general practical approach to pattern matching over Ziv\u2013Lempel compressed text\n                      , in Proceedings of the 10th Annual Symposium on Combinatorial Pattern Matching, Warwick, UK, 1999, Lecture Notes in Comput. Sci. 1645, Springer\u2010Verlag, New York, 1999, pp. 14\u201336.","DOI":"10.1007\/3-540-48452-3_2"},{"key":"R46","doi-asserted-by":"crossref","unstructured":"Gonzalo Navarro, Jorma Tarhio, Boyer\u2010Moore string matching over Ziv\u2010Lempel compressed text, Lecture Notes in Comput. Sci., Vol. 1848, Springer, Berlin, 2000, 166\u20131801789773","DOI":"10.1007\/3-540-45123-4_16"},{"key":"R47","volume-title":"Time warps, string edits, and macromolecules: the theory and practice of sequence comparison","author":"Sankoff David","year":"1983"},{"key":"R48","doi-asserted-by":"publisher","DOI":"10.1137\/S0097539795288489"},{"key":"R49","doi-asserted-by":"crossref","unstructured":"Y. Shabita, T. Kida, S. Fukamachi, M. Takeda, A. Shinohara, T. Shinohara, and S. Arikawa,\n                      Speeding up pattern matching by text compression\n                      , in Proceedings of the 4th Italian Conference on Algorithms and Complexity (CIAC 2000), Rome, Lecture Notes in Comput. Sci. 1767, Springer\u2010Verlag, New York, 2000, pp. 306\u2013315.","DOI":"10.1007\/3-540-46521-9_25"},{"key":"R50","doi-asserted-by":"publisher","DOI":"10.1016\/0022-2836(81)90087-5"},{"key":"R51","doi-asserted-by":"publisher","DOI":"10.1016\/0304-3975(94)00298-W"},{"key":"R52","doi-asserted-by":"publisher","DOI":"10.1109\/MC.1984.1659158"},{"key":"R53","doi-asserted-by":"publisher","DOI":"10.1109\/TIT.1977.1055714"},{"key":"R54","doi-asserted-by":"publisher","DOI":"10.1109\/TIT.1978.1055934"}],"container-title":["SIAM Journal on Computing"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/epubs.siam.org\/doi\/pdf\/10.1137\/S0097539702402007","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,8,21]],"date-time":"2026-08-21T18:21:10Z","timestamp":1787336470000},"score":1,"resource":{"primary":{"URL":"https:\/\/epubs.siam.org\/doi\/10.1137\/S0097539702402007"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2003,1]]},"references-count":54,"journal-issue":{"issue":"6","published-print":{"date-parts":[[2003,1]]}},"alternative-id":["10.1137\/S0097539702402007"],"URL":"https:\/\/doi.org\/10.1137\/s0097539702402007","relation":{},"ISSN":["0097-5397","1095-7111"],"issn-type":[{"value":"0097-5397","type":"print"},{"value":"1095-7111","type":"electronic"}],"subject":[],"published":{"date-parts":[[2003,1]]}}}