For the basics of sorting networks, see Chapter 28 of Cormen, Leiserson, and Rivest (1990). A perfect halver is a comparator network with output wires split into blocks BL, BR of equal sizes in such a way that, given any input consisting of a distinct keys, the network places the a/2 smaller keys in BL and it places the a/2 larger keys in BR. Perfect halvers may be used as modules to construct a sorting network with N wires such that N = 2 for some positive integer d. This network is a series composition of networks N0, N1, . . . , Nd−1 such that each Nt is a parallel composition of 2 perfect halvers of equal sizes; the 2d−t output wires of each perfect halver in Nt are split into two blocks of equal sizes and each of these blocks carries the input of a perfect halver in Nt+1. Unfortunately, this scheme yields sorting networks of depth Ω((logN)): every perfect halver with a wires must have depth greater than lg(a/2). (To see this, consider an output wire y in BR and let X denote the set of all the input wires from which a key can travel to y. We must have |X| > a/2: otherwise placing keys 1, 2, . . . |X| on the wires in X and placing keys |X|+ 1, |X|+ 2, . . . a on the remaining a− |X| input wires yields an input that sends one of the a/2 smaller keys to the output wire y.) Fortunately, Ajtai, Komlós, and Szemerédi (1983a, 1983b) proved that a variation on this theme yields sorting networks of depthO(logN) : instead of the perfect halvers, we can use weaker modules of constant depth, whose weakness is made up for by a more intricate way of piecing the network together.
Jenq-Kuen Lee合作论文数Programming Language Research Lab15