Efficient special cases of Pattern Matching with Swaps

Amihood Amir, Gad M. Landau, Moshe Lewenstein, Noa Lewenstein

Research output: Contribution to journalArticlepeer-review

Abstract

Let a text string T of n symbols and a pattern string P of m symbols from alphabet Σ be given. A swapped version T′ of T is a length n string derived from T by a series of local swaps (i.e., t′ ← tℓ+1 and t′ℓ+1 ← tℓ) where each element can participate in no more than one swap. The Pattern Matching with Swaps problem is that of finding all locations i for which there exists a swapped version T′ of T where there is an exact matching of P at location i of T′. It was recently shown that the Pattern Matching with Swaps problem has a solution in time Q(nm1/3 log m log2 σ), where σ = min(|Σ|, m). We consider some interesting special cases of patterns, namely, patterns where there is no length-one run, i.e., there are no a, b, c ∈ Σ where b ≠ a and b ≠ c and where the substring abc appears in the pattern. We show that for such patterns the Pattern Matching with Swaps problem can be solved in time O(n log2 m).

Original languageEnglish
Pages (from-to)125-132
Number of pages8
JournalInformation Processing Letters
Volume68
Issue number3
DOIs
StatePublished - 15 Nov 1998

Bibliographical note

Funding Information:
portedb y NSF grant CCR-96-10170 and the Israel Ministry of Science and the Arts grants 6297 and 8560. On leave from Georgia Institute of Technology, College of Computing, Atlanta, GA 30332-0280, USA. ’ Emaib landauQpoly.edu. Partially supported by NSF grants CCR-9305873 and CCR-9610238. 2 Email: moshe@cs.biu.ac.il. 3 Email: noa@cs.biu.ac.il. Partially supported by the Israel Ministry of Science and the Arts grant 8560.

Keywords

  • Analysis of algorithms
  • Approximate pattern matching
  • Combinatorial algorithms on words
  • Design of algorithms
  • Generalized pattern matching
  • Pattern Matching with Swaps
  • Pattern matching

ASJC Scopus subject areas

  • Theoretical Computer Science
  • Signal Processing
  • Information Systems
  • Computer Science Applications

Fingerprint

Dive into the research topics of 'Efficient special cases of Pattern Matching with Swaps'. Together they form a unique fingerprint.

Cite this