Improved string matching with k mismatches

Recently, an efficient algorithm for such a problem has been devised by [2] . Its time performance i s 0(k(mlogm+n)) and it uses 0(k(m+n)) space. Here we present a compact version of their algorithm , achieving a time performance of 0(mlogm+kn) for general alphabets and of 0(m+kn) for alphabet s whose size is fixed . Our algorithm uses 0(m) space. The data structure that we use is the suffix tree [1] o f the pattern modified in order to support the static lowest common ancestor algorithm (LCA for short) given in [5] . In more recent versions of [2] the authors used the suffix tree for the problem of strin g matching with k differences [4] but not for the problem of string matching with k mismatches [3] .

[1]  Gad M. Landau,et al.  Efficient String Matching with k Mismatches , 2018, Theor. Comput. Sci..

[2]  Peter Weiner,et al.  Linear Pattern Matching Algorithms , 1973, SWAT.

[3]  Robert E. Tarjan,et al.  Fast Algorithms for Finding Nearest Common Ancestors , 1984, SIAM J. Comput..

[4]  Gad M. Landau,et al.  Efficient string matching in the presence of errors , 1985, 26th Annual Symposium on Foundations of Computer Science (sfcs 1985).