Tree Path Majority Data Structures
We present the first solution to tau-majorities on tree paths. Given a tree of n nodes, each with a label from [1..sigma], and a fixed threshold 0<tau<1, such a query gives two nodes u and v and asks for all the labels that appear more than tau * |P_{uv}| times in the path P_{uv} from u to v, where |P_{uv}| denotes the number of nodes in P_{uv}. Note that the answer to any query is of size up to 1/tau. On a w-bit RAM, we obtain a linear-space data structure with O((1/tau)lg^* n lg lg_w sigma) query time. For any kappa > 1, we can also build a structure that uses O(n lg^{[kappa]} n) space, where lg^{[kappa]} n denotes the function that applies logarithm kappa times to n, and answers queries in time O((1/tau)lg lg_w sigma). The construction time of both structures is O(n lg 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 <=lg sigma is the entropy of the label distribution, and can be built in O(n lg n) time. The other uses nH + O(n) + o(nH) bits and is built in O(n lg n) time w.h.p.
Majorities on Trees
Succinct data structures
Theory of computation~Data structures design and analysis
68:1-68:12
Regular Paper
An extended version of the paper is available at https://arxiv.org/abs/1806.01804.
Travis
Gagie
Travis Gagie
CeBiB - Center for Biotechnology and Bioengineering, Chile, School of Computer Science and Telecommunications, Diego Portales University, Chile
Funded by FONDECYT grant 1171058, Chile.
Meng
He
Meng He
Faculty of Computer Science, Dalhousie University, Canada
Funded by NSERC, Canada.
Gonzalo
Navarro
Gonzalo Navarro
CeBiB - Center for Biotechnology and Bioengineering, Chile, IMFD - Millenium Institute for Foundational Research on Data, Chile, Dept. of Computer Science, University of Chile, Chile
Funded with basal funds FB0001, Conicyt, Chile, by Millenium Institute for Foundational Research on Data (IMFD), Chile, and by Fondecyt grant 1170048, Chile.
10.4230/LIPIcs.ISAAC.2018.68
D. Belazzougui, T. Gagie, J. I. Munro, G. Navarro, and Y. Nekrich. Range Majorities and Minorities in Arrays. CoRR, abs/1606.04495, 2016. URL: http://arxiv.org/abs/1606.04495.
http://arxiv.org/abs/1606.04495
D. Belazzougui, T. Gagie, and G. Navarro. Better Space Bounds for Parameterized Range Majority and Minority. In Proc. 12th WADS, LNCS 8037, pages 121-132, 2013.
D. Belazzougui and G. Navarro. Alphabet-Independent Compressed Text Indexing. ACM Trans. Alg., 10(4):article 23, 2014.
D. Belazzougui and G. Navarro. Optimal Lower and Upper Bounds for Representing Sequences. ACM Trans. Alg., 11(4):article 31, 2015.
T. C. Bell, J. Cleary, and I. H. Witten. Text Compression. Prentice Hall, 1990.
M. Bender and M. Farach-Colton. The level ancestor problem simplified. Theor. Comp. Sci., 321(1):5-12, 2004.
M. A. Bender, M. Farach-Colton, G. Pemmasani, S. Skiena, and P. Sumazin. Lowest common ancestors in trees and directed acyclic graphs. J. Algorithms, 57(2):75-94, 2005.
T. M. Chan, S. Durocher, K. G. Larsen, J. Morrison, and B. T. Wilkinson. Linear-Space Data Structures for Range Mode Query in Arrays. Theor. Comp. Syst., 55(4):719-741, 2014.
D. R. Clark. Compact PAT Trees. PhD thesis, University of Waterloo, Canada, 1996.
E. D. Demaine, A. López-Ortiz, and J. I. Munro. Frequency Estimation of Internet Packet Streams with Limited Space. In Proc. 10th ESA, pages 348-360, 2002.
S. Durocher, R. Shah, M. Skala, and S. V. Thankachan. Linear-space data structures for range frequency queries on arrays and trees. Algorithmica, 74(1):344-366, 2016.
M. Fang, N. Shivakumar, H. Garcia-Molina, R. Motwani, and J. D. Ullman. Computing Iceberg Queries Efficiently. In Proc. 24th VLDB, pages 299-310, 1998.
T. Gagie, M. He, J. I. Munro, and P. K. Nicholson. Finding Frequent Elements in Compressed 2D Arrays and Strings. In Proc. 18th SPIRE, pages 295-300, 2011.
M. He, J. I. Munro, and G. Zhou. A Framework for Succinct Labeled Ordinal Trees over Large Alphabets. Algorithmica, 70(4):696-717, 2014.
D. Krizanc, P. Morin, and M. H. M. Smid. Range mode and range median queries on lists and trees. Nordic J. Comp., 12(1):1-17, 2005.
J. Misra and D. Gries. Finding Repeated Elements. Sci. Comp. Prog., 2(2):143-152, 1982.
G. Navarro and K. Sadakane. Fully-Functional Static and Dynamic Succinct Trees. ACM Trans. Alg., 10(3):article 16, 2014.
R. Raman, V. Raman, and S. S. Rao. Succinct indexable dictionaries with applications to encoding k-ary trees, prefix sums and multisets. ACM Trans. Alg., 3(4):article 43, 2007.
L. Russo, G. Navarro, and A. Oliveira. Fully-Compressed Suffix Trees. ACM Trans. Alg., 7(4):article 53, 2011.
D. Sleator and R. E. Tarjan. A data structure for dynamic trees. J. Comp. Sys. Sci., 26(3):362-391, 1983.
D. Tsur. Succinct representation of labeled trees. Theor. Comp. Sci., 562:320-329, 2014.
Travis Gagie, Meng He, and Gonzalo Navarro
Creative Commons Attribution 3.0 Unported license
https://creativecommons.org/licenses/by/3.0/legalcode