Dynamic Path Queries in Linear Space
In the path reporting problem, we preprocess a tree on n nodes each of which is assigned a weight, such that given an arbitrary path and a weight range, we can report the nodes whose weights are within the range. We consider this problem in dynamic settings, and propose the first non-trivial linear-...
Gespeichert in:
Veröffentlicht in: | Algorithmica 2018-12, Vol.80 (12), p.3728-3765 |
---|---|
Hauptverfasser: | , , |
Format: | Artikel |
Sprache: | eng |
Schlagworte: | |
Online-Zugang: | Volltext |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | In the path reporting problem, we preprocess a tree on
n
nodes each of which is assigned a weight, such that given an arbitrary path and a weight range, we can report the nodes whose weights are within the range. We consider this problem in dynamic settings, and propose the first non-trivial linear-space solution that supports path reporting in
O
(
(
lg
n
/
lg
lg
n
)
2
+
o
c
c
lg
n
/
lg
lg
n
)
time, where
occ
is the output size, and the insertion and deletion of a node of an arbitrary degree in
O
(
lg
2
+
ϵ
n
)
amortized time, for any constant
ϵ
∈
(
0
,
1
)
. Obvious solutions based on directly dynamizing solutions to the static version of this problem all require
Ω
(
(
lg
n
/
lg
lg
n
)
2
)
time for each node reported, and thus our query time is much faster. We also design data structures that support path counting and path reporting queries in
O
(
(
lg
n
/
lg
lg
n
)
2
)
time, and insertions and deletions in
O
(
(
lg
n
/
lg
lg
n
)
2
)
amortized time. This matches the best known results for dynamic two-dimensional range counting (He and Munro in Comput Geom 47(2):268–281,
2014
) and range selection (He et al., in: Proceedings of the 22nd international symposium on algorithms and computation, ISAAC, Yokohama, Japan,
2011
), which can be viewed as special cases of path counting and path selection. |
---|---|
ISSN: | 0178-4617 1432-0541 |
DOI: | 10.1007/s00453-018-0413-x |