Heaps and Heapsort on Secondary Storage

نویسندگان

  • R. Fadel
  • K. V. Jakobsen
  • Jyrki Katajainen
  • Jukka Teuhola
چکیده

A heap structure designed for secondary storage is suggested that tries to make the best use of the available buffer space in primary memory. The heap is a complete multi-way tree, with multi-page blocks of records as nodes, satisfying a generalized heap property. A special feature of the tree is that the nodes may be partially filled, as in B-trees. The structure is complemented with priority-queue operations insert and delete-max. When handling a sequence of S operations, the number of page transfers performed is shown to be O ( ∑S i=1 (1/P ) log(M/P ) (Ni/P ) ) , where P denotes the number of records fitting into a page, M the capacity of the buffer space in records, and Ni the number of records in the heap prior to the ith operation (assuming P ≥ 1 and S > M ≥ c · P , where c is a small positive constant). The number of comparisons required when handling the sequence is O (

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

On the Performance of WEAK-HEAPSORT

Dutton (1993) presents a further HEAPSORT variant called WEAK-HEAPSORT, which also contains a new data structure for priority queues. The sorting algorithm and the underlying data structure are analyzed showing that WEAK-HEAPSORT is the best HEAPSORT variant and that it has a lot of nice properties. It is shown that the worst case number of comparisons is ndlog ne 2 ne + n dlog ne n log n+ 0:1n...

متن کامل

Heap – ternary algebraic structure ∗

In this paper some classes of ternary algebraic structures (semi-heaps, heaps) are considered. The connection between heaps (laterally commutative heaps) and corresponding algebraic and geometric structures is presented. The equivalence of heap existence and the Desargues system on the same set is directly proved. It is the starting point for an analogous result about a laterally commutative he...

متن کامل

Divide-and-conquer recurrences associated with generalized heaps, optimal merge, and related structures

An elementary approach is given to studying the recurrence relations associated with generalized heaps (or d-heaps), cost of optimal merge, and generalized divide-and-conquer minimization problems. We derive exact formulae for the solutions of all such recurrences and give some applications. In particular, we present a precise probabilistic analysis of Floyd’s algorithm for constructing d-heaps...

متن کامل

Analysis of String Sorting using Heapsort

In this master thesis we analyze the complexity of sorting a set of strings. It was shown that the complexity of sorting strings can be naturally expressed in terms of the prefix trie induced by the set of strings. The model of computation takes into account symbol comparisons and not just comparisons between the strings. The analysis of upper and lower bounds for some classical algorithms such...

متن کامل

Expected Heights in Heaps

In this paper several recurrences and formulas are presented leading to an upper bound and a lower bound, both logarithmic, for the expected height of a node in a heap. These bounds are of interest for algorithms that select the kth smallest element in a heap. CR categories: E.1, F.2.2, G.2.1.

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • Theor. Comput. Sci.

دوره 220  شماره 

صفحات  -

تاریخ انتشار 1999