0007043[1] - Min-Max Fine Heaps Suman Kumar Nath Department...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Min-Max Fine Heaps Suman Kumar Nath Rezaul Alam Chowdhury M. Kaykobad Department of Computer Science University of Illinois at Urbana-Champaign Urbana, IL 61801, USA Email: snath@students.uiuc.edu Department of Computer Science and Engineering Bangladesh University of Engineering and Technology Dhaka-1000, Bangladesh Email: shaikat@bdonline.com Abstract In this paper we present a new data structure for double ended priority queue, called min-max fine heap , which combines the techniques used in fine heap and traditional min-max heap. The standard operations on this proposed structure are also presented, and their analysis indicates that the new structure outperforms the traditional one. Keywords: deque, min-max heap, complexity, fine heap 1. Introduction A double-ended priority queue (deque in short) is a data type supporting operations of FindMax, DeleteMax, FindMin, DeleteMin and Insertion of a new element. A traditional heap does not allow efficient implementation of all the above operations; for example, FindMin requires linear (instead of constant) time in max-heap. One approach to overcoming this intrinsic limitation of heaps is to place a max-heap “back-to-back” with a min-heap as suggested by Williams (p. 619,[6]). This leads to constant time to Find either extremum and logarithmic time to Insert an element or Delete one of the extrema, but is somewhat trickier to implement. Min-Max heap structure, proposed by Atkinson at el.[1], overcomes these problems. The structure is based on the heap structure under the notion of min-max ordering: values stored at nodes on even (odd) levels are smaller than or equal to (respectively, greater than) values stored at their descendants. This structure can be constructed in linear time. FindMin , FindMax operations can be performed in constant time and Insert ( x ), DeleteMin and DeleteMax in logarithmic time using this structure. Also sub-linear merging algorithm is given with relaxation of strict ordering[3]. In this paper, we shall combine the concept of fine-heap, introduced by Carlsson[2], using bit in each node to indicate its larger child, to improve the performance of Min-Max Heap. We call it Min-Max Fine Heap . Also a technique similar to the one used by Gonnet and Munro[5] for traditional heaps will be employed for better performance. In the next sections we shall present the structure of the heap, algorithm for carrying out the standard operations on deque, and computational analysis of the new algorithms. 2. The Data Structure Given a set S of values, a min-max fine heap on S is a binary tree T with the following properties: i. T has the heap-shape. ii. T is min-max ordered: values stored at nodes on even (odd) levels are smaller (greater) than or equal to the values stored at their descendants (if any) where the root is at level zero. Thus, the smallest value of S is stored at the root of T , whereas the largest value is stored at one of the root’s children. iii. Each node of
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/04/2008 for the course CS 352 taught by Professor Mullins during the Winter '07 term at University of Missouri-Kansas City .

Page1 / 6

0007043[1] - Min-Max Fine Heaps Suman Kumar Nath Department...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online