The complexity of heaps

  • Authors:
  • Svante Carlsson;Jingsen Chen

  • Affiliations:
  • -;-

  • Venue:
  • SODA '92 Proceedings of the third annual ACM-SIAM symposium on Discrete algorithms
  • Year:
  • 1992

Quantified Score

Hi-index 0.00

Visualization

Abstract

In this paper, we investigate the complexity of heaps. In particular, we study the construction problem and the search problem for heaps. We derive an adversary-based lower bound for the heap construction problem. It is shown that 1.5(n + 1)–log(n + 1)–2 comparisons are necessary to construct a heap of size n in the worst case. This is the first non-trivial adversary lower bound for this problem, which improves the previous best lower bound based on an information theoretical argument for the heap construction. Furthermore, we prove fairly trivial tight upper and lower bounds on the number of comparisons needed to search for a given element in a heap. An optimal 3/4n-time search algorithm is presented. Our lower bound for searching is also demonstrated by an adversary argument, which improves the information theory bound for the problem as well.