BIB-VERSION:: CS-TR-v2.0 ID:: ncstrl.dartmouthcs//TR2003-444 ENTRY:: April 11, 2003 ORGANIZATION:: Dartmouth College, Computer Science TITLE:: Stupid Columnsort Tricks TYPE:: Technical Report (paper) REVISION:: 1 AUTHOR:: Chaudhry, Geeta AUTHOR:: Cormen, Thomas H. DATE:: April 2003 RETRIEVAL:: For a paper copy, email RETRIEVAL:: For a paper copy, write to Technical Report Librarian Department of Computer Science Dartmouth College 6211 Sudikoff Laboratory Hanover, NH 03755-3510 USA RETRIEVAL:: Compressed Postscript at http://www.cs.dartmouth.edu/reports/TR2003-444.ps.Z RETRIEVAL:: PDF at http://www.cs.dartmouth.edu/reports/TR2003-444.pdf ABSTRACT:: Leighton's columnsort algorithm sorts on an $r \times s$ mesh, subject to the restrictions that $s$ is a divisor of~$r$ and that $r \geq 2s^2$ (so that the mesh is tall and thin). We show how to mitigate both of these restrictions. One result is that the requirement that $s$ is a divisor of~$r$ is unnecessary; columnsort sorts correctly whether or not $s$ divides~$r$. We present two algorithms that, as long as $s$ is a perfect square, relax the restriction that $r \geq 2s^2$; both reduce the exponent of~$s$ to~$3/2$. One algorithm requires $r \geq 4s^{3/2}$ if $s$ divides~$r$ and $r \geq 6s^{3/2}$ if $s$ does not divide~$r$. The other algorithm requires $r \geq 4^{3/2}$, and it requires $s$ to be a divisor of~$r$. Both algorithms have applications in increasing the maximum problem size in out-of-core sorting programs. END:: ncstrl.dartmouthcs//TR2003-444