Optimal Encodings for Range Majority Queries
Data Structures and Algorithms
2014-10-07 v3
Abstract
We study the problem of designing a data structure that reports the positions of the distinct -majorities within any range of an array , without storing . A -majority in a range , for , is an element that occurs more than times in . We show that bits are necessary for any data structure able just to count the number of distinct -majorities in any range. Then, we design a structure using bits that returns one position of each -majority of in time, on a RAM machine with word size (it can output any further position where each -majority occurs in additional time). Finally, we show how to remove a factor from the time by adding bits of space to the structure.
Keywords
Cite
@article{arxiv.1404.2677,
title = {Optimal Encodings for Range Majority Queries},
author = {Gonzalo Navarro and Sharma V. Thankachan},
journal= {arXiv preprint arXiv:1404.2677},
year = {2014}
}