Abstract
Efficient algorithms are given to find the maximum lengthn of an ordered list in which 4 elements can be merged using exactlyk comparisons. A top down algorithm for the (2,n) merge problem is discussed and is shown to obtain the optimal merge length first reported by Hwang and Lin. Our algorithms combine this top down approach and strong heuristics, some of which derived from Hwang's optimal algorithm for the (3,n) problem, and produce a lengthn which is close to the optimal lengthf 4(k).
Similar content being viewed by others
References
V. S. Alagar, T. D. Bui and Mai Thanh,Efficient algorithms for merging, Dept. of Computer Science, Technical Report, Concordia University (1983).
C. Christen,Improving the bounds on optimal merging. Proc. 19th Annual IEEE Conf. on the Foundations of Computer Science (1978), 259–266.
R. L. Graham,On sorting by comparisons, Computers in Number Theory, A. O. L. Atkin and B. J. Birch, Eds., Academic Press, London (1971), 263–269.
F. K. Hwang,Optimal merging of 3 elements with n elements, SIAM J. Computing 9 (1980), 298–320.
F. K. Hwang and S. Lin,Optimal merging of 2 elements with n elements, Acta Informatica 1 (1971), 145–158.
Mai Thanh and T. D. Bui,An improvement of the binary merge algorithm, BIT 22 (1982), 454–462.
P. K. Stockmeyer and F. F. Yao,On the optimality of linear merge, SIAM J. Computing 9 (1980), 85–90.
J. S. Mönting,Merging of 4 or 5 elements with n elements, Theoretical Computer Science 14 (1981), 19–37.
Author information
Authors and Affiliations
Additional information
On leave at the Dept. of Mathematics and Dept. of Mechanical Engineering, University of California, Berkeley, California 94720.
Rights and permissions
About this article
Cite this article
Alagar, V.S., Bui, T.D. & Thanh, M. Efficient algorithms for merging. BIT 23, 409–428 (1983). https://doi.org/10.1007/BF01933617
Received:
Revised:
Issue Date:
DOI: https://doi.org/10.1007/BF01933617