Hash table search algorithms have been a fundamental research topic in computer science for decades. The widely accepted belief, originating from early theoretical work by Professor Yao, suggests that random probing is the optimal approach for open-addressing hash tables. However, a recent study by an undergraduate at the University of Cambridge challenges this notion, introducing an elastic search method with fixed interval thresholds. While this approach offers improvements over prior methods, we argue that its reliance on static threshold values limits its theoretical optimality. In this paper, we present the Bathroom Model, a novel approach to hash table search optimization inspired by real-world stall selection behavior. Unlike existing techniques, our method dynamically adjusts search strategies based on prior occupancy information, resulting in a more efficient probing mechanism. We formalize this model, analyze its theoretical performance, and compare it against state-of-the-art hash table search methods. Our results demonstrate that adaptive probing strategies significantly enhance lookup performance while maintaining low computational overhead. This research highlights the potential for fundamental algorithmic advancements in long-established domains and suggests new directions for optimizing hash table performance.
翻译:哈希表搜索算法数十年来一直是计算机科学的基础研究课题。源于姚期智教授早期理论工作的普遍观点认为,随机探测是开放寻址哈希表的最优方法。然而,剑桥大学一名本科生最近的研究对这一观点提出了挑战,提出了一种具有固定间隔阈值的弹性搜索方法。尽管该方法较先前方法有所改进,我们认为其依赖静态阈值限制了理论最优性。本文提出浴室模型——一种受现实世界隔间选择行为启发的新型哈希表搜索优化方法。与现有技术不同,我们的方法基于先前的占用信息动态调整搜索策略,从而形成更高效的探测机制。我们将该模型形式化,分析其理论性能,并与最先进的哈希表搜索方法进行比较。结果表明,自适应探测策略在保持低计算开销的同时显著提升了查找性能。这项研究揭示了在长期确立的领域中实现基础算法突破的潜力,并为优化哈希表性能提出了新的方向。