Soft Heaps

Data Structure AlgorithmsAnalysis of AlgorithmsAlgorithms

A soft heap is defined as a variation on the simple heap data structure that consists of constant amortized time for 5 types of operations. This is obtained by carefully "corrupting" (increasing) the keys of maximum a certain number of values in the heap. The constant time operations are −

  • create(s) − Create a new soft heap s
  • insert(s, y) − Insert an element y into a soft heap s
  • meld(s, s' )of two soft heaps s and s′ into one, destroying both
  • delete(s, y) − Delete an element y from a soft heap s
  • findmin(s) − Get the element with least key in the soft heap s
  • Other heaps such as Fibonacci heaps achieve most of these bounds without any corruption, but cannot provide a constant-time bound on the critical delete operation. The amount of corruption can be controlled by the choice of a parameter ε, but the lower this is set, the more time insertions require (O(log 1/ε) for an error rate of ε).
  • More precisely, the guarantee offered by the soft heap is the following: for a fixed value ε between 0 and 1/2, at any point in time there will be maximum ε*m corrupted keys in the heap, where m is the number of elements inserted or corrupted W. We can’t guarantee that only a fixed percentage of the keys currently in the heap are corrupted or increased: in an unwanted sequence of insertions and deletions, it can happen that all elements in the heap will have increased or corrupted keys. In same case, there is no guarantee that in a sequence of elements extracted from the heap with findmin and delete, only a fixed percentage will have corrupted or increased keys: in an unlucky scenario only corrupted or increased elements are extracted from the heap.
  • In spite of their limitations and unpredictable nature, soft heaps are useful for designing of deterministic Algorithms. They were implemented to obtain the best complexity to date for determining a minimum spanning tree. They can also be implemented to simply build an optimal selection Algorithm, and near-sorting Algorithms, which are Algorithms that set every element near its final position, a situation in which insertion sort is fast.
Updated on 02-Jan-2020 07:26:18