Fast exchange sorts

  • Nachum Dershowitz
  • Hon-Wai Leong
Efficiency Of Data Organizations
Part of the Lecture Notes in Computer Science book series (LNCS, volume 367)


We present three variations of the following new sorting theme: Throughout the sort, the array is maintained in piles of sorted elements. At each step, the piles are split into two parts, so that the elements of the left piles are smaller than (or equal to) the elements of the right piles. Then, the two parts are each sorted, recursively. The theme, then, is a combination of Hoare's Quicksort idea, and the Pick algorithm, by Blum, et al., for linear selection. The variations arise from the possible choices of splitting method.

Two variations attempt to minimize the average number of comparisons. The better of these has an average performance of 1.075nlgn comparisons. The third variation sacrifices the average case for a worst-case performance of 1.756nlgn, which is better than Heapsort. They all require minimal extra space and about as many data moves as comparisons.


Average Case Average Cost Sorting Method Sorting Scheme Pivot Element 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [BIFP73]
    Blum, M., R. W. Floyd, V. Pratt, R. L. Rivest, and R. E. Tarjan, “Time Bounds for Selection,” Journal of Computer and System Sciences, (1973), Vol. 7, pp. 448–461.Google Scholar
  2. [Brow76]
    Brown, T., “Remarks on Algorithm 489,” Trans. on Mathematical Software, (1976), Vol. 3, No. 2, pp. 301–304.Google Scholar
  3. [Floy64]
    Floyd, R. W., “Algorithm 245 (Treesort3),” Comm. of ACM, (1964), Vol. 7, No. 12, p. 701.Google Scholar
  4. [FlRi75a]
    Floyd, R. W., and R. L. Rivest, “Expected Time Bounds for Selection,” Comm. of ACM, (1975), Vol. 18, No. 3, pp. 165–172.Google Scholar
  5. [FlRi75b]
    Floyd, R. W., and R. L. Rivest, “Algorithm 489 (The Algorithm SELECT — for Finding the i-th Smallest of n Elements),” Comm. of ACM, (1975), Vol. 18, No. 3, p. 173.Google Scholar
  6. [FrMc70]
    Frazer, W. D. and A. C. McKellar, “Samplesort: A Sampling Approach to Minimal Tree Sorting,” Journal of ACM, (1970), Vol. 17, No. 3, pp. 496–507.Google Scholar
  7. [Hoar61]
    Hoare, C. A. R., “Algorithm 63 (Partition); 64 (Quicksort); 65 (Find),” Comm. of ACM, (1961), Vol. 4, No. 7, pp. 321–322.Google Scholar
  8. [Hoar62]
    Hoare, C. A. R., “Quicksort,” Computer Journal, (1962), Vol. 5, No. 1, pp. 10–15.Google Scholar
  9. [Knut73]
    Knuth, D. E., The Art of Computer Programming, Vol. 3 (Sorting and Searching), (1973), Addison-Wesley, Reading, MA.Google Scholar
  10. [ScPP76]
    Schonhage, A., M. S. Paterson, N. Pippenger, “Finding the Median,” Journal of Computer and System Sciences, (1976), Vol. 13, pp. 184–199.Google Scholar
  11. [Sing69]
    Singleton, R. C., “Algorithm 347 (An Efficient Algorithm for Sorting with Minimal Storage),” Comm. of ACM, (1969), Vol. 12, No. 3, pp. 185–187.Google Scholar
  12. [Will64]
    Williams, J. W. J., “Algorithm 232 (Heapsort),” Comm. of ACM, (1964), Vol. 7, No. 6, pp. 347–348.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1989

Authors and Affiliations

  • Nachum Dershowitz
    • 1
  • Hon-Wai Leong
    • 2
  1. 1.Department of Computer ScienceUniversity of IllinoisUrbanaUSA
  2. 2.Department of Computer ScienceNational University of SingaporeSingapore

Personalised recommendations