Assembling approximately optimal binary search trees efficiently using arithmetics

We introduce a new algorithm for computing an approximately optimal binary search tree with known access probabilities or weights on items. The algorithm is simple to implement and it has two contributions. First, a randomized variant of the algorithm produces a binary search tree with expected perf...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Veröffentlicht in:Information processing letters Jg. 109; H. 16; S. 962 - 966
1. Verfasser: Kujala, Jussi
Format: Journal Article
Sprache:Englisch
Veröffentlicht: Amsterdam Elsevier B.V 31.07.2009
Elsevier
Elsevier Sequoia S.A
Schlagworte:
ISSN:0020-0190, 1872-6119
Online-Zugang:Volltext
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
Beschreibung
Zusammenfassung:We introduce a new algorithm for computing an approximately optimal binary search tree with known access probabilities or weights on items. The algorithm is simple to implement and it has two contributions. First, a randomized variant of the algorithm produces a binary search tree with expected performance that improves the previous theoretical guarantees (the performance is dependent on the value of the input random variable). More precisely, if p is the probability of accessing an item, then under expectation the item is found after searching lg 1 / p + 0.087 + lg 2 ( 1 + p max ) nodes, where p max is the maximal probability among items. The previous best bound was lg 1 / p + 1 , albeit deterministic. For the optimal tree our upper bound implies a non-constructive performance bound of H + 0.087 + lg 2 ( 1 + p max ) , where H is the entropy on the item distribution and the previous bound was H + 1 . The second contribution of the algorithm is a low cost in i/o models of cost such as the cache-oblivious model, while attaining simultaneously the above bound for the produced tree.
Bibliographie:SourceType-Scholarly Journals-1
ObjectType-Feature-1
content type line 14
ISSN:0020-0190
1872-6119
DOI:10.1016/j.ipl.2008.08.012