Pibiri G. E., Shibuya Y., Limasset A.
Data structures and algorithms
Motivation: Minimal perfect hashing is the problem of mapping a static set of n distinct keys into the address space {1, ... , n} bijectively. It is well-known that n log2(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 log2(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.Results: 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.Code Availability: https://github.com/jermp/lphashData Availability: https://zenodo.org/record/7239205
Source: Bioinformatics (Oxf., Online) 39 (2023): i534–i543. doi:10.1093/bioinformatics/btad219
Publisher: Oxford University Press., Oxford, Regno Unito
@article{oai:it.cnr:prodotti:484716, title = {Locality-preserving minimal perfect hashing of k-mers}, author = {Pibiri G. E. and Shibuya Y. and Limasset A.}, publisher = {Oxford University Press., Oxford, Regno Unito}, doi = {10.1093/bioinformatics/btad219}, journal = {Bioinformatics (Oxf., Online)}, volume = {39}, year = {2023} }
Preprint version
Published version
10.1093/bioinformatics/btad219