Path Maximum Query and Path Maximum Sum Query in a Tree
Let T be a node-weighted tree with n nodes, and let π(u, v) denote the path between two nodes u and v in T. We address two problems: (i) Path Maximum Query: Preprocess T so that, for a query pair of nodes u and v, the maximum weight on π(u, v) can be found quickly. (ii) Path Maximum Sum Query: Prepr...
Gespeichert in:
Veröffentlicht in: | IEICE Transactions on Information and Systems 2009/02/01, Vol.E92.D(2), pp.166-171 |
---|---|
Hauptverfasser: | , , |
Format: | Artikel |
Sprache: | eng |
Schlagworte: | |
Online-Zugang: | Volltext |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | Let T be a node-weighted tree with n nodes, and let π(u, v) denote the path between two nodes u and v in T. We address two problems: (i) Path Maximum Query: Preprocess T so that, for a query pair of nodes u and v, the maximum weight on π(u, v) can be found quickly. (ii) Path Maximum Sum Query: Preprocess T so that, for a query pair of nodes u and v, the maximum weight sum subpath of π(u, v) can be found quickly. For the problems we present solutions with O(1) query time and O(n log n) preprocessing time. |
---|---|
ISSN: | 0916-8532 1745-1361 1745-1361 |
DOI: | 10.1587/transinf.E92.D.166 |