Abstract
We contribute to the research on stable minimum storage merging by introducing an algorithm that is particularly simply structured compared to its competitors. The presented algorithm performs \(O(m\log(\frac{n}{m}+1))\) comparisons and O((m + n)logm) assignments, where m and n are the sizes of the input sequences with m ≤ n. Hence, according to the lower bounds of merging the algorithm is asymptotically optimal regarding the number of comparisons.
As central new idea we present a principle of symmetric splitting, where the start and end point of a rotation are computed by a repeated halving of two search spaces. This principle is structurally simpler than the principle of symmetric comparisons introduced earlier by Kim and Kutzner. It can be transparently implemented by few lines of Pseudocode.
We report concrete benchmarks that prove the practical value of our algorithm.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Knuth, D.E.: The Art of Computer Programming, vol. 3. Addison-Wesley, London (1973)
Dudzinski, K., Dydek, A.: On a Stable Storage Merging Algorithm. Information Processing Letters 12, 5–8 (1981)
Kim, P.S., Kutzner, A.: Stable Minimum Storage Merging by Symmetric Comparisons. In: Albers, S., Radzik, T. (eds.) ESA 2004. LNCS, vol. 3221, pp. 714–723. Springer, Heidelberg (2004)
Symvonis, A.: Optimal Stable Merging. Computer Journal 38, 681–690 (1995)
Geffert, V., Katajainen, J., Pasanen, T.: Asymptotically Efficient In-Place Merging. Theoretical Computer Science 237, 159–181 (2000)
Chen, J.: Optimizing Stable In-Place Merging. Theoretical Computer Science 302, 191–210 (2003)
Kim, P.S., Kutzner, A.: On Optimal and Efficient in Place Merging. In: Wiedermann, J., Tel, G., Pokorný, J., Bieliková, M., Štuller, J. (eds.) SOFSEM 2006. LNCS, vol. 3831, pp. 350–359. Springer, Heidelberg (2006)
Kronrod, M.A.: An Optimal Ordering Algorithm without a Field Operation. Dokladi Akad. Nauk SSSR 186, 1256–1258 (1969)
Mannila, H., Ukkonen, E.: A Simple Linear-Time Algorithm for in Situ Merging. Information Processing Letters 18, 203–208 (1984)
Hwang, F., Lin, S.: A Simple Algorithm for Merging Two Disjoint Linearly Ordered Sets. SIAM J. Comput. 1, 31–39 (1972)
Cormen, T., Leiserson, C., Rivest, R., Stein, C.: Introduction to Algorithms, 2nd edn. MIT Press, Cambridge (2001)
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 2007 Springer Berlin Heidelberg
About this paper
Cite this paper
Kim, PS., Kutzner, A. (2007). A Simple Algorithm for Stable Minimum Storage Merging. In: van Leeuwen, J., Italiano, G.F., van der Hoek, W., Meinel, C., Sack, H., Plášil, F. (eds) SOFSEM 2007: Theory and Practice of Computer Science. SOFSEM 2007. Lecture Notes in Computer Science, vol 4362. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-69507-3_29
Download citation
DOI: https://doi.org/10.1007/978-3-540-69507-3_29
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-69506-6
Online ISBN: 978-3-540-69507-3
eBook Packages: Computer ScienceComputer Science (R0)