A simple linear-time algorithm for in situ merging
Information Processing Letters
Asymptotically efficient in-place merging
Theoretical Computer Science
Introduction to Algorithms
Optimizing stable in-place merging
Theoretical Computer Science
On optimal and efficient in place merging
SOFSEM'06 Proceedings of the 32nd conference on Current Trends in Theory and Practice of Computer Science
Hi-index | 0.00 |
We contribute to the research on stable minimum storage merging by introducing an algorithm that is particularly simply structured compared to its competitors. The presented algorithm performs $O(m\log(\frac{n}{m}+1))$ comparisons and O((m+ n)logm) assignments, where mand nare the sizes of the input sequences with m≤ n. Hence, according to the lower bounds of merging the algorithm is asymptotically optimal regarding the number of comparisons.As central new idea we present a principle of symmetric splitting, where the start and end point of a rotation are computed by a repeated halving of two search spaces. This principle is structurally simpler than the principle of symmetric comparisons introduced earlier by Kim and Kutzner. It can be transparently implemented by few lines of Pseudocode.We report concrete benchmarks that prove the practical value of our algorithm.