On Complexity of the Subpattern Problem

  • Authors:
  • Shlomo Ahal;Yuri Rabinovich

  • Affiliations:
  • -;yuri@cs.haifa.ac.il

  • Venue:
  • SIAM Journal on Discrete Mathematics
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

We study various computational aspects of the problem of determining whether, given a (fixed) permutation $\pi$ on $k$ elements and an input permutation $\sigma$ on $n k$ elements, $\pi$ can be embedded in $\sigma$ in an order-preserving manner. Formally, the goal is to determine whether there exists a strictly increasing function $f$ from $[1,k]$ to $[1,n]$ which is order preserving, i.e., $f$ satisfies $\sigma(f(i)) \sigma(f(j))$ whenever $\pi(i) \pi(j)$. We call this decision problem the subpattern problem. The study falls into two parts. In the first part we develop and analyze an algorithmic paradigm for this problem. We introduce two naturally defined (related) permutation-complexity measures $C(\pi)$ and a somewhat finer $C^{\bf T}(\pi)$, and, we show that our algorithms run in time $O(n^{1 + C(\pi)})$ and $O(n^{2 \cdot C^{\bf T}(\pi)})$, respectively; i.e., the hardness of the problem crucially depends on the structure of $\pi$, as measured by $C(\pi)$ or by $C^{\bf T}(\pi)$. In the second part of the paper we study the above complexity measures. In particular, we show that in the general case, $C(\pi) \leq 0.47k + o(k)$. Thus, the time complexity of the subpattern problem is at most $O(n^{0.47k + o(k)})$, improving over the trivial $O(n^k)$. Unfortunately, it turns out that for most permutations $C^{\bf T}(\pi) = \Omega(k)$, and thus, in general, the upper bound on the running time cannot be significantly improved using this approach. Yet, for many natural classes of permutations the complexity of $C(\pi)$ is sublinear in $k$. To demonstrate this, we study two interesting classes of “linear” permutations and show that their complexity is $C(\pi) = O(\sqrt{k})$. In addition, we study some structural properties of the complexity measures, show that $C^{\bf T}(\pi) \leq C(\pi) \leq O(\log k) \cdot C^{\bf T}(\pi)$, and relate $C(\pi)$ and $C^{\bf T}(\pi)$ to the pathwidth and the treewidth of a certain graph $G_\pi$ defined by the permutation $\pi$.