Abstract

Let Σ={σ1,…,σn} be a permutation of the set [n]={1,…,n}. A subsequence σi1,…,σim of Σ is increasing (respectively decreasing) if σi1<…<σim (respectively σi1>…>σim). It is well known that any permutation of [n] contains an increasing or a decreasing subsequence of at least n elements. A classical proof of this result is the following [6]: To every σi assign the coordinates f(σi)=(xi,yi) on the plane, where xi is the length of a longest increasing subsequence of Σ ending at σi, and yi is the length of a longest decreasing subsequence of Σ starting at σi. Then it is easy to see that at least one point in f(Σ)={f(σi):i=1,…,n} has its x or y-coordinate greater than or equal to n. In this paper, we characterize the point sets S in N2 such that S=f(Σ) for some permutation Σ. Furthermore, given a set S of n points in N2, we give an O(nlog⁡n)-time algorithm to obtain, if it exists, a permutation Σ such that f(Σ)=S. Additionally, we show that by slightly modifying S, the permutation Σ always exists and can be found in O(nlog⁡n) time. Our results can be used, for example, to encrypt keywords by generating permutations from which the keywords can be recovered.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call