We consider approximate string matching of a circular pattern consisting of the rotations of a pattern of length m. From SBNDM and Tuned Shift-Add, we derive a sublinear-time algorithm for searching a noncircular pattern with k allowed mismatches, which is extended to the problem of approximate circular pattern matching with k mismatches. We prove that the presented algorithms are average-optimal for m⋅⌈log2(k+1)+1⌉ = O(w), where w is the size of the computer word in bits. Experiments conducted under the aforementioned condition show that the new k-mismatches algorithm for circular strings outperforms previous solutions in practice. In particular, our algorithm is the first nonfiltering method for approximate circular string matching in sublinear average time, which makes it more suitable than earlier filtering methods for high error levels k/m and small alphabets.
|Number of pages||12|
|Journal||ACM Journal of Experimental Algorithmics|
|Publication status||Published - Dec 2017|
|MoE publication type||A1 Journal article-refereed|
- approximate string matching, circular strings, bit-parallel automata