Tree path majority data structures
Abstract
We present the first solution to finding Ï-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/Ï)lgâ¡lgwâ¡Ï) query time, which is worst-case optimal for polylogarithmic-sized alphabets. We also describe two succinct-space solutions with query time O((1/Ï)lgââ¡nlgâ¡lgwâ¡Ï). One uses 2nH+4n+o(n)(H+1) bits, where Hâ¤lgâ¡Ï is the entropy of the label distribution; the other uses nH+O(n)+o(nH) bits. By using just o(nlgâ¡Ï) extra bits, our succinct structures allow Ï to be specified at query time. We obtain analogous results to find a Ï-minority, that is, an element that appears between 1 and Ïâ |Puv| times in Puv.
Más información
| Título según WOS: | Tree path majority data structures |
| Título según SCOPUS: | Tree path majority data structures |
| Título de la Revista: | Theoretical Computer Science |
| Volumen: | 833 |
| Editorial: | Elsevier B.V. |
| Fecha de publicación: | 2020 |
| Página final: | 119 |
| Idioma: | English |
| DOI: |
10.1016/j.tcs.2020.05.039 |
| Notas: | ISI, SCOPUS |