Jump to content

Pairwise sorting network

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Barbarr (talk | contribs) at 05:53, 22 June 2020 (Add information about sorting procedure). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Pairwise sorting network
Visualization of the Pairwise sorting network with 16 inputs
Visualization of the Pairwise sorting network with 16 inputs
ClassSorting algorithm
Data structureArray
Worst-case performance parallel time
Worst-case space complexity non-parallel time
OptimalNo

The pairwise sorting network is a sorting network discovered and published by Ian Parberry in 1992 in Parallel Processing Letters.[1] The pairwise sorting network has the same size (number of comparators) and depth as the odd–even mergesort network. At the time of publication, the network was one of several known networks with a depth of . It requires comparators and has depth .

The sorting procedure implemented by the network is as follows (guided by the zero-one principle):

  1. Sort consecutive pairwise bits of the input (corresponds to the first layer of the diagram)
  2. Sort all pairs into lexicographic order by recursively sorting all odd bits and even bits separately (corresponds to the next 14 layers of the diagram)
  3. Sort the pairs in nondecreasing order using a specialized network (corresponds to the final layers of the diagram)

References

  1. ^ Parberry, Ian (1992), "The Pairwise Sorting Network" (PDF), Parallel Processing Letters, 2 (2, 3): 205–211