Tree Path Majority Data Structures
Abstract
We present the first solution to -majorities on tree paths. Given a tree of nodes, each with a label from , and a fixed threshold , such a query gives two nodes and and asks for all the labels that appear more than times in the path from to , where denotes the number of nodes in . Note that the answer to any query is of size up to . On a -bit RAM, we obtain a linear-space data structure with query time. For any , we can also build a structure that uses space, where denotes the function that applies logarithm times to , and answers queries in time . The construction time of both structures is . We also describe two succinct-space solutions with the same query time of the linear-space structure. One uses bits, where is the entropy of the label distribution, and can be built in time. The other uses bits and is built in time w.h.p.
Keywords
Cite
@article{arxiv.1806.01804,
title = {Tree Path Majority Data Structures},
author = {Travis Gagie and Meng He and Gonzalo Navarro},
journal= {arXiv preprint arXiv:1806.01804},
year = {2018}
}