We give a sorting network with cn log n comparisons. The algorithm can be performed in c log n parallel steps as well, where in a parallel step we compare n/2 disjoint pairs. In the i-th step of the algorithm we compare the contents of registers R j(i), and R k(i), where j(i), k(i) are absolute constants then change their contents or not according to the result of the comparison.
- AMS subject classification (1980): 68E05
ASJC Scopus subject areas
- Discrete Mathematics and Combinatorics
- Computational Mathematics