当前位置: X-MOL 学术Algorithmica › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Compressed Dynamic Range Majority and Minority Data Structures
Algorithmica ( IF 1.1 ) Pub Date : 2020-02-17 , DOI: 10.1007/s00453-020-00687-6
Travis Gagie , Meng He , Gonzalo Navarro

In the range $$\alpha$$ α -majority query problem, we are given a sequence $$S[1\ldots n]$$ S [ 1 … n ] and a fixed threshold $$\alpha \in (0, 1)$$ α ∈ ( 0 , 1 ) , and are asked to preprocess S such that, given a query range $$[i\ldots j]$$ [ i … j ] , we can efficiently report the symbols that occur more than $$\alpha (j-i+1)$$ α ( j - i + 1 ) times in $$S[i\ldots j]$$ S [ i … j ] , which are called the range $$\alpha$$ α -majorities. In this article we describe the first compressed dynamic data structure for range $$\alpha$$ α -majority queries. It represents S in compressed space— $$nH_k+ o(n\lg \sigma )$$ n H k + o ( n lg σ ) bits for any $$k = o(\lg _{\sigma } n)$$ k = o ( lg σ n ) , where $$\sigma$$ σ is the alphabet size and $$H_k \le H_0 \le \lg \sigma$$ H k ≤ H 0 ≤ lg σ is the k th order empirical entropy of S —and answers queries in $$O \left( \frac{\lg n}{\alpha \lg \lg n} \right)$$ O lg n α lg lg n time while supporting insertions and deletions in S in $$O \left( \frac{\lg n}{\alpha } \right)$$ O lg n α 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 \left( \frac{\lg n}{\beta \lg \lg n} \right)$$ O lg n β lg lg n 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 ) words and cannot take advantage of being given a larger threshold $$\beta$$ β at query time. We also design the first dynamic data structure for range $$\alpha$$ α -minority—i.e., find a non- $$\alpha$$ α -majority that occurs in a range—and obtain space and time bounds similar to those for $$\alpha$$ α -majorities. We extend the structure to find $$\varTheta (1/\alpha )$$ Θ ( 1 / α ) $$\alpha$$ α -minorities at the same space and time cost. By giving up updates, we obtain static data structures with query time $$O((1 / \alpha ) \lg \lg _w \sigma )$$ O ( ( 1 / α ) lg lg w σ ) for both problems, on a RAM with word size $$w = \varOmega (\lg n)$$ w = Ω ( lg n ) bits, without increasing our space bound. Static alternatives reach time $$O(1/\alpha )$$ O ( 1 / α ) , but they compress S only to zeroth order entropy ( $$H_0$$ H 0 ) or they only handle small values of $$\alpha$$ α , that is, $$\lg (1/\alpha ) = o(\lg \sigma )$$ lg ( 1 / α ) = o ( lg σ ) .

中文翻译:

压缩动态范围多数和少数数据结构

在 $$\alpha$$ α -majority 查询问题中,给定序列 $$S[1\ldots n]$$ S [ 1 … n ] 和固定阈值 $$\alpha \in (0, 1)$$ α ∈ ( 0 , 1 ) ,并被要求对 S 进行预处理,以便在给定查询范围 $$[i\ldots j]$$ [ i … j ] 的情况下,我们可以有效地报告出现次数更多的符号在 $$S[i\ldots j]$$ S [ i … j ] 中比 $$\alpha (j-i+1)$$ α ( j - i + 1 ) 次,称为 $$\ alpha$$ α -多数。在本文中,我们描述了范围 $$\alpha$$ α 多数查询的第一个压缩动态数据结构。它表示压缩空间中的 S——$$nH_k+ o(n\lg \sigma )$$ n H k + o ( n lg σ ) 位对于任何 $$k = o(\lg _{\sigma } n)$$ k = o ( lg σ n ) , 其中 $$\sigma$$ σ 是字母表大小, $$H_k \le H_0 \le \lg \sigma$$ H k ≤ H 0 ≤ lg σ 是 S 的第 k 阶经验熵,并回答 $ 中的查询$O \left( \frac{\lg n}{\alpha \lg \lg n} \right)$$ O lg n α lg lg n 时间同时支持$O \left( \frac {\lg n}{\alpha } \right)$$ O lg n α 摊销时间。然后我们展示如何修改我们的数据结构以在查询时接收一些 $$\beta \ge \alpha$$ β ≥ α 并报告 $$O \left( \frac {\lg n}{\beta \lg \lg n} \right)$$ O lg n β lg lg n 时间,不增加渐近空间或更新时间界限。先前最好的动态解决方案与我们的具有相同的查询和更新时间,但它占用 O ( n ) 个单词并且无法利用在查询时被赋予更大的阈值 $$\beta$$ β。我们还为范围 $$\alpha$$ α -minority 设计了第一个动态数据结构——即,找到一个出现在一个范围内的非 $$\alpha$$ α -majority——并获得类似于那些的空间和时间界限对于 $$\alpha$$ α -多数。我们扩展结构以在相同的空间和时间成本下找到 $$\varTheta (1/\alpha )$$ Θ ( 1 / α ) $$\alpha$$ α -minorities。通过放弃更新,我们获得了查询时间为 $$O((1 / \alpha ) \lg \lg _w \sigma )$$ O ( ( 1 / α ) lg lg w σ ) 的静态数据结构,在字长 $$w = \varOmega (\lg n)$$ w = Ω (lg n) 位的 RAM,而不会增加我们的空间限制。静态替代方案到达时间 $$O(1/\alpha )$$ O ( 1 / α ) ,但它们仅将 S 压缩到零阶熵 ( $$H_0$$ H 0 ) 或者它们仅处理 $$\ 的小值alpha$$ α ,即
更新日期:2020-02-17
down
wechat
bug