Row-Major Sorting on Meshes
Jop F. Sibeyn · SIAM Journal on Computing · 1998
In all recent near-optimal sorting algorithms for meshes, the packets are sorted with respect to some snake-like indexing. In this paper we present deterministic algorithms for sorting with respect to the more natural row-major indexing. For 1-1 sorting on an n × n mesh, we give an algorithm that runs in 2 · n + o(n) steps, matching the distance bound, with maximal queue size five. It is considerably simpler than earlier algorithms. Another algorithm performs k-k sorting in k · n / 2 + o(k · n) steps, matching the bisection bound. Furthermore, we present uniaxial algorithms for row-major sorting. We show that 1-1 sorting can be performed in $2 \frac{1}{2} · n + o(n) steps. Alternatively, this problem is solved with maximal queue size five in $4 \frac{1}{3} · n steps, without any additional terms.