Pairwise sorting network


The pairwise sorting network is a sorting network discovered and published by Ian Parberry in 1992 in Parallel Processing Letters. The pairwise sorting network has the same size 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 :
  1. Sort consecutive pairwise bits of the input
  2. Sort all pairs into lexicographic order by recursively sorting all odd bits and even bits separately
  3. Sort the pairs in nondecreasing order using a specialized network