Range Majorities and Minorities in Arrays

Belazzougui, Djamal; Gagie, Travis; Munro, J. Ian; Nekrich, Yakov

Abstract

The problem of parameterized range majority asks us 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 tau. This is a more tractable version of the classical problem of finding the range mode, which is unlikely to be solvable in polylogarithmic time and linear space. In this paper we give the first linear-space solution with optimal O(1/tau) query time, even when tau can be specified with the query. We then consider data structures whose space is bounded by the entropy of the distribution of the symbols in the sequence. For the case when the alphabet size sigma is polynomial on the computer word size, we retain the optimal time within optimally compressed space (i.e., with sublinear redundancy). Otherwise, either the compressed space is increased by an arbitrarily small constant factor or the time rises to any function in (1 /tau) . omega(1). We obtain the same results on the complementary problem of parameterized range minority.

Más información

Título según WOS: Range Majorities and Minorities in Arrays
Título de la Revista: ALGORITHMICA
Volumen: 83
Número: 6
Editorial: Springer
Fecha de publicación: 2021
Página de inicio: 1707
Página final: 1733
DOI:

10.1007/s00453-021-00799-7

Notas: ISI