Skip to main content

Stable Minimum Storage Merging by Symmetric Comparisons

  • Conference paper

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

Abstract

We introduce a new stable minimum storage algorithm for merging that needs \(O(m\log(\frac{n}{m}+1))\) element comparisons, where m and n are the sizes of the input sequences with mn. According to the lower bound for merging, our algorithm is asymptotically optimal regarding the number of comparisons.

The presented algorithm rearranges the elements to be merged by rotations, where the areas to be rotated are determined by a simple principle of symmetric comparisons. This style of minimum storage merging is novel and looks promising.

Our algorithm has a short and transparent definition. Experimental work has shown that it is very efficient and so might be of high practical interest.

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

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Bentley, J.: Programming Pearls, 2nd edn. Addison-Wesley, Inc, Reading (2000)

    Google Scholar 

  2. C++ Standard Template Library, http://www.sgi.com/tech/stl

  3. Chen, J.: Optimizing stable in-place merging. Theoretical Computer Science 302(1/3), 191–210 (2003)

    Article  MATH  MathSciNet  Google Scholar 

  4. Cormen, T., Leiserson, C., Rivest, R., Stein, C.: Introduction to Algorithms, 2nd edn. MIT Press, Cambridge (2001)

    MATH  Google Scholar 

  5. Dudzinski, K., Dydek, A.: On a stable storage merging algorithm. Information Processing Letters 12(1), 5–8 (1981)

    Article  MATH  MathSciNet  Google Scholar 

  6. Ellis, J., Markov, M.: In situ, stable merging by way of the perfect shuffle. The Computer Journal 43(1), 40–53 (2000)

    Article  MATH  Google Scholar 

  7. Geffert, V., Katajainen, J., Pasanen, T.: Asymptotically efficient in-place merging. Theoretical Computer Science 237(1/2), 159–181 (2000)

    Article  MATH  MathSciNet  Google Scholar 

  8. Huang, B.-C., Langston, M.A.: Practical in-place merging. Communications of the ACM 31, 348–352 (1988)

    Article  Google Scholar 

  9. Huang, B.-C., Langston, M.A.: Fast stable merging and sorting in constant extra space. The Computer Journal 35(6), 643–650 (1992)

    Article  Google Scholar 

  10. Knuth, D.E.: The Art of Computer Programming. Sorting and Searching, vol. 3. Addison-Wesley, Reading (1973)

    Google Scholar 

  11. Kronrod, M.A.: An optimal ordering algorithm without a field operation. Dokladi Akad. Nauk SSSR 186, 1256–1258 (1969)

    MathSciNet  Google Scholar 

  12. Mannila, H., Ukkonen, E.: A simple linear-time algorithm for in situ merging. Information Processing Letters 18, 203–208 (1984)

    Article  MathSciNet  Google Scholar 

  13. Mehlhorn, K.: Sorting presorted files. In: Weihrauch, K. (ed.) GI-TCS 1979. LNCS, vol. 67, pp. 199–212. Springer, Heidelberg (1979)

    Google Scholar 

  14. Møllerhøj, K., Søttrup, C.U.: Undersøgelse og implementation af effektiv inplace merge. Technical report, CPH STL Reports 2002-06, Department of Computer Science, University of Copenhagen, Denmark (June 2002)

    Google Scholar 

  15. Pardo, L.T.: Stable sorting and merging with optimal space and time bounds. SIAM Journal on Computing 6(2), 351–372 (1977)

    Article  MATH  MathSciNet  Google Scholar 

  16. Salowe, J., Steiger, W.: Simplified stable merging tasks. Journal of Algorithms 8, 557–571 (1987)

    Article  MATH  MathSciNet  Google Scholar 

  17. Symvonis, A.: Optimal stable merging. Computer Journal 38, 681–690 (1995)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2004 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Kim, PS., Kutzner, A. (2004). Stable Minimum Storage Merging by Symmetric Comparisons. In: Albers, S., Radzik, T. (eds) Algorithms – ESA 2004. ESA 2004. Lecture Notes in Computer Science, vol 3221. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-30140-0_63

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-30140-0_63

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-23025-0

  • Online ISBN: 978-3-540-30140-0

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics