Efficient algorithms for document retrieval problems
SODA '02 Proceedings of the thirteenth annual ACM-SIAM symposium on Discrete algorithms
Frequency Estimation of Internet Packet Streams with Limited Space
ESA '02 Proceedings of the 10th Annual European Symposium on Algorithms
A simple algorithm for finding frequent elements in streams and bags
ACM Transactions on Database Systems (TODS)
Range mode and range median queries on lists and trees
Nordic Journal of Computing
Succinct data structures for flexible text retrieval systems
Journal of Discrete Algorithms
Compressed representations of sequences and full-text indexes
ACM Transactions on Algorithms (TALG)
Approximate colored range and point enclosure queries
Journal of Discrete Algorithms
FOCS '08 Proceedings of the 2008 49th Annual IEEE Symposium on Foundations of Computer Science
Range mode and range median queries in constant time and sub-quadratic space
Information Processing Letters
Improved bounds for range mode and range median queries
SOFSEM'08 Proceedings of the 34th conference on Current trends in theory and practice of computer science
Cell probe lower bounds and approximations for range mode
ICALP'10 Proceedings of the 37th international colloquium conference on Automata, languages and programming
Beyond simple aggregates: indexing for summary queries
Proceedings of the thirtieth ACM SIGMOD-SIGACT-SIGART symposium on Principles of database systems
Alphabet-independent compressed text indexing
ESA'11 Proceedings of the 19th European conference on Algorithms
Finding frequent elements in compressed 2D arrays and strings
SPIRE'11 Proceedings of the 18th international conference on String processing and information retrieval
Optimal succinctness for range minimum queries
LATIN'10 Proceedings of the 9th Latin American conference on Theoretical Informatics
Approximate range mode and range median queries
STACS'05 Proceedings of the 22nd annual conference on Theoretical Aspects of Computer Science
Dynamic range majority data structures
ISAAC'11 Proceedings of the 22nd international conference on Algorithms and Computation
Linear-Space data structures for range minority query in arrays
SWAT'12 Proceedings of the 13th Scandinavian conference on Algorithm Theory
New lower and upper bounds for representing sequences
ESA'12 Proceedings of the 20th Annual European conference on Algorithms
Range majority in constant time and linear space
Information and Computation
Hi-index | 0.00 |
Karpinski and Nekrich (2008) introduced the problem of parameterized range majority, which asks to preprocess a string of length n such that, given the endpoints of a range, one can quickly find all the distinct elements whose relative frequencies in that range are more than a threshold τ. Subsequent authors have reduced their time and space bounds such that, when τ is given at preprocessing time, we need either $\mathcal{O}\!\left( {n \lg (1 / \tau) } \right)$ space and optimal $\mathcal{O}\!\left( {1 / \tau} \right)$ query time or linear space and $\mathcal{O}\!\left( {(1 / \tau) \lg \lg \sigma} \right)$ query time, where σ is the alphabet size. In this paper we give the first linear-space solution with optimal $\mathcal{O}\!\left( {1 / \tau} \right)$ query time. For the case when τ is given at query time, we significantly improve previous bounds, achieving either $\mathcal{O}\!\left( {n \lg \lg \sigma} \right)$ space and optimal $\mathcal{O}\!\left( {1 / \tau} \right)$ query time or compressed space and $\mathcal{O}\!\left( {(1 / \tau) \lg \frac{\lg (1 / \tau)}{\lg \lg n}} \right)$ query time. Along the way, we consider the complementary problem of parameterized range minority that was recently introduced by Chan et al. (2012), who achieved linear space and $\mathcal{O}\!\left( {1 / \tau} \right)$ query time even for variable τ. We improve their solution to use either nearly optimally compressed space with no slowdown, or optimally compressed space with nearly no slowdown. Some of our intermediate results, such as density-sensitive query time for one-dimensional range counting, may be of independent interest.