Abstract
In this paper, we are concerned with the merging of two linearly-ordered listsA andB consisting of elements:a 1<a 2<...<b n . The Hwang-Lin merging algorithm was considered very efficient for merging two lists of arbitrary sizes. Recently, Manacher was able to develop methods which reduce the number of pairwise comparisons required in the Hwang-Lin algorithm by a factor 31/336m. We develop in this paper a new method which further improves this factor to 52/336m. It is possible that even larger improvements could be achieved.
Similar content being viewed by others
References
R. L. Graham,On sorting by comparisons, Computers in Number Theory, A. O. L. Atkin and B. J. Birch, Eds., Academic Press, London, (1971), pp. 263–269.
F. K. Hwang,Optimal merging of 3 elements with n elements, SIAM J. Computing, 9 (1980), pp. 298–320.
F. K. Hwang and S. Lin,Optimal merging of 2 elements with n elements, Acta Informatica, 1 (1971), pp. 145–158.
F. K. Hwang and S. Lin,A simple algorithm for merging two disjoint linearly-ordered sets, SIAM J. Computing, 1 (1972), pp. 31–39.
D. E. Knuth,The Art of Computer Programming, Vol. 3, Sorting and Searching, Addison-Wesley, Reading, MA, (1973).
G. K. Manacher,Significant improvements to the Hwang-Lin merging algorithm, J. ACM, 26 (1979), pp. 434–440.
P. K. Stockmeyer and F. F. Yao,On the optimality of linear merge, SIAM J. Computing, 9 (1980), pp. 85–90.
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Thanh, M., Bui, T.D. An improvement of the binary merge algorithm. BIT 22, 454–462 (1982). https://doi.org/10.1007/BF01934409
Received:
Revised:
Issue Date:
DOI: https://doi.org/10.1007/BF01934409