scispace - formally typeset
Search or ask a question

Showing papers on "Binary heap published in 1987"


Journal ArticleDOI
Svante Carlsson1
TL;DR: A symmetrical implicit double-ended priority queue implementation, which can be built in linear time, where the smallest and the largest element can be found in constant time, and deleted in logarithmic time.

51 citations


01 Jun 1987
TL;DR: This dissertation presents three implementation models for the Scheme Programming Language; the first is a heap-based model used in some form in most Scheme implementations to date; the second is a new stack-based models that is considerably more efficient than the heap- based model at executing most programs; and the third is anew string-basedmodel intended for use in a multiple-processor implementation of Scheme.
Abstract: This dissertation presents three implementation models for the Scheme Programming Language. The first is a heap-based model used in some form in most Scheme implementations to date; the second is a new stack-based model that is considerably more efficient than the heap-based model at executing most programs; and the third is a new string-based model intended for use in a multiple-processor implementation of Scheme. The heap-based model allocates several important data structures in a heap, including actual parameter lists, binding environments, and call frames. The stack-based model allocates these same structures on a stack whenever possible. This results in less heap allocation, fewer memory references, shorter instruction sequences, less garbage collection, and more efficient use of memory. The string-based model allocates versions of these structures right in the program text, which is represented as a string of symbols. In the string-based model, Scheme programs are translated into an FFP language designed specifically to support Scheme. Programs in this language are directly executed by the FFP machine, a multiple-processor string-reduction computer. The stack-based model is of immediate practical benefit; it is the model used by the author's Chez Scheme system, a high-performance implementation of Scheme. The string-based model will be useful for providing Scheme as a high-level alternative to FFP on the FFP machine once the machine is realized.

32 citations


Journal ArticleDOI
TL;DR: This paper presents lower bound results on the number of comparisons required, in the worst case, for the operations i, ii, and iii to convert a min-max heap into a max-min heap; and iii) to merge two min-Max heaps into one min- max heap.
Abstract: Very recently a new data structure, called a min-max heap, was presented for implementing the double-ended priority queue. A min-max heap onn keys is constructed inO(n) time; the minimum and maximum keys are found in constant time, and the operations of deleting the minimum, deleting the maximum and inserting a new key into the heap are performed inO(logn) time. In addition, the data structure can be stored implicitly, i.e. in an array ofn elements without using any additional pointers. In this paper, we present lower bound results on the number of comparisons required, in the worst case, for the operations i) to construct a min-max heap on a given set of keys; ii) to convert a min-max heap into a max-min heap; and iii) to merge two min-max heaps into one min-max heap. New upper bounds for the convert and merge operations are also derived. It is found that the main difference between traditional heaps and min-max heaps lies in the time needed to perform the merge operation. While traditional heaps can be merged efficiently, it is shown that min-max heaps are not sublinearly mergeable. Even the seemingly simple task of converting a min-max heap into a max-min heap cannot be performed in less than linear time.

20 citations