Skip to main content

An optimal parallel algorithm for sorting presorted files

  • Session 5 Parallel Algorithms
  • Conference paper
  • First Online:
Foundations of Software Technology and Theoretical Computer Science (FSTTCS 1988)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 338))

Abstract

We present a cost optimal parallel algorithm for sorting presorted files. The measure of presortedness we consider is the number of inversions in the input file. The algorithm sorts a file of length n, with O(mn) inversions, in O(log n(log* n − log* m)) time, provided \(O(\frac{{n\log m}}{{\log n \cdot (\log ^* n - \log ^* m)}})\) processors are available, in the EREW PRAM model. This is the first PRAM sorting algorithm which is cost optimal, with respect to the number of inversions. Our method uses a new approach, which can also be used to derive a simple sequential sorting algorithm, which is efficient with respect to the number of inversions.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. M. Ajtai, J. Komlos, E. Szemeredi, “An O(n log n) sorting network”, Combinatorica 3, 1983, 1–19.

    Google Scholar 

  2. G.Bilardi, A.Nicolau, “Adaptive Bitonic Sorting: An optimal parallel algorithm for shared memory models”, to appear in SIAM Journal on Computing.

    Google Scholar 

  3. R.Cole, “Parallel Merge Sort”, 27th FOCS, 1986, 511–516.

    Google Scholar 

  4. C.R. Cook, D.J. Kim, “Best sorting algorithms for nearly sorted lists”, Comm. of the ACM 23-11, 1980, 620–624.

    Google Scholar 

  5. E.W. Dijkstra, “Smoothsort, an alternative to sorting in situ”, Science of Computer Programming 1, 1982, 223–233.

    Google Scholar 

  6. V.Estivill-Castro, D.Wood, “A new measure of presortedness”, Research Report CS-87-58, 1987, Waterloo.

    Google Scholar 

  7. H.Mannila, “Measures of presortedness and optimal sorting algorithms”, ICALP 1984, 324–336.

    Google Scholar 

  8. K.Mehlhorn, “Sorting presorted files”, 4th GI Conference on Theoretical Computer Science, Springer Verlag, 1979, 199–212.

    Google Scholar 

  9. K.Mehlhorn, “Data Structures and Algorithms 1: Sorting and Searching”, Springer Verlag, 1984, 217–228.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Kesav V. Nori Sanjeev Kumar

Rights and permissions

Reprints and permissions

Copyright information

© 1988 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Levcopoulos, C., Petersson, O. (1988). An optimal parallel algorithm for sorting presorted files. In: Nori, K.V., Kumar, S. (eds) Foundations of Software Technology and Theoretical Computer Science. FSTTCS 1988. Lecture Notes in Computer Science, vol 338. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-50517-2_78

Download citation

  • DOI: https://doi.org/10.1007/3-540-50517-2_78

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-50517-4

  • Online ISBN: 978-3-540-46030-5

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics