Periodic Sorting on Two-Dimensional Meshes

Miroslaw Kutylowski, Rolf Wanka

Dept. of Mathematics and Computer Science
and Heinz Nixdorf Institute
Paderborn University
D-33095 Paderborn, Germany
e-mail: {mirekk, wanka}@uni-paderborn.de


Abstract

We consider the following periodic sorting procedure on two-dimensional meshes of processors: Initially, each node contains one number. We proceed in rounds each round consisting of sorting the columns of the grid, and, in the second phase, of sorting the rows according to the snake-like ordering. We exactly characterize the number of rounds necessary to sort on an lm-grid in the worst case, where l is the number of the rows and m the number of the columns. An upper bound of ceil(log l)+1 was known before. This bound is tight for the case that m is not a power of 2. Surprisingly, it turns out that far fewer rounds are necessary if m is a power of 2 (and m l): in this case, exactly min{ log m + 1, ceil(log l) + 1} rounds are needed in the worst case.


Full paper in Postscript format.

Copyright 1992 World Scientific Publishing Company. Published in Parallel Processing Letters 2 (1992) 213-220.