Document Type
Conference Proceeding
Publication Date
12-1-2012
Abstract
We consider the problem of succinctly representing a given vertex-weighted tree of n vertices, whose vertices are labeled by integer weights from {1,2,.,σ} and supporting the following path queries efficiently:Path median query: Given two vertices i, j, return the median weight on the path from i to j.Path selection query: Given two vertices i, j and a positive integer k, return the kth smallest weight on the path from i to j.Path counting/reporting query: Given two vertices i, j and a range [a,b], count/report the vertices on the path from i to j whose weights are in this range. The previous best data structure supporting these queries takes O(nlogn) bits space and can perform path median/selection/counting in O(logσ) time and path reporting in O(logσ+occlogσ) time, where occ represents the number of outputs [M. He, J.I. Munro, G. Zhou, Path queries in weighted trees, in: International Symposium on Algorithms and Computation, 2011, pp. 140-149]. We present a succinct data structure taking nlogσ+6n+o(nlogσ) bits space that can perform the above mentioned queries in O(logσlogn) and O(logσlogn+occlogσ) time respectively. © 2012 Elsevier B.V. All rights reserved.
Publication Source (Journal or Book title)
Journal of Discrete Algorithms
First Page
103
Last Page
108
Recommended Citation
Patil, M., Shah, R., & Thankachan, S. (2012). Succinct representations of weighted trees supporting path queries. Journal of Discrete Algorithms, 17, 103-108. https://doi.org/10.1016/j.jda.2012.08.003