Improved Time and Space Bounds for Dynamic Range Mode
Abstract
Given an array A of elements, we wish to support queries for the most frequent and least frequent element in a subrange of . We also wish to support updates that change a particular element at index or insert/ delete an element at index . For the range mode problem, our data structure supports all operations in deterministic time using only space. This improves two results by Chan et al. \cite{C14}: a linear space data structure supporting update and query operations in time and an space data structure supporting update and query operations in time. For the range least frequent problem, we address two variations. In the first, we are allowed to answer with an element of that may not appear in the query range, and in the second, the returned element must be present in the query range. For the first variation, we develop a data structure that supports queries in time, updates in time, and occupies space. For the second variation, we develop a Monte Carlo data structure that supports queries in time, updates in time, and occupies space, but requires that updates are made independently of the results of previous queries. The Monte Carlo data structure is also capable of answering -frequency queries; that is, the problem of finding an element of given frequency in the specified query range. Previously, no dynamic data structures were known for least frequent element or -frequency queries.
Cite
@article{arxiv.1807.03827,
title = {Improved Time and Space Bounds for Dynamic Range Mode},
author = {Hicham El-Zein and Meng He and J. Ian Munro and Bryce Sandlund},
journal= {arXiv preprint arXiv:1807.03827},
year = {2018}
}