High-order entropy-compressed text indexes
SODA '03 Proceedings of the fourteenth annual ACM-SIAM symposium on Discrete algorithms
An improved data stream summary: the count-min sketch and its applications
Journal of Algorithms
Range mode and range median queries on lists and trees
Nordic Journal of Computing
ACM Transactions on Algorithms (TALG)
The Algorithm Design Manual
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
Approximate range mode and range median queries
STACS'05 Proceedings of the 22nd annual conference on Theoretical Aspects of Computer Science
Finding frequent elements in compressed 2D arrays and strings
SPIRE'11 Proceedings of the 18th international conference on String processing and information retrieval
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
Range majority in constant time and linear space
Information and Computation
Space-efficient data-analysis queries on grids
Theoretical Computer Science
Hi-index | 0.00 |
Given an array A of size n, we consider the problem of answering range majority queries: given a query range [i..j] where 1 ≤ i ≤ j ≤ n, return the majority element of the subarray A[i..j] if it exists. We describe a linear space data structure that answers range majority queries in constant time. We further generalize this problem by defining range a-majority queries: given a query range [i..j], return all the elements in the subarray A[i..j] with frequency greater than α(j-i+1). We prove an upper bound on the number of α-majorities that can exist in a subarray, assuming that query ranges are restricted to be larger than a given threshold. Using this upper bound, we generalize our range majority data structure to answer range a-majority queries in O(1/α) time using O(n lg(1/α + 1)) space, for any fixed α ∈ (0, 1). This result is interesting since other similar range query problems based on frequency have nearly logarithmic lower bounds on query time when restricted to linear space.