Optimal Narrowing of a Block of Sortings in Optimal Time

Let D be a totally ordered set. Call an n -block, a Cartesian product of n closed and possibly empty intervals of D. Let sort be the set of all 2n -tuples of elements of D of the form (x1,...,x2n) , where (xn+1,...,x2n) is the n -tuple obtained by sorting the elements of the n -tuple (x1,...,xn) in non-decreasing order. We present and justify an algorithm of complexity O(n log n) which, given a 2n -block a , computes a 2n -block which, by inclusion, is the smallest block containing the set sort a . We show that this complexity is optimal.