Path and Ancestor Queries on Trees with Multidimensional Weight Vectors

by   Meng He, et al.

We consider an ordinal tree T on n nodes, with each node assigned a d-dimensional weight vector w∈{1,2,...,n}^d, where d ∈N is a constant. We study path queries as generalizations of well-known orthogonal range queries, with one of the dimensions being tree topology rather than a linear order. Since in our definitions d only represents the number of dimensions of the weight vector without taking the tree topology into account, a path query in a tree with d-dimensional weight vectors generalize the corresponding (d+1)-dimensional orthogonal range query. We solve ancestor dominance reporting problem as a direct generalization of dominance reporting problem, n)/( n)^d-2+k)in timeØ(^d-1n+k)n)^d-1/( n)^d-2) words, and space of Ø(n^d-2n) words, where k is the size of the output, for d ≥ 2. We also achieve a tradeoff of Ø(n^d-2+n) words of space, with query time of Ø((^d-1 n)/( n)^d-2+k), for the same problem, when d ≥ 3. We solve path successor problem in Ø(n^d-1n) words of space and time Ø(^d-1+n) for d ≥ 1 and an arbitrary constant > 0. We propose a solution to path counting problem, with Ø(n(n/n)^d-1) words of space and Ø((n/n)^d) query time, for d ≥ 1. Finally, we solve path reporting problem in Ø(n^d-1+n) words of space and Ø((^d-1n)/(n)^d-2+k) query time, for d ≥ 2. These results match or nearly match the best tradeoffs of the respective range queries. We are also the first to solve path successor even for d = 1.


page 1

page 2

page 3

page 4


4D Range Reporting in the Pointer Machine Model in Almost-Optimal Time

In the orthogonal range reporting problem we must pre-process a set P of...

Path Query Data Structures in Practice

Let us be given an ordinal tree, such that each node of it has a certain...

Fast Preprocessing for Optimal Orthogonal Range Reporting and Range Successor with Applications to Text Indexing

Under the word RAM model, we design three data structures that can be co...

Space Efficient Two-Dimensional Orthogonal Colored Range Counting

In the two-dimensional orthogonal colored range counting problem, we pre...

Tree Path Minimum Query Oracle via Boruvka Trees

Tree path minimum query problem is a fundamental problem while processin...

Variations of largest rectangle recognition amidst a bichromatic point set

Classical separability problem involving multi-color point sets is an im...

A Simple Solution to the Level-Ancestor Problem

A Level Ancestory query LA(u, d) asks for the the ancestor of the node u...

Please sign up or login with your details

Forgot password? Click here to reset