Browse > Article
http://dx.doi.org/10.5391/JKIIS.2010.20.4.455

On a Simple and Stable Merging Algorithm  

Kim, Pok-Son (국민대학교 수학과)
Kutzner, Arne (한양대학교 정보시스템학과)
Publication Information
Journal of the Korean Institute of Intelligent Systems / v.20, no.4, 2010 , pp. 455-462 More about this Journal
Abstract
We investigate the worst case complexity regarding the number of comparisons for a simple and stable merging algorithm. The complexity analysis shows that the algorithm performs O(mlog(n/m)) comparisons for two sequences of sizes m and n $m{\leq}n$. So, according to the lower bound for merging $\Omega$(mlog(n/m)), the algorithm is asymptotically optimal regarding the number of comparisons. For proving the worst case complexity we divide the domain of all inputs into two disjoint cases. For either of these cases we will extract a special subcase and prove the asymptotic optimality for these two subcases. Using this knowledge for special cases we will prove the optimality for all remaining cases. By using this approach we give a transparent solution for the hardly tractable problem of delivering a clean complexity analysis for the algorithm.
Keywords
stable merging; minimum storage; complexity of algorithms;
Citations & Related Records
연도 인용수 순위
  • Reference
1 K. Mollerhoj AND C.U. Sottrup, “Undersogelse og implementation af effektiv inplace merge," tech. rep., CPH STL Reports 2002-06, Department of Computer Science, University of Copenhagen, Denmark, June 2002.
2 D. E. Knuth, The Art of Computer Programming, Addison-Wesley, Vol. 3: Sorting and Searching, 1973.
3 K. Dudzinski and A. Dydek. “On a stable storage merging algorithm.” Information Processing Letters, Vol. 12, pp. 5-8, February 1981.   DOI
4 A. Symvonis, “Optimal stable merging,” Computer Journal, Vol. 38, pp. 681-690, 1995.   DOI
5 V. Geffert, J. Katajainen and T. Pasanen, “Asymptotically efficient in-place merging,” Theoretical Computer Science, Vol. 237, No. 1/2, pp. 159-181, 2000.   DOI
6 J. Chen. "Optimizing stable in-place merging," Theoretical Computer Science, Vol. 302, No. 1/3, pp. 191-210, 2003.   DOI
7 P. S. Kim and A. Kutzner, “On Optimal and Efficient in-Place Merging,” SOFSEM 2006, Lecture Notes in Computer Science, Springer, Vol. 3831, pp. 350-359, 2006.   DOI
8 P. S. Kim and A. Kutzner, “Ratio Based Stable in-Place Merging,” TAMC 2008, Lecture Notes in Computer Science, Springer, Vol. 4978, pp. 246-257, 2008.   DOI
9 M. A. Kronrod, “An optimal ordering algorithm without a field operation,” Dokladi Akad. Nauk SSSR, Vol. 186, pp. 1256-1258, 1969.
10 H. Mannila and E. Ukkonen, “A simple linear-time algorithm for in situ merging," Information Processing Letters, Vol. 18, pp. 203-208, 1984.   DOI
11 F. Hwang and S. Lin, “A simple algorithm for merging two disjoint linearly ordered sets," SIAM J. Comput., Vol. 1, no. 1, pp. 31-39, 1972.   DOI
12 P. S. Kim and A. Kutzner, “Stable Minimum Storage Merging by Symmetric Comparisons,” ESA 2004, Lecture Notes in Computer Science, Springer, Vol. 3221, pp. 714-723, 2004.   DOI
13 C++ Standard Template Library, “http://www.sgi.com/tech/stl."