In-place heap construction with optimized comparisons, moves, and cache misses

Jingsen Chen, Stefan Edelkamp, Amr Ahmed Abd Elmoneim Elmasry, Jyrki Katajainen

6 Citationer (Scopus)

Abstract

We show how to build a binary heap in-place in linear time by performing ~ 1.625n element comparisons, at most ~ 2.125n element moves, and ~ n/B cache misses, where n is the size of the input array, B the capacity of the cache line, and ~ f(n) approaches f(n) as n grows. The same bound for element comparisons was derived and conjectured to be optimal by Gonnet and Munro; however, their procedure requires Θ(n) pointers and does not have optimal cache behaviour. Our main idea is to mimic the Gonnet-Munro algorithm by converting a navigation pile into a binary heap. To construct a binary heap in-place, we use this algorithm to build bottom heaps of size and adjust the heap order at the upper levels using Floyd's sift-down procedure. On another frontier, we compare different heap-construction alternatives in practice.

OriginalsprogEngelsk
TitelMathematical Foundations of Computer Science 2012 : 37th International Symposium, MFCS 2012, Bratislava, Slovakia, August 27-31, 2012. Proceedings
RedaktørerBranislav Rovan, Vladimiro Sassone, Peter Widmayer
Antal sider12
ForlagSpringer
Publikationsdato2012
Sider259-270
ISBN (Trykt)978-3-642-32588-5
ISBN (Elektronisk)978-3-642-32589-2
DOI
StatusUdgivet - 2012
Begivenhed37th International Symposium on Mathematical Foundations of Computer Science - Bratislava, Slovakiet
Varighed: 27 aug. 201231 aug. 2012
Konferencens nummer: 37

Konference

Konference37th International Symposium on Mathematical Foundations of Computer Science
Nummer37
Land/OmrådeSlovakiet
ByBratislava
Periode27/08/201231/08/2012
NavnLecture notes in computer science
Vol/bind7464
ISSN0302-9743

Fingeraftryk

Dyk ned i forskningsemnerne om 'In-place heap construction with optimized comparisons, moves, and cache misses'. Sammen danner de et unikt fingeraftryk.

Citationsformater