We say a permutation π "avoids" a pattern σ if no length |σ| subsequence of π is ordered in precisely the same way as σ. For example, π avoids (1, 2, 3) if it contains no increasing subsequence of length three. It was recently shown by Marcus and Tardos that the number of permutations of length n avoiding any fixed pattern is at most exponential in n. This suggests the possibility that if π is known a priori to avoid a fixed pattern, it may be possible to sort π in as little as linear time. Fully resolving this possibility seems very challenging, but in this paper, we demonstrate a large class of patterns σ for which σ-avoiding permutations can be sorted in O(n log log log n) time.
展开▼