Abstract

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 + occ \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+\epsilon } n)$$ amortized time, for any constant $$\epsilon \in (0, 1)$$ . Obvious solutions based on directly dynamizing solutions to the static version of this problem all require $$\Omega ((\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.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.