动态差分编码字典的最优时间-空间权衡
Optimal Time-Space Tradeoff for Dynamic Difference-Encoded Dictionaries
AI总结:
本文针对差分编码字典,突破过往时间空间界限,构造出支持$O(\log\varepsilon^{-1}/\log\log\varepsilon^{-1})$摊还时间、空间接近间隙熵的动态字典,且证明该时间空间权衡最优。
AI中文摘要:
动态字典是一种基础数据结构,用于维护集合$S\subset [U]$,其大小为$n$(假设$n=U^{1-\Theta(1)}$),支持插入、删除和成员查询操作。过往研究大多聚焦于构建支持$O(1)$时间操作、空间尽可能接近信息论界$\log\binom{U}{n}$比特的字典。本文研究差分编码字典,这类字典使用的空间接近间隙熵$\text{gap}(S):=\sum_{i=2}^{|S|}\left(\lceil\log(x_i-x_{i-1}+1)\rceil+1\right)$比特来存储集合$S=\{x_1<\dots<x_n\}$。在许多键值聚类的真实数据集上,$\text{gap}(S)\ll \log\binom{U}{n}$,使得差分编码字典在实际应用中比标准字典更具优势。在本研究之前,最优的动态差分编码字典由Blandford和Blelloch(SODA'04)提出,其构造支持$O(\log n)$时间的操作,空间使用$O(\text{gap}(S))$比特。在静态场景下,Gupta、Hon、Shah和Vitter(DCC'06)提出的字典使用$\text{gap}(S)+O(n\log\log U)$比特空间,支持$O(\log\log n)$时间的成员查询。在本研究中,我们突破了这些界限,完全解决了差分编码字典的最优时间-空间权衡问题。对于任意参数$0<\varepsilon<1/4$,我们构造了一种动态字典,其操作支持$O(\log\varepsilon^{-1}/\log\log\varepsilon^{-1})$的期望摊还时间,空间使用$\text{gap}(S)\cdot(1+O(\varepsilon))+O\left(n\log\frac{\text{gap}(S)}{n}\right)$比特。我们还证明了匹配的下界,表明我们的时间-空间权衡即使在静态场景下也是最优的。
英文摘要:
The dynamic dictionary is a fundamental data structure that maintains a set $S\subset [U]$ of size $n$ (we assume $n=U^{1-Θ(1)}$), supporting insertions, deletions and membership queries. Previous works mostly focused on constructing dictionaries that support operations in $O(1)$ time and use space as close to the \emph{information-theoretic bound} of $\log\binom{U}{n}$ bits as possible. In this paper, we study \emph{difference-encoded} dictionaries, which are dictionaries that use space close to the gap entropy $\text{gap}(S):=\sum_{i=2}^{|S|}\left(\lceil\log(x_i-x_{i-1}+1)\rceil+1\right)$ bits to store the set $S=\{x_1<\dots<x_n\}$. On many real-world datasets where the keys are clustered, we have $\text{gap}(S)\ll \log\binom{U}{n}$, making difference-encoded dictionaries more favorable than standard dictionaries in practice. Prior to this work, the best dynamic difference-encoded dictionary is by Blandford and Blelloch [SODA'04], whose construction supports operations in $O(\log n)$ time and uses $O(\text{gap}(S))$ bits of space. In the static case, Gupta, Hon, Shah and Vitter [DCC'06] presented a dictionary that uses $$ \text{gap}(S)+O(n\log\log U) $$ bits of space and supports membership queries in $O(\log\log n)$ time. In this work, we go beyond these bounds and fully settle the optimal time-space tradeoff for difference-encoded dictionaries. For an arbitrary parameter $0<\varepsilon<1/4$, we construct a dynamic dictionary that supports operations in $O(\log\varepsilon^{-1}/\log\log\varepsilon^{-1})$ expected amortized time and uses $$ \text{gap}(S)\cdot(1+O(\varepsilon))+O\left(n\log\frac{\text{gap}(S)}{n}\right) $$ bits of space. We also prove a matching lower bound, showing that our time-space tradeoff is optimal even in the \emph{static} case.