English

Compressed Dynamic Range Majority and Minority Data Structures

Data Structures and Algorithms 2018-05-24 v2

Abstract

In the range α\alpha-majority query problem, we are given a sequence S[1..n]S[1..n] and a fixed threshold α(0,1)\alpha \in (0, 1), and are asked to preprocess SS such that, given a query range [i..j][i..j], we can efficiently report the symbols that occur more than α(ji+1)\alpha (j-i+1) times in S[i..j]S[i..j], which are called the range α\alpha-majorities. In this article we first describe a dynamic data structure that represents SS in compressed space --- nHk+o(nlgσ)nH_k+ o(n\lg \sigma) bits for any k=o(logσn)k = o(\log_{\sigma} n), where σ\sigma is the alphabet size and HkH0lgσH_k \le H_0 \le \lg\sigma is the kk-th order empirical entropy of SS --- and answers queries in O(lognαloglogn)O \left(\frac{\log n}{\alpha \log \log n} \right) time while supporting insertions and deletions in SS in O(lgnα)O \left( \frac{\lg n}{\alpha} \right) amortized time. We then show how to modify our data structure to receive some βα\beta \ge \alpha at query time and report the range β\beta-majorities in O(lognβloglogn)O \left( \frac{\log n}{\beta \log \log n} \right) time, without increasing the asymptotic space or update-time bounds. The best previous dynamic solution has the same query and update times as ours, but it occupies O(n)O(n) words and cannot take advantage of being given a larger threshold β\beta at query time. [ABSTRACT CLIPPED DUE TO LENGTH.]

Keywords

Cite

@article{arxiv.1611.01835,
  title  = {Compressed Dynamic Range Majority and Minority Data Structures},
  author = {Travis Gagie and Meng He and Gonzalo Navarro},
  journal= {arXiv preprint arXiv:1611.01835},
  year   = {2018}
}

Comments

Partially supported by Fondecyt grant 1-171058, Chile; NSERC, Canada; basal funds FB0001, Conicyt, Chile; and the Millenium Institute for Foundational Research on Data, Chile. A preliminary partial version of this article appeared in Proc. DCC 2017

R2 v1 2026-06-22T16:43:34.329Z