Overlap matching

  • Authors:
  • Amihood Amir;Richard Cole;Ramesh Hariharan;Moshe Lewenstein;Ely Porat

  • Affiliations:
  • Computer Science Department, Bar Ilan University, 52900 Ramat Gan, Israel and College of Computing, Georgia Tech, 801 Atlantic Drive, Atlanta, GA;Computer Science Department, Courant Institute of Mathematical Sciences, New York University, 251 Mercer St., New York, NY;CSA Department, Indian Institute of Science, Bangalore 560 012, India;IBM Thomas J. Watson Research Center, P.O. Box 218, Yorktown Heights, NY;Computer Science Department, Bar Ilan University, 52900 Ramat Gan, Israel

  • Venue:
  • Information and Computation
  • Year:
  • 2003

Quantified Score

Hi-index 0.00

Visualization

Abstract

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, such as intervals, are singled out. 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(nm1/3 log m log σ) for a general alphabet Σ, where σ = min(m, |Σ|). Our reduction provides a solution to the pattern matching with swaps problem in time O(n log m log σ).