English

Locality-Preserving Minimal Perfect Hashing of k-mers

Data Structures and Algorithms 2023-04-13 v2

Abstract

Minimal perfect hashing is the problem of mapping a static set of nn distinct keys into the address space {1,,n}\{1,\ldots,n\} bijectively. It is well-known that nlog2(e)n\log_2(e) bits are necessary to specify a minimal perfect hash function (MPHF) ff, 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 ff. For example, consider a string and the set of all its distinct kk-mers as input keys: since two consecutive kk-mers share an overlap of k1k-1 symbols, it seems possible to beat the classic log2(e)\log_2(e) bits/key barrier in this case. Moreover, we would like ff to map consecutive kk-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 ff, resulting in a better evaluation time when querying consecutive kk-mers. Motivated by these premises, we initiate the study of a new type of locality-preserving MPHF designed for kk-mers extracted consecutively from a collection of strings. We design a construction whose space usage decreases for growing kk 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.

Keywords

Cite

@article{arxiv.2210.13097,
  title  = {Locality-Preserving Minimal Perfect Hashing of k-mers},
  author = {Giulio Ermanno Pibiri and Yoshihiro Shibuya and Antoine Limasset},
  journal= {arXiv preprint arXiv:2210.13097},
  year   = {2023}
}

Comments

Accepted to ISMB 2023