Radix sorting with no extra space

Gianni Franceschini, Shanmugavelayutham Muthukrishnan, Mihai Pǎtraşcu

    Research output: Chapter in Book/Report/Conference proceedingConference contribution

    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√log log n) time [5]. 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 the complexity of sorting.

    Original languageEnglish (US)
    Title of host publicationAlgorithms - ESA 2007 - 15th Annual European Symposium, Proceedings
    Pages194-205
    Number of pages12
    StatePublished - Dec 1 2007
    Event15th Annual European Symposium on Algorithms, ESA 2007 - Eilat, Israel
    Duration: Oct 8 2007Oct 10 2007

    Publication series

    NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
    Volume4698 LNCS
    ISSN (Print)0302-9743
    ISSN (Electronic)1611-3349

    Conference

    Conference15th Annual European Symposium on Algorithms, ESA 2007
    CountryIsrael
    CityEilat
    Period10/8/0710/10/07

    Fingerprint

    Sorting
    Sorting algorithm
    Integer
    Random access storage
    Black Box
    Range of data
    Data storage equipment
    Necessary
    Arbitrary
    Model

    ASJC Scopus subject areas

    • Computer Science(all)
    • Biochemistry, Genetics and Molecular Biology(all)
    • Theoretical Computer Science

    Cite this

    Franceschini, G., Muthukrishnan, S., & Pǎtraşcu, M. (2007). Radix sorting with no extra space. In Algorithms - ESA 2007 - 15th Annual European Symposium, Proceedings (pp. 194-205). (Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics); Vol. 4698 LNCS).

    Radix sorting with no extra space. / Franceschini, Gianni; Muthukrishnan, Shanmugavelayutham; Pǎtraşcu, Mihai.

    Algorithms - ESA 2007 - 15th Annual European Symposium, Proceedings. 2007. p. 194-205 (Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics); Vol. 4698 LNCS).

    Research output: Chapter in Book/Report/Conference proceedingConference contribution

    Franceschini, G, Muthukrishnan, S & Pǎtraşcu, M 2007, Radix sorting with no extra space. in Algorithms - ESA 2007 - 15th Annual European Symposium, Proceedings. Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), vol. 4698 LNCS, pp. 194-205, 15th Annual European Symposium on Algorithms, ESA 2007, Eilat, Israel, 10/8/07.
    Franceschini G, Muthukrishnan S, Pǎtraşcu M. Radix sorting with no extra space. In Algorithms - ESA 2007 - 15th Annual European Symposium, Proceedings. 2007. p. 194-205. (Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)).
    Franceschini, Gianni ; Muthukrishnan, Shanmugavelayutham ; Pǎtraşcu, Mihai. / Radix sorting with no extra space. Algorithms - ESA 2007 - 15th Annual European Symposium, Proceedings. 2007. pp. 194-205 (Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)).
    @inproceedings{6c5f59f69a0c436c9bd1e9e1fe4211fc,
    title = "Radix sorting with no extra space",
    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√log log n) time [5]. 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 the complexity of sorting.",
    author = "Gianni Franceschini and Shanmugavelayutham Muthukrishnan and Mihai Pǎtraşcu",
    year = "2007",
    month = "12",
    day = "1",
    language = "English (US)",
    isbn = "9783540755197",
    series = "Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)",
    pages = "194--205",
    booktitle = "Algorithms - ESA 2007 - 15th Annual European Symposium, Proceedings",

    }

    TY - GEN

    T1 - Radix sorting with no extra space

    AU - Franceschini, Gianni

    AU - Muthukrishnan, Shanmugavelayutham

    AU - Pǎtraşcu, Mihai

    PY - 2007/12/1

    Y1 - 2007/12/1

    N2 - 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√log log n) time [5]. 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 the complexity of sorting.

    AB - 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√log log n) time [5]. 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 the complexity of sorting.

    UR - http://www.scopus.com/inward/record.url?scp=38049066452&partnerID=8YFLogxK

    UR - http://www.scopus.com/inward/citedby.url?scp=38049066452&partnerID=8YFLogxK

    M3 - Conference contribution

    SN - 9783540755197

    T3 - Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)

    SP - 194

    EP - 205

    BT - Algorithms - ESA 2007 - 15th Annual European Symposium, Proceedings

    ER -