Estimación de la profundidad de inserción del nodo en un d-heap

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

2 Respuestas

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.

Respondido 31 Jul 12, 14:07

Does this actually improve on the naive heuristic, though? - awdz9nld

empiricism to the resuce. let's see what we end up with in practice :) - awdz9nld

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.

Respondido 25 ago 12, 07:08

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.