Approximated Pattern Matching with the L1 , L2 and L∞ Metrics

  • Authors:
  • Ohad Lipsky;Ely Porat

  • Affiliations:
  • Bar-Ilan University,;Bar-Ilan University,

  • Venue:
  • SPIRE '08 Proceedings of the 15th International Symposium on String Processing and Information Retrieval
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

Given an alphabet Σ ={1,2,...,|Σ |} text string T εΣ n and a pattern stringP ε Σ m , foreach i = 1,2,...,n - m + 1 defineL d (i ) as the d-normdistance when the pattern is aligned below the text and starts atposition i of the text. The problem of pattern matchingwith L p distance is to computeL p (i ) for every i = 1,2,...,n - m + 1. We discuss the problem ford = 1, ∞. First, in the case of L 1 matching (pattern matching with an L 1 distance) we present an algorithm that approximatesthe L 1 matching up to a factor of 1 +ε , which has an $O(\frac{1}{\varepsilon^2} n\logmlog |\Sigma|)$ run time. Second, we provide an algorithm thatapproximates the L ∞ matching up to afactor of 1 + ε with a run time of$O(\frac{1}{\varepsilon} n\log mlog |\Sigma|)$. We also generalizethe problem of String Matching with mismatches to have weightedmismatches and present an O (n log4m ) algorithm that approximates the results of this problemup to a factor of O (logm ) in the case that theweight function is a metric.