Abstract
The approximate string matching problem is to find all locations which a pattern of length m matches a substring of a text of length n with at most k differences. The program agrep is a simple and practical bit-vector algorithm for this problem. In this paper we consider the following incremental version of the problem: given an appropriate encoding of a comparison between A and bB, can one compute the answer for A and B, and the answer for A and Bc with equal efficiency, where b and c are additional symbols? Here we present an elegant and very easy to implement bit-vector algorithm for answering these questions that requires only O(n⌈m/w⌉) time, where n is the length of A, m is the length of B and w is the number of bits in a machine word. We also present an O(nm⌈h/w⌉) algorithm for the fixed-length approximate string matching problem: given a text t, a pattern p and an integer h, compute the optimal alignment of all substrings of p of length h and a substring of t.
Partially supported by a Marie Curie fellowship and NATO, Wellcome and Royal Society grants.
Partially supported by the C.N.R.S. Program “Génomes”.
Partially supported by an ORS studentship and EPSRC Project GR/L92150.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
R. A. Baeza-Yates and G. H. Gonnet, A new approach to text searching, CACM, Vol 35, (1992), pp. 74–82.
R. A. Baeza-Yates and G. Navarro, A faster algorithm for approximate string matching, in Proceedings of the 7th Symposium on Combinatorial Pattern Matching, LNCS, Vol. 1075, Springer-Verlag, New York, (1996), pp. 1–23.
R. A. Baeza-Yates and G. Navarro, Analysis for algorithm engineering: Improving an algorithm for approximate pattern matching. Unpublished manuscript.
Z. Galil and K. Park, An improved algorithm for approximate string matching, SI AM Journal on Computing, 19 (1990), pp. 989–999.
P. A. Hall and G. R. Dowling, Approximate string matching, Computing Surveys, Vol 12, (1980), pp. 381–402.
J. W. Hunt and T. G. Szymanski, An algorithm for differential file comparison, Comm. of the ACM, Vol 20, (1977), pp. 350–353.
G. M. Landau, E. Myers and J. P. Schmidt, Incremental string comparison, SIAM Journal on Computing 27,2 (1998), 557–582.
G. M. Landau and U. Vishkin, Fast string matching with k differences, Journal of Computer and Systems Sciences, 37 (1988), pp. 63–78.
M. Maes, On a cyclic string-to-string correction problem, in Info. Proc. Lett., Vol. 35, (1990), pp. 73–78.
W. J. Masek and M. S. Paterson, A Fast algorithm for computing string edit distances. in J. Comput. Sy. Sci., Vol. 20, (1980), pp. 18–31.
E. W. Myers, A Fast Bit-Vector Algorithm for Approximate String Matching Based on Dynamic Progamming, in Journal of the ACM 46,3 (1999) pp. 395–415.
S. B. Needleman and C. D. Wunsch, A general method applicable to the search for similarities in the amino acid sequence of the two proteins, in J. of Mol. Bio., Vol 48 (1970), pp. 443–453.
P.H. Seller, The theory and computation of evolutionary distances: Pattern recognition, in Journal of Algorithms, Vol 1, (1980), pp. 359–373.à.
T. F. Smith and M. S. Waterman, Identification of common molecular subsequences, in Journal of Molecular Biology, Vol 147, No. 2 (1981), pp. 195–197.
E. Ukkonen, Finding approximate patterns in strings, in J. of Algorithms, Vol 6, (1985), pp. 132–137.
R. A. Wangner and M. J. Fischer, The string-to-string correction problem, in J. of the ACM, Vol 21, No. 1 (1974), pp. 168–173.
A. H. Wright, Approximate string matching using within-word parallelism. in Soft. Pract. Exper., Vol 24, (1994), pp. 337–362.
S. Wu and U. Manber, Fast text searching allowing errors, CACM, Vol 35, (1992), pp. 83–91.
S. Wu, U. Manber and G. Myers, A subquadratic algorithm for approximate limited expression matching, in Algorithmica, Vol. 15, (1996), pp. 50–67.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2001 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Iliopoulos, C.S., Mouchard, L., Pinzon, Y.J. (2001). The Max-Shift Algorithm for Approximate String Matching. In: Brodal, G.S., Frigioni, D., Marchetti-Spaccamela, A. (eds) Algorithm Engineering. WAE 2001. Lecture Notes in Computer Science, vol 2141. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-44688-5_2
Download citation
DOI: https://doi.org/10.1007/3-540-44688-5_2
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-42500-7
Online ISBN: 978-3-540-44688-0
eBook Packages: Springer Book Archive