Average-optimal single and multiple approximate string matching

We present a new algorithm for multiple approximate string matching. It is based on reading backwards enough l-grams from text windows so as to prove that no occurrence can contain the part of the window read, and then shifting the window.We show analytically that our algorithm is optimal on average. Hence our first contribution is to fill an important gap in the area, since no average-optimal algorithm existed for multiple approximate string matching.We consider several variants and practical improvements to our algorithm, and show experimentally that they are resistant to the number of patterns and the fastest for low difference ratios, displacing the long-standing best algorithms. Hence our second contribution is to give a practical algorithm for this problem, by far better than any existing alternative in many cases of interest. On real-life texts, our algorithm is especially interesting for computational biology applications.In particular, we show that our algorithm can be successfully used to search for one pattern, where many more competing algorithms exist. Our algorithm is also average-optimal in this case, being the second after that of Chang and Marr. However, our algorithm permits higher difference ratios than Chang and Marr, and this is our third contribution.In practice, our algorithm is competitive in this scenario too, being the fastest for low difference ratios and moderate alphabet sizes. This is our fourth contribution, which also answers affirmatively the question of whether a practical average-optimal approximate string-matching algorithm existed.

[1]  Craig A. Stewart,et al.  Introduction to computational biology , 2005 .

[2]  Eugene L. Lawler,et al.  Sublinear approximate string matching and biological applications , 1994, Algorithmica.

[3]  Wojciech Plandowski,et al.  Speeding up two string-matching algorithms , 2005, Algorithmica.

[4]  Gonzalo Navarro,et al.  Average complexity of exact and approximate multiple string matching , 2004, Theor. Comput. Sci..

[5]  Gonzalo Navarro,et al.  Improved Single and Multiple Approximate String Matching , 2004, CPM.

[6]  Gonzalo Navarro,et al.  Increased Bit-Parallelism for Approximate String Matching , 2004, WEA.

[7]  Kimmo Fredriksson Row-wise Tiling for the Myers' Bit-Parallel Approximate String Matching Algorithm , 2003, SPIRE.

[8]  Gonzalo Navarro,et al.  Average-Optimal Multiple Approximate String Matching , 2003, CPM.

[9]  Gonzalo Navarro,et al.  Faster Bit-Parallel Approximate String Matching , 2002, CPM.

[10]  Gonzalo Navarro,et al.  Flexible Pattern Matching in Strings: Practical On-Line Search Algorithms for Texts and Biological Sequences , 2002 .

[11]  Gonzalo Navarro,et al.  New and faster filters for multiple approximate string matching , 2002, Random Struct. Algorithms.

[12]  Gonzalo Navarro,et al.  Improving an Algorithm for Approximate Pattern Matching , 2001, Algorithmica.

[13]  Gonzalo Navarro,et al.  A guided tour to approximate string matching , 2001, CSUR.

[14]  Gonzalo Navarro,et al.  Fast and flexible string matching by combining bit-parallelism and suffix automata , 2000, JEAL.

[15]  Shane S. Sturrock,et al.  Time Warps, String Edits, and Macromolecules – The Theory and Practice of Sequence Comparison . David Sankoff and Joseph Kruskal. ISBN 1-57586-217-4. Price £13.95 (US$22·95). , 2000 .

[16]  Erkki Sutinen,et al.  Indexing text with approximate q-grams , 2000, J. Discrete Algorithms.

[17]  GONZALO NAVARRO,et al.  New Models and Algorithms for Multidimensional Approximate Pattern Matching , 2000 .

[18]  Ricardo A. Baeza-Yates,et al.  Very Fast and Simple Approximate String Matching , 1999, Inf. Process. Lett..

[19]  Gonzalo Navarro,et al.  Faster Approximate String Matching , 1999, Algorithmica.

[20]  Eugene W. Myers,et al.  A fast bit-vector algorithm for approximate string matching based on dynamic programming , 1998, JACM.

[21]  Esko Ukkonen,et al.  A Comparison of Approximate String Matching Algorithms , 1996, Softw. Pract. Exp..

[22]  Udi Manber,et al.  Approximate Multiple Strings Search , 1996, CPM.

[23]  Erkki Sutinen,et al.  Filtration with q-Samples in Approximate String Matching , 1996, CPM.

[24]  U. Manber,et al.  APPROXIMATE MULTIPLE STRING SEARCH , 1996 .

[25]  Wojciech Rytter,et al.  Text Algorithms , 1994 .

[26]  Thomas G. Marr,et al.  Approximate String Matching and Local Similarity , 1994, CPM.

[27]  Eugene H. Spafford,et al.  A pattern-matching model for intrusion detection , 1994 .

[28]  Andrew Tomkins,et al.  On the Searchability of Electronic Ink , 1994 .

[29]  Esko Ukkonen,et al.  Approximate Boyer-Moore String Matching , 1993, SIAM J. Comput..

[30]  Karen Kukich,et al.  Techniques for automatically correcting words in text , 1992, CSUR.

[31]  Dave Elliman,et al.  A review of segmentation and contextual analysis techniques for text recognition , 1990, Pattern Recognit..

[32]  Fabrizio Luccio,et al.  Simple and Efficient String Matching with k Mismatches , 1989, Inf. Process. Lett..

[33]  Esko Ukkonen,et al.  Finding Approximate Patterns in Strings , 1985, J. Algorithms.

[34]  David Sankoff,et al.  Time Warps, String Edits, and Macromolecules: The Theory and Practice of Sequence Comparison , 1983 .

[35]  Peter H. Sellers,et al.  The Theory and Computation of Evolutionary Distances: Pattern Recognition , 1980, J. Algorithms.

[36]  R. Nigel Horspool,et al.  Practical fast searching in strings , 1980, Softw. Pract. Exp..

[37]  Andrew Chi-Chih Yao,et al.  The Complexity of Pattern Matching for a Random String , 1977, SIAM J. Comput..