Is there any approach to estimating the insertion depth of a node in a d-heap that is able to beat
(node_value / heap_max) * h, where h is the heap height, and heap_max is normalized to the heap minimum?
In this particular case, it is feasible to maintain extra/historical data to support this heuristic, given that the maintenance of which is O(1) in time.
preguntado el 31 de julio de 12 a las 12:07
Not exactly O(1), but a O(loglogn) (for all practical purposes O(1) ) solution would be to store some kind of level stat. Eg. You can store max of each level and do a binary search.
Según Inserting a new element into a heap [Doberkat, 1981] binary heaps with a uniform key distribution see an average of 1.6 UpHeap operations per insertion. The equivalent number should be fairly close for a d-heap.