Pattern matching in pseudo real-time

It has recently been shown how to construct online, non-amortised approximate pattern matching algorithms for a class of problems whose distance functions can be classified as being local. Informally, a distance function is said to be local if for a pattern P of length m and any substring T[i,i+m-1] of a text T, the distance between P and T[i,i+m-1] can be expressed as @?"j@D(P[j],T[i+j]), where @D is any distance function between individual characters. We show in this work how to tackle online approximate matching when the distance function is non-local. We give new solutions which are applicable to a wide variety of matching problems including function and parameterised matching, swap matching, swap-mismatch, k-difference, k-difference with transpositions, overlap matching, edit distance/LCS and L"1 and L"2 rearrangement distances. The resulting online algorithms bound the worst case running time per input character to within a log factor of their comparable offline counterpart.

[1]  Uzi Vishkin,et al.  Fast String Matching with k Differences , 1988, J. Comput. Syst. Sci..

[2]  S. Muthukrishnan,et al.  Alphabet Dependence in Parameterized Matching , 1994, Inf. Process. Lett..

[3]  Donald E. Knuth,et al.  Fast Pattern Matching in Strings , 1977, SIAM J. Comput..

[4]  Steven Skiena,et al.  Pattern matching with address errors: rearrangement distances , 2006, SODA '06.

[5]  Michael J. Fischer,et al.  Fast on-line integer multiplication , 1973, STOC '73.

[6]  Moshe Lewenstein,et al.  Overlap matching , 2001, SODA '01.

[7]  Vladimir I. Levenshtein,et al.  Binary codes capable of correcting deletions, insertions, and reversals , 1965 .

[8]  Raphaël Clifford,et al.  Self-normalised Distance with Don't Cares , 2007, CPM.

[9]  Esko Ukkonen,et al.  Algorithms for Approximate String Matching , 1985, Inf. Control..

[10]  Zvi Galil,et al.  String Matching in Real Time , 1981, JACM.

[11]  Gad M. Landau,et al.  Incremental String Comparison , 1998, SIAM J. Comput..

[12]  Moshe Lewenstein,et al.  Function Matching , 2006, SIAM J. Comput..

[13]  Ely Porat,et al.  A black box for online approximate pattern matching , 2008, Inf. Comput..

[14]  Gad M. Landau,et al.  A sub-quadratic sequence alignment algorithm for unrestricted cost matrices , 2002, SODA '02.

[15]  Ely Porat,et al.  Swap and mismatch edit distance , 2004, Algorithmica.

[16]  Eugene W. Myers,et al.  Suffix arrays: a new method for on-line string searches , 1993, SODA '90.

[17]  Gad M. Landau,et al.  A Subquadratic Sequence Alignment Algorithm for Unrestricted Scoring Matrices , 2003, SIAM J. Comput..