Inhomogeneous sorting

The purpose of this paper is to consider a special kind of sorting problem in which a sequencea1 ...an is to be rearranged into an optimal order by interchanging pairs of adjacent elements, where certain pairs of elements are not allowed to commute with each other. Section 1 presents an informal example intended to clarify the nature of the problem, while Secs. 2 and 3 give some formal definitions and characterizations. Section 4 shows that the problem we are considering is equivalent to finding the lexicographically smallest topological sorting in a partial order.