AI 中文总结
研究二次探测,通过平滑变体重新审视,分析罗宾汉与反罗宾汉排序下的性能,发现反罗宾汉排序性能更好,推广到\(d\)度探测,还通过概率方法证明多数随机固定偏移\(d\)度探测序列在反罗宾汉排序下有理想性能。
AI 中文摘要
二次探测是实践中广泛使用的开放寻址哈希表方案之一,但半个多世纪以来,其最基本的性能保证仍未得到很好的理解。本文通过平滑变体重新审视二次探测,其中每个键遵循随机探测序列,其第\(k\)次探测预期偏移量为\(\Theta(k^2)\)。这既是更好理解常规二次探测的玩具模型,也是一种自然的哈希方案。我们分析了罗宾汉排序和反罗宾汉排序的平滑二次探测,发现了惊人的差异:在负载因子\(1-\varepsilon\)时,反罗宾汉排序的预期查询时间为\(\Theta(\log \varepsilon^{-1})\),与常规二次探测的预期平均成功查询时间猜想相符,而罗宾汉排序为\(\Theta(\varepsilon^{-1/2})\)。我们的分析推广到任何\(d \ge 1\)的\(d\)度探测,反罗宾汉排序的预期查询时间为\(O(\max(\log \varepsilon^{-1}, \varepsilon^{1-2/d}))\),罗宾汉排序为\(\Theta(\varepsilon^{-1/d})\)。最后,我们超越平滑分析:使用概率方法表明,对于每个\(d \ge 2\),几乎每个随机固定偏移\(d\)度探测序列在反罗宾汉排序下的预期查询时间为\(O(\log \varepsilon^{-1})\)。因此,虽然二次探测本身仍然难以捉摸,但我们证明了基本上所有类似二次探测的固定偏移方案在反罗宾汉排序下都能实现理想性能。
英文摘要
Quadratic probing is one of the most widely used open-addressing hash-table schemes in practice, but after more than half a century, even its most basic performance guarantees remain poorly understood. In this paper, we revisit quadratic probing through the lens of a smoothed variant in which each key follows a random probe sequence where its $k$th probe is expected at offset $Θ(k^2)$. This is simultaneously a toy model for better understanding regular quadratic probing and a natural hashing scheme in its own right. We analyse smoothed quadratic probing for both Robin Hood ordering and anti-Robin Hood ordering and reveal a surprising separation: At load factor $1-\varepsilon$, anti-Robin Hood achieves an expected query time of $Θ(\log \varepsilon^{-1})$, which matches the conjectured expected average successful query time for regular quadratic probing, while Robin Hood falls short at $Θ(\varepsilon^{-1/2})$. Our analysis generalises to degree-$d$ probing for any $d \ge 1$ with expected query time $O(\max(\log \varepsilon^{-1}, \varepsilon^{1-2/d}))$ for anti-Robin Hood and $Θ(\varepsilon^{-1/d})$ for Robin Hood. Finally, we go beyond smoothed analysis: using the probabilistic method, we show that for every $d \ge 2$, almost every random fixed-offset degree-$d$ probing sequence achieves expected query time $O(\log \varepsilon^{-1})$ under anti-Robin Hood ordering, simultaneously over all admissible table sizes and load factors. Thus, while quadratic probing itself remains elusive, we prove that essentially all quadratic-probing-like fixed-offset schemes achieve the ideal performance under the anti-Robin Hood ordering.