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

k-mer 的保局部性最小完美哈希

Locality-Preserving Minimal Perfect Hashing of k-mers

Giulio Ermanno Pibiri, Yoshihiro Shibuya, Antoine Limasset

AI总结:

本文针对连续提取的 k-mer 提出一种保局部性最小完美哈希函数,利用相邻 k-mer 的重叠关系突破经典空间下界,使连续 k-mer 映射到连续地址,实验表明其空间占用更小且查询更快。

摘要:

最小完美哈希是将一个包含 n 个不同键的静态集合双射映射到地址空间 {1,…,n} 的问题。众所周知,当不利用输入键的任何额外信息时,指定一个最小完美哈希函数(MPHF)f 需要 n log2(e) 比特。然而,在实践中输入键往往具有内在关系,我们可以利用这些关系来降低 f 的比特复杂度。例如,考虑一个字符串及其所有不同的 k-mer 作为输入键:由于两个连续的 k-mer 共享 k-1 个符号的重叠,在这种情况下似乎有可能突破经典的 log2(e) 比特/键的界限。此外,我们希望 f 将连续的 k-mer 映射到连续的地址,从而尽可能在值域中保留它们之间的关系。这在实践中是一个有用的特性,因为它保证了 f 具有一定程度的引用局部性,从而在查询连续 k-mer 时获得更好的评估时间。基于这些前提,我们开创性地研究了一种新型的保局部性 MPHF,该函数专为从字符串集合中连续提取的 k-mer 而设计。我们设计了一种空间使用量随 k 增大而减少的构造方法,并讨论了该方法实际实现的实验:在实践中,用我们的方法构建的函数可以比文献中最有效的 MPHF 小几倍,甚至查询速度更快。

英文摘要:

Minimal perfect hashing is the problem of mapping a static set of $n$ distinct keys into the address space $\{1,\ldots,n\}$ bijectively. It is well-known that $n\log_2(e)$ bits are necessary to specify a minimal perfect hash function (MPHF) $f$, when no additional knowledge of the input keys is to be used. However, it is often the case in practice that the input keys have intrinsic relationships that we can exploit to lower the bit complexity of $f$. For example, consider a string and the set of all its distinct $k$-mers as input keys: since two consecutive $k$-mers share an overlap of $k-1$ symbols, it seems possible to beat the classic $\log_2(e)$ bits/key barrier in this case. Moreover, we would like $f$ to map consecutive $k$-mers to consecutive addresses, as to also preserve as much as possible their relationship in the codomain. This is a useful feature in practice as it guarantees a certain degree of locality of reference for $f$, resulting in a better evaluation time when querying consecutive $k$-mers. Motivated by these premises, we initiate the study of a new type of locality-preserving MPHF designed for $k$-mers extracted consecutively from a collection of strings. We design a construction whose space usage decreases for growing $k$ and discuss experiments with a practical implementation of the method: in practice, the functions built with our method can be several times smaller and even faster to query than the most efficient MPHFs in the literature.

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

↑