Asymptotically efficient in-place merging

被引:31
作者
Geffert, V
Katajainen, J
Pasanen, T
机构
[1] Univ Copenhagen, Dept Comp, DK-2100 Copenhagen E, Denmark
[2] Safarik Univ, Dept Comp Sci, SK-04154 Kosice, Slovakia
[3] Turku Ctr Comp Sci, FIN-20520 Turku, Finland
关键词
in-place algorithms; merging; sorting;
D O I
10.1016/S0304-3975(98)00162-5
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
Two linear-time algorithms for in-place merging are presented. Both algorithms perform at most m(t + 1) + n/2(t) + o(m) comparisons, where m and n are the sizes of the input sequences, m less than or equal to n, and t = [log(2)(n/m)]. The first algorithm is for unstable merging and it carries out no more than 3(n + m) + o(m) element moves. The second algorithm is for stable merging and it accomplishes at most 5n + 12m + o(m) moves. (C) 2000 Elsevier Science B.V. All rights reserved.
引用
收藏
页码:159 / 181
页数:23
相关论文
共 16 条
[1]   ON A STABLE MINIMUM STORAGE MERGING ALGORITHM [J].
DUDZINSKI, K ;
DYDEK, A .
INFORMATION PROCESSING LETTERS, 1981, 12 (01) :5-8
[2]  
DVORAK S, 1986, LECT NOTES COMPUT SC, V233, P290, DOI 10.1007/BFb0016253
[3]   PRACTICAL IN-PLACE MERGING [J].
HUANG, BC ;
LANGSTON, MA .
COMMUNICATIONS OF THE ACM, 1988, 31 (03) :348-352
[4]   FAST STABLE MERGING AND SORTING IN CONSTANT EXTRA SPACE [J].
HUANG, BC ;
LANGSTON, MA .
COMPUTER JOURNAL, 1992, 35 (06) :643-650
[5]  
Hwang F. K., 1972, SIAM J COMPTNG, V1, P31
[6]  
Katajainen J., 1996, Nordic Journal of Computing, V3, P27
[7]  
Knuth D. E., 1973, The Art of Computer Programming Volume 3, Sorting and Searching, VIII
[8]  
Kronrod M.A., 1969, SOV MATH DOKL, V10, P744
[9]   A SIMPLE LINEAR-TIME ALGORITHM FOR INSITU MERGING [J].
MANNILA, H ;
UKKONEN, E .
INFORMATION PROCESSING LETTERS, 1984, 18 (04) :203-208
[10]   Selection from read-only memory and sorting with minimum data movement [J].
Munro, JI ;
Raman, V .
THEORETICAL COMPUTER SCIENCE, 1996, 165 (02) :311-323