ARTICLE DOWNLOAD

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

10$
ARTICLE DOWNLOAD

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

10$

Qian Li, Xiaoming Sun & Jialin Zhang 

Abstract

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 m≤n≤⌊32m⌋+1m≤n≤⌊32m⌋+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 2m−2≤n≤3m2m−2≤n≤3m.

Only units of this product remain
Year 2020
Language English
Format PDF
DOI 10.1007/s00453-020-00690-x