arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.10930cs.DS
收藏

Huffman-Bucket Sketch:一种用于基数估计的简单O(m)算法

Huffman-Bucket Sketch: A Simple $O(m)$ Algorithm for Cardinality Estimation

University of Gothenburg(哥德堡大学);Chalmers University of Technology(查尔姆斯理工大学)

Matti Karppa

AI总结:

Huffman-Bucket Sketch通过高效压缩HyperLogLog草图,以更低的内存需求实现基数估计,同时保持可合并性和高效率。

摘要:

我们介绍了Huffman-Bucket Sketch(HBS),一种简单且可合并的数据结构,能够无损地将具有m个寄存器的HyperLogLog(HLL)草图压缩到最优空间O(m+log n)位,具有均摊常数时间的更新操作,作为HLL的直接替代方案,保留了可合并性并显著减少了内存需求。我们将寄存器分成小桶,并使用从强集中HLL排名分布中推导出的全局Huffman代码表对它们的值进行编码,使用当前的基数估计值来确定分布的模式。我们证明Huffman树仅需在流中重建O(log n)次,大致在基数翻倍时。该框架可以扩展到具有类似强集中分布的其他草图。我们提供了初步的数值证据,表明HBS是可行的,并且在实践中可能具有竞争力。

英文摘要:

We introduce the Huffman-Bucket Sketch (HBS), a simple, mergeable data structure that losslessly compresses a HyperLogLog (HLL) sketch with $m$ registers to optimal space $O(m+\log n)$ bits, with amortized constant-time updates, acting as a drop-in replacement for HLL that retains mergeability and substantially reduces memory requirements. We partition registers into small buckets and encode their values with a global Huffman codebook derived from the strongly concentrated HLL rank distribution, using the current cardinality estimate for determining the mode of the distribution. We prove that the Huffman tree needs rebuilding only $O(\log n)$ times over a stream, roughly when cardinality doubles. The framework can be extended to other sketches with similar strongly concentrated distributions. We provide preliminary numerical evidence that suggests that HBS is practical and can potentially be competitive with state-of-the-art in practice.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑