Skip to main navigation Skip to search Skip to main content

Pattern matching with swaps

  • Bar-Ilan University

Research output: Contribution to journalConference articlepeer-review

27 Scopus citations

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′l←tl+1 and t′l+1←tl) 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 in location i of T′. It has been an open problem whether swapped matching can be done in less than O(mn) time. In this paper we show the first algorithm that solves the pattern matching with swaps problem in time o(mn). We present an algorithm whose time complexity is O(nm1/3 log m log2 σ) for a general alphabet Σ, where σ = min(m, |Σ|).

Original languageEnglish
Pages (from-to)144-153
Number of pages10
JournalAnnual Symposium on Foundations of Computer Science - Proceedings
StatePublished - 1997
EventProceedings of the 1997 38th IEEE Annual Symposium on Foundations of Computer Science - Miami Beach, FL, USA
Duration: 20 Oct 199722 Oct 1997

Bibliographical note

Funding Information:
1A preliminary version of this paper appeared in FOCS 97. 2Partially supported by NSF grant CCR-96-10170, BSF grant 96-00509, and a BIU internal research grant. 3Partially supported by NSF grants CCR-9305873 and CCR-9610238 and by the Israel Science Foundation founded by the Israeli Academy of Sciences and Humanities. 4Partially supported by the Israel Ministry of Science and Arts Grant 8560.

Funding

1A preliminary version of this paper appeared in FOCS 97. 2Partially supported by NSF grant CCR-96-10170, BSF grant 96-00509, and a BIU internal research grant. 3Partially supported by NSF grants CCR-9305873 and CCR-9610238 and by the Israel Science Foundation founded by the Israeli Academy of Sciences and Humanities. 4Partially supported by the Israel Ministry of Science and Arts Grant 8560.

FundersFunder number
Israel Ministry of Science and Arts8560
Israeli Academy of Sciences and Humanities
National Science FoundationCCR-96-10170
Bloom's Syndrome FoundationCCR-9305873, CCR-9610238, 96-00509
Israel Science Foundation

    Fingerprint

    Dive into the research topics of 'Pattern matching with swaps'. Together they form a unique fingerprint.

    Cite this