递归n-gram哈希最多是两两独立的
Recursive n-gram hashing is pairwise independent, at best
摘要:
许多应用使用n个连续符号的序列(n-gram)。散列这些n-gram可能是性能瓶颈。为了提高速度,递归哈希家族通过更新以前的值来计算哈希值。我们证明了递归哈希族不能超过两两独立。虽然通过不可约多项式进行的散列是成对独立的,但我们的实现要么在时间上运行O(n),要么使用指数数量的内存。作为一种更具可扩展性的替代方案,我们通过忽略n-1位来使循环多项式的散列成对独立。实验上,我们表明,由循环多项式散列是由不可约多项式散列的两倍。我们还表明,随机Karp-Rabin哈希家庭是不成对独立的。
英文摘要:
Many applications use sequences of n consecutive symbols (n-grams). Hashing these n-grams can be a performance bottleneck. For more speed, recursive hash families compute hash values by updating previous values. We prove that recursive hash families cannot be more than pairwise independent. While hashing by irreducible polynomials is pairwise independent, our implementations either run in time O(n) or use an exponential amount of memory. As a more scalable alternative, we make hashing by cyclic polynomials pairwise independent by ignoring n-1 bits. Experimentally, we show that hashing by cyclic polynomials is is twice as fast as hashing by irreducible polynomials. We also show that randomized Karp-Rabin hash families are not pairwise independent.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。