Succinct representations of weighted trees supporting path queries

  • Authors:
  • Manish Patil;Rahul Shah;Sharma V. Thankachan

  • Affiliations:
  • Department of Computer Science, Louisiana State University, 291 Coates Hall, Baton Rouge, LA 70803, USA;Department of Computer Science, Louisiana State University, 291 Coates Hall, Baton Rouge, LA 70803, USA;Department of Computer Science, Louisiana State University, 291 Coates Hall, Baton Rouge, LA 70803, USA

  • Venue:
  • Journal of Discrete Algorithms
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

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,...,@s} 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@s) time and path reporting in O(log@s+occlog@s) 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@s+6n+o(nlog@s) bits space that can perform the above mentioned queries in O(log@slogn) and O(log@slogn+occlog@s) time respectively.