Radix Sorting With No Extra Space
Gianni Franceschini, S. Muthukrishnan, Mihai Patrascu

TL;DR
This paper introduces a space-efficient, stable radix sorting algorithm for integers of size O(log n) that operates in linear time with only constant extra space, and extends the approach to read-only keys and arbitrary ranges.
Contribution
It presents the first in-place, linear-time radix sorting algorithm for integers of size O(log n), including read-only keys, and provides a transformation for any RAM sorting algorithm to be space-efficient.
Findings
Achieves O(n) time with O(1) extra space for integers of size O(log n).
Extends to read-only keys with the same bounds.
Provides a black-box transformation for arbitrary RAM sorting algorithms.
Abstract
It is well known that n integers in the range [1,n^c] can be sorted in O(n) time in the RAM model using radix sorting. More generally, integers in any range [1,U] can be sorted in O(n sqrt{loglog n}) time. However, these algorithms use O(n) words of extra memory. Is this necessary? We present a simple, stable, integer sorting algorithm for words of size O(log n), which works in O(n) time and uses only O(1) words of extra memory on a RAM model. This is the integer sorting case most useful in practice. We extend this result with same bounds to the case when the keys are read-only, which is of theoretical interest. Another interesting question is the case of arbitrary c. Here we present a black-box transformation from any RAM sorting algorithm to a sorting algorithm which uses only O(1) extra space and has the same running time. This settles the complexity of in-place sorting in terms of…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAlgorithms and Data Compression · Complexity and Algorithms in Graphs · semigroups and automata theory
