Article

Minimum Comparison Merging of Sets of Approximately Equal Size

Authors:
To read the full-text of this research, you can request a copy directly from the authors.

Abstract

The problem of merging ordered sets in the least number of binary comparisons has been solved completely only for a few special cases. When the sets to be merged are of size m and n (m ⩽ n ⩽ m + 4) the tape merge algorithm has been shown to be optimum in the worst case. This paper significantly extends these results by showing that the tape merge algorithm is optimum in the worst case whenever one set is no larger than 1.5 times the size of the other. This result is obtained by defining an interesting and amusing two-player game isomorphic to the problem of merging ordered sets and analyzing the optimum strategies for each player. The form of this result should be applicable to the solution of similar sorting and selection problems.

No full-text available

Request Full-text Paper PDF

To read the full-text of this research,
you can request a copy directly from the authors.

... Graham and Karp [18] independently discovered that the tape merge algorithm is optimal in the worst case when the two lists have the same size. In the seminal papers, Stockmeyer and Yao [28], Murphy and Paull [25], and Christen [6] independently showed when the lists to be merged are of size m and n satisfying m ≤ n ≤ 3 2 m + 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. ...
... Graham and Karp [18] independently discovered that M(m, m) = 2m − 1 for m ≥ 1. Then Knuth [18] proved α(m) ≥ 4 for m ≤ 6. Stockmeyer and Yao [28], Murphy and Paull [25], and Christen [6] independently significantly improved the lower bounds by showing α(m) ...
... But this restrict model still covers many interesting cases. For example, when m ≤ n ≤ 3 2 m + 1 [6,25,28] or 5m − 3 ≤ n ≤ 7m [5], .M(m, n). = M(m, n). ...
Preprint
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 \cite{taocp} independently discovered that the tape merge algorithm is optimal in the worst case when the two lists have the same size. In the seminal papers, Stockmeyer and Yao\cite{yao}, Murphy and Paull\cite{3k3}, and Christen\cite{christen1978optimality} independently showed when the lists to be merged are of size m and n satisfying mn32m+1m\leq n\leq\lfloor\frac{3}{2}m\rfloor+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 used to prove lower bounds is Knuth's adversary methods \cite{taocp}. In addition, we show that the lower bound cannot be improved to 1.8 via Knuth's adversary methods. We also develop a new inequality about Knuth's adversary methods, which might be interesting in its own right. Moreover, we design a simple procedure to achieve constant improvement of the upper bounds for 2m2n3m2m-2\leq n\leq 3m .
... and Paull [24], and Christen [6] independently significantly improved the lower bound by showing M(m, n) = m + n − 1 when m ≤ n ≤ ⌊ 3 2 m⌋ + 1 . On the other hand, Hwang [13] showed that M(m, 2m) ≤ 3m − 2 if m ≥ 3 . ...
Article
Full-text available
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 \cite{taocp} independently discovered that the tape merge algorithm is optimal in the worst case when the two lists have the same size. In the seminal papers, Stockmeyer and Yao\cite{yao}, Murphy and Paull\cite{3k3}, and Christen\cite{christen1978optimality} independently showed when the lists to be merged are of size m and n satisfying mn32m+1m\leq n\leq\lfloor\frac{3}{2}m\rfloor+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 used to prove lower bounds is Knuth's adversary methods \cite{taocp}. In addition, we show that the lower bound cannot be improved to 1.8 via Knuth's adversary methods. We also develop a new inequality about Knuth's adversary methods, which might be interesting in its own right. Moreover, we design a simple procedure to achieve constant improvement of the upper bounds for 2m2n3m2m-2\leq n\leq 3m .
Article
A merging algorithm is proposed that merges two ordered subarrays of m and n elements by successive halving at a completely identified element. The method is an improvement of the Hwang-Lin and Ford-Johnson merging algorithms.
Some optimality results in merging two disjoint linearly ordered sets
  • Hwang F.K.
  • Lin S.
  • Hwang F.K.
  • Lin S.
A Problem in Optimal Merging
  • Murphy
See also Nisselbaum's abstract in SIGACT Notices
  • F K Hwang
HWANa, F. K. (1978), private communication. (See also Nisselbaum's abstract in SIGACT Notices, Winter 1978.) KNUTH, D. E. (1973), "The Art of Computer Programming. Vol. III. Sorting and Searching," Addison-Wesley, Reading, Mass. MURPHY, P. E. (1978a), "A Problem in Optimal Merging," Rutgers University, Dept. of Computer Science, DCS-TR-69.
Minimum Comparison Merging and Merging Algorithms
  • Murphy
MURPHY, P. E. (1978b), "Minimum Comparison Merging and Merging Algorithms," dissertation, Rutgers University, Dept. of Computer Science.
private communication. (See also Nisselbaum's abstract in SIGACT Notices
  • F K Hwana
HWANa, F. K. (1978), private communication. (See also Nisselbaum's abstract in SIGACT Notices, Winter 1978.)
Some optimality results in merging two disjoint linearly ordered sets
  • Hwang