zbMATH — the first resource for mathematics

Optimizing stable in-place merging. (English) Zbl 1051.68050
Summary: In 2000, V. Geffert, J. Katajainen and T. Pasanen [Theor. Comput. Sci. 237, 159–181 (2000; Zbl 0939.68160)] presented an asymptotically efficient algorithm for stable merging in constant extra space. The algorithm requires at most $$m_1(t+1)+ m_2/2^t+o(m_1)$$ comparisons $$(t=\lfloor \log_2(m_2/m_1)\rfloor)$$ and $$5m_2+12m_1+ o(m_1)$$ moves, where $$m_1$$ and $$m_2$$ are the sizes of two ordered sublists to be merged, and $$m_1\leq m_2$$. This paper optimizes the algorithm. The optimized algorithm is simpler than their algorithm, and makes at most $$m_1(t+1)+ m_2/2'+o(m_1+m_2)$$ comparisons and $$6m_2+7m_1+ o(m_1+m_2)$$ moves.

MSC:
 68P10 Searching and sorting 68W05 Nonnumerical algorithms
Full Text:
References:
 [1] Dudzinski, K.; Dydek, A., On a stable minimum storage merging algorithm, Inform. process. lett., 12, 5-8, (1981) · Zbl 0453.68037 [2] Geffert, V.; Katajainen, J.; Pasanen, T., Asymptotically efficient in-place merging, Theoret. comput. sci., 237, 159-181, (2000) · Zbl 0939.68160 [3] Huang, B.-C.; Langston, A., Practical in-place merging, Comm. ACM, 31, 348-352, (1988) [4] Huang, B.-C.; Langston, M.A., Fast stable merging and sorting in constant extra space, Comput. J., 35, 643-650, (1992) [5] Hwang, F.K.; Lin, S., A simple algorithm for merging two disjoint linearly ordered sets, SIAM J. comput., 1, 31-39, (1972) · Zbl 0235.68015 [6] D.E. Knuth, The Art of Computer Programming, Vol. 3: Sorting and Searching, Addison-Wesley, Reading, MA, 1973. · Zbl 0302.68010 [7] Kronrod, M.A., An optimal ordering algorithm without operational field, Soviet math. dokl., 10, 744-746, (1969) · Zbl 0236.68017 [8] Mannila, H.; Ukkonen, E., Simple linear-time algorithm for in situ merging, Inform. process. lett., 18, 203-208, (1984) [9] Salowe, J.S.; Steiger, W.L., Simplified stable merging tasks, J. algorithms, 8, 557-571, (1987) · Zbl 0641.68092 [10] Symvonis, A., Optimal stable merging, Comput. J., 38, 681-690, (1995) [11] Trabb Pardo, L., Stable sorting and merging with optimal space and time bounds, SIAM J. comput., 6, 351-372, (1977) · Zbl 0356.68054
This reference list is based on information provided by the publisher or from digital mathematics libraries. Its items are heuristically matched to zbMATH identifiers and may contain data conversion errors. It attempts to reflect the references listed in the original paper as accurately as possible without claiming the completeness or perfect precision of the matching.