Skip to main content
Log in

Stable minimum space partitioning in linear time

  • Part I Computer Science
  • Published:
BIT Numerical Mathematics Aims and scope Submit manuscript

Abstract

In the stable0–1 sorting problem the task is to sort an array ofn elements with two distinct values such that equal elements retain their relative input order. Recently, Munro, Raman and Salowe gave an algorithm which solves this problem inO(n log*n) time and constant extra space. We show that by a modification of their method the stable0–1 sorting is possible inO(n) time andO(1) extra space. Stable three-way partitioning can be reduced to stable0–1 sorting. This immediately yields a stable minimum space quicksort, which sorts multisets in asymptotically optimal time with high probability.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. J. Bentley,Programming Pearls, Addison-Wesley, 1986.

  2. S. Carlsson, J. I. Munro, P. V. Poblette,An implicit binomial queue with constant insertion time, 1st Scandinavian Workshop on Algorithm Theory, Lecture Notes in Computer Science 318, Springer-Verlag, 1988, pp. 1–13.

  3. D. Ďurian,Quicksort without a stack, Mathematical Foundations of Computer Science 1986, Lecture Notes in Computer Science 233, Springer-Verlag, 1986, pp. 283–289.

  4. C. Levcopoulos, O. Petersson,An optimal adaptive in-place sorting algorithm, 8th International Conference of Fundamentals of Computation Theory, Lecture Notes in Computer Science 529, Springer-Verlag, 1991, pp. 329–338.

  5. J. I. Munro, V. Raman,Sorting multisets and vectors in-place, 2nd Workshop on Algorithms and Data Structures, Lecture Notes in Computer Science 519, Springer-Verlag, 1991, pp. 473–480.

  6. J. I. Munro, V. Raman, J. S. Salowe,Stable in situ sorting and minimum data movement, BIT 30 (1990) 220–234.

    Article  MATH  MathSciNet  Google Scholar 

  7. J. I. Munro, P. M. Spira,Sorting and searching in multisets, SIAM Journal of Computing 5 (1976) 1–8.

    Article  MATH  MathSciNet  Google Scholar 

  8. P. Raghavan,Lecture notes on randomized algorithms, Computer Science Report RC 15340, IBM Research Division, T. J. Watson Research Center, 1990.

  9. J. S. Salowe, W. L. Steiger,Stable unmerging in linear time and constant space, Information Processing Letters 25 (1987) 285–294.

    Article  MATH  MathSciNet  Google Scholar 

  10. R. Seidel,Backwards analysis of randomized geometric algorithms, Technical Report, Computer Science Division, University of California Berkeley, 1991.

  11. S. Sen,Random sampling techniques for efficient parallel algorithms in computational geometry, Ph.D. thesis, Computer Science Department, Duke University, 1989.

  12. L. M. Wegner,Quicksort for equal keys, IEEE Transactions on Computers C34 (1985) 362–367.

    Article  MathSciNet  Google Scholar 

  13. L. M. Wegner,A generalized, one-way, stackless quicksort, BIT 27 (1987) 44–48.

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

About this article

Cite this article

Katajainen, J., Pasanen, T. Stable minimum space partitioning in linear time. BIT 32, 580–585 (1992). https://doi.org/10.1007/BF01994842

Download citation

  • Received:

  • Revised:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF01994842

CR categories

Navigation