English

Hardness of Permutation Pattern Matching

Combinatorics 2016-08-02 v1 Discrete Mathematics Data Structures and Algorithms

Abstract

Permutation Pattern Matching (or PPM) is a decision problem whose input is a pair of permutations π\pi and τ\tau, represented as sequences of integers, and the task is to determine whether τ\tau contains a subsequence order-isomorphic to π\pi. Bose, Buss and Lubiw proved that PPM is NP-complete on general inputs. We show that PPM is NP-complete even when π\pi has no decreasing subsequence of length 3 and τ\tau has no decreasing subsequence of length 4. This provides the first known example of PPM being hard when one or both of π\pi and σ\sigma are restricted to a proper hereditary class of permutations. This hardness result is tight in the sense that PPM is known to be polynomial when both π\pi and τ\tau avoid a decreasing subsequence of length 3, as well as when π\pi avoids a decreasing subsequence of length 2. The result is also tight in another sense: we will show that for any hereditary proper subclass C of the class of permutations avoiding a decreasing sequence of length 3, there is a polynomial algorithm solving PPM instances where π\pi is from C and τ\tau is arbitrary. We also obtain analogous hardness and tractability results for the class of so-called skew-merged patterns. From these results, we deduce a complexity dichotomy for the PPM problem restricted to π\pi belonging to Av(ρ)Av(\rho), where Av(ρ)Av(\rho) denotes the class of permutations avoiding a permutation ρ\rho. Specifically, we show that the problem is polynomial when ρ\rho is in the set {1, 12, 21, 132, 213, 231, 312}, and it is NP-complete for any other ρ\rho.

Keywords

Cite

@article{arxiv.1608.00529,
  title  = {Hardness of Permutation Pattern Matching},
  author = {Vít Jelínek and Jan Kynčl},
  journal= {arXiv preprint arXiv:1608.00529},
  year   = {2016}
}

Comments

27 pages, 13 figures

R2 v1 2026-06-22T15:09:21.218Z