Overlap Matching
Amihood Amir, Richard Cole, Ramesh Hariharan, Moshe Lewenstein, Ely Porat

Proceedings of the Twelth Annual ACM-SIAM Symposium on Discrete Algorithms, 2001.

We propose a new paradigm for string matching, namely structural matching. In structural matching, the text and pattern contents are not important. Rather, some areas in the text and pattern are singled out, intervals for example. A "match" is a text location where a specified relation between the text and pattern areas is satisfied.

In particular, we define the structural matching problem of Overlap (Parity) Matching. We seek the text locations where all overlaps of the given pattern and text intervals have even length. We show that this problem can be solved in time O(n log m), where the text length is n and the pattern length is m.

As an application of overlap matching, we show how to reduce the String Matching with Swaps problem to the overlap matching problem. The String Matching with Swaps problem is the problem of string matching in the presence of local swaps. The best deterministic upper bound known for this problem was O(nm^{1/3}log m log s) for a general alphabet Sigma, where s=min(m, Sigma).

Our reduction provides a solution to the pattern matching with swaps problem in time O(n log m log s).

postscript of full paper