Pattern matching for permutations

https://doi.org/10.1016/S0020-0190(97)00209-3Get rights and content

Abstract

Given a permutation T of 1 to n, and a permutation P of 1 to k, for kn, we wish to find a k-element subsequence of T whose elements are ordered according to the permutation P. For example, if P is (1, 2, …, k), then we wish to find an increasing subsequence of length k in T; this special case was done in time O(n log log n) by Chang and Wang. We prove that the general problem is NP-complete. We give a polynomial time algorithm for the decision problem, and the corresponding counting problem, in the case that P is separable — i.e., contains neither the subpattern (3, 1, 4, 2) nor its reverse, the subpattern (2, 4, 1, 3).

References (17)

There are more references available in the full text version of this article.

Cited by (0)

Work supported in part by NSERC. A preliminary version appeared in: F. Dehne, J.-R. Sack, N. Santoro, S. Whitesides (Eds.), Algorithms and Data Structures, Lecture Notes in Computer Science, vol. 709, Springer, Berlin, 1993, pp. 200–209.

View full text