Sciweavers

FCT
2009
Springer

Multiway In-Place Merging

14 years 4 months ago
Multiway In-Place Merging
Abstract. We present an algorithm for asymptotically efficient multiway blockwise in-place merging. Given an array A containing sorted subsequences A1, . . . , Ak of respective lengths n1, . . . , nk, where k i=1 ni = n, we assume that extra k·s elements (so called buffer elements) are positioned at the very end of array A, and that the lengths n1, . . . , nk are positive integer multiples of some parameter s (i.e., multiples of a given block of length s). The number of input sequences k is a fixed constant parameter, not dependent on the lengths of input sequences. Then our algorithm merges the subsequences A1, . . . , Ak into a single sorted sequence, performing Θ(log k·n) + O((n/s)2 ) + O(s· log s) element comparisons and 3·n + O(s·log s) element moves.1 Then, for s = n2/3 /(log n)1/3 , this gives an algorithm performing Θ(log k·n) + O((n·log n)2/3 ) comparisons and 3·n + O((n·log n)2/3 ) moves. That is, our algorithm runs in linear time, with an asymptotically optimal...
Viliam Geffert, Jozef Gajdos
Added 24 Jul 2010
Updated 24 Jul 2010
Type Conference
Year 2009
Where FCT
Authors Viliam Geffert, Jozef Gajdos
Comments (0)