We develop dynamic dictionaries on the word RAM that use asymptotically optimal space, up to constant factors, subject to insertions and deletions, and subject to supporting perfect-hashing queries and/or membership queries, each operation in constant time with high probability. When supporting only membership queries, we attain the optimal space bound of Theta(n lg(u/n)) bits, where n and u are the sizes of the dictionary and the universe, respectively. Previous dictionaries either did not achieve this space bound or had time bounds that were only expected and amortized. When supporting perfect-hashing queries, the optimal space bound depends on the range {1,2,...,n+t} of hashcodes allowed as output. We prove that the optimal space bound is Theta(n lglg(u/n) + n lg(n/(t+1))) bits when supporting only perfect-hashing queries, and it is Theta(n lg(u/n) + n lg(n/(t+1))) bits when also supporting membership queries. All upper bounds are new, as is the Omega(n lg(n/(t+1))) lower bound.
Locality Sensitive Hashing for Set-Queries, Motivated by Group Recommendations
局部敏感哈希(LSH)是一种有效的方法来索引一组点,这样我们就可以有效地找到查询点的最近邻居。我们将这种方法扩展到我们的新的集查询LSH(SLSH),这样它就可以找到一组点的最近邻居,作为查询。令$ s(x,y) $为两个点$ x $和$ y $之间的相似度。我们通过聚合所有$ p\in Q $的相似性$ s(p,x) $来定义集合$ Q$和点$ x $之间的相似性。例如,我们可以将$ s(p,x) $作为$ p $和$ x $之间的角度相似性(即,$1-{\angle (x,p)}/π$),并通过算术或几何平均或取最低相似性进行聚集。我们开发了本地敏感的哈希家庭和数据结构的一大套这样的算术和几何平均相似性,并分析其碰撞概率。我们还建立了一个类似的框架和散列距离函数的家庭。具体来说,我们给出了一个结构的欧氏距离聚合的平均值或采取最大值。我们利用SLSH来解决近似近邻问题的几何扩展。在这个版本中,我们考虑了一个度量,其中单位球是一个椭球体,其方向是由查询指定的。激励我们工作的一个重要应用是组推荐系统。这样的系统将电影和用户嵌入在相同的特征空间中,并且推荐一部电影供一组人一起观看的任务使用适当的相似性转换为集合查询$ Q $。
单调最小完美散列函数(MMPHF)问题是下面的索引问题。给定一组$S= \{s_1,\ldots,s_n\}$,其中$n$是来自大小为$u$的全域$U$的不同键,创建一个回答以下查询的数据结构$DS$:\[ RankOp(q) = \text{rank of } q \text{ in } S \text{ for all } q\in S ~\text{ and arbitrary answer otherwise.} \] MMPHF问题的解决方案在理论和实践中都有广泛的应用。该问题已知的最佳上限是以$O(n\log\log\log u)$位对$DS$进行编码,并在$O(\log u)$时间内执行查询。这一直是一个开放的问题,无论是提高空间上界或显示,这个有点奇怪的外观界是紧的。在本文中,我们表明后者:具体地说,任何数据结构(确定性或随机)的单调最小完美哈希的任何集合的$n$元素从宇宙的大小$u$需要$Ω(n \cdot \log\log\log{u})$预期位正确地回答每个查询。我们通过定义一个图$\mathbf{G}$来实现我们的下界,其中节点是可能的${u \choose n}$输入,并且如果两个节点不能共享相同的$DS$,则它们是相邻的。$DS$的大小则由$\mathbf{G}$的色数的对数下界。最后,我们证明了$\mathbf{G}$的分数色数(从而色数)是由$2^{…
哈希表是字典数据结构的一个普遍存在的类别。然而,标准的哈希表实现不能很好地转换到外部内存模型中,因为它们没有包含插入的局部性。Iacono和Patracsu为外部哈希表建立了一个更新/查询权衡曲线:在$O(λ/B)$分期IO中执行插入的哈希表需要$Ω(\log_λN)$预期的IO用于查询,其中$N$是可以存储在数据结构中的项目的数量,$B$是内存传输的大小,$M$是内存的大小,$λ$是一个调优参数。它们为$λ$提供了一种满足该曲线的散列数据结构,即$Ω(\log\log M + \log_M N)$。他们的数据结构,我们称之为\defn{IP hash table},是复杂的,据我们所知,还没有实现。在本文中,我们提出了一个新的和更简单的最佳外部存储器哈希表,\defn{Bundle of Arrays Hash Table}(BOA)。BOA基于大小分层的LSM,这是一种经过充分研究的数据结构,并且几乎同样容易实现。BOA最适用于较窄范围的$λ$。然而,BOA的简单性允许它们容易地被修改以实现以下结果:\begin{itemize} \item A new external memory data structure, the \defn{Bundle of Trees Hash Table} (BOT), that matches the performance of the …