Tree Path Majority Data Structures
Abstract
We present the first solution to τ-majorities on tree paths. Given a tree of n nodes, each with a label from [1..σ], and a fixed threshold 0<τ<1, such a query gives two nodes u and v and asks for all the labels that appear more than τ · |Puv| times in the path Puv from u to v, where |Puv| denotes the number of nodes in Puv. Note that the answer to any query is of size up to 1/τ. On a w-bit RAM, we obtain a linear-space data structure with O((1/τ)* n w σ) query time. For any > 1, we can also build a structure that uses O(n[] n) space, where [] n denotes the function that applies logarithm times to n, and answers queries in time O((1/τ)w σ). The construction time of both structures is O(n n). We also describe two succinct-space solutions with the same query time of the linear-space structure. One uses 2nH + 4n + o(n)(H+1) bits, where H σ is the entropy of the label distribution, and can be built in O(n n) time. The other uses nH + O(n) + o(nH) bits and is built in O(n n) time w.h.p.
Turn this paper into a lesson
ArcXiv compiles a structured reading guide from this paper's metadata: plain-English importance, contributions, prerequisite concepts, which sections to read first, flashcards, and a quiz. Grounded in the abstract, never invented.