On the Optimality of Tape Merge of Two Lists with Similar Size

CategoryPublications 220

Authors: Qian Li, Xiaoming Sun, Jialin Zhang

Published in: Algorithmica

Date of Publication: Feb 19, 2020


The problem of merging sorted lists in the least number of pairwise comparisons has been solved completely only for a few special cases. Graham and Karp (Sorting Search 3:197–207, 1999) independently discovered that the tape merge algorithm is optimal in the worst case when the two lists have the same size. In their seminal papers, Stockmeyer and Yao (SIAM J Comput 9(1):85–90, 1980), Murphy and Paull (Inf Control 42(1):87–96, 1979), and Christen (On the optimality of the straight merging algorithm, 1978) independently showed when the lists to be merged are of size m and n satisfying mn3/2m+1, the tape merge algorithm is optimal in the worst case. This paper extends this result by showing that the tape merge algorithm is optimal in the worst case whenever the size of one list is no larger than 1.52 times the size of the other. The main tool we use to prove the lower bound is Knuth’s (1999) adversary methods. In addition, we show that the lower bound cannot be improved to 1.8 via Knuth’s adversary methods. Moreover, we design a simple procedure, and by invoking this procedure recursively until the remaining subproblem can be solved efficiently by another known algorithm, we achieve constant improvement of the upper bound for 2m2n3m.

View Full Text

Keywords2020AlgorithmicaBig data analytics under constrained resourcesQian Li Previous: Next: