English

A Fast Algorithm for Permutation Pattern Matching Based on Alternating Runs

Data Structures and Algorithms 2015-03-17 v2 Computational Complexity Combinatorics

Abstract

The NP-complete Permutation Pattern Matching problem asks whether a kk-permutation PP is contained in a nn-permutation TT as a pattern. This is the case if there exists an order-preserving embedding of PP into TT. In this paper, we present a fixed-parameter algorithm solving this problem with a worst-case runtime of O(1.79run(T)nk)\mathcal{O}(1.79^{\mathsf{run}(T)}\cdot n\cdot k), where run(T)\mathsf{run}(T) denotes the number of alternating runs of TT. This algorithm is particularly well-suited for instances where TT has few runs, i.e., few ups and downs. Moreover, since run(T)<n\mathsf{run}(T)<n, this can be seen as a O(1.79nnk)\mathcal{O}(1.79^{n}\cdot n\cdot k) algorithm which is the first to beat the exponential 2n2^n runtime of brute-force search. Furthermore, we prove that under standard complexity theoretic assumptions such a fixed-parameter tractability result is not possible for run(P)\mathsf{run}(P).

Keywords

Cite

@article{arxiv.1204.5224,
  title  = {A Fast Algorithm for Permutation Pattern Matching Based on Alternating Runs},
  author = {Marie-Louise Bruner and Martin Lackner},
  journal= {arXiv preprint arXiv:1204.5224},
  year   = {2015}
}
R2 v1 2026-06-21T20:53:46.212Z