English

Indexing Strings with Utilities

Data Structures and Algorithms 2025-04-09 v1 Databases

Abstract

Applications in domains ranging from bioinformatics to advertising feature strings that come with numerical scores (utilities). The utilities quantify the importance, interest, profit, or risk of the letters occurring at every position of a string. Motivated by the ever-increasing rate of generating such data, as well as by their importance in several domains, we introduce Useful String Indexing (USI), a natural generalization of the classic String Indexing problem. Given a string SS (the text) of length nn, USI asks for preprocessing SS into a compact data structure supporting the following queries efficiently: given a shorter string PP (the pattern), return the global utility U(P)U(P) of PP in SS, where UU is a function that maps any string PP to a utility score based on the utilities of the letters of every occurrence of PP in SS. Our work also makes the following contributions: (1) We propose a novel and efficient data structure for USI based on finding the top-KK frequent substrings of SS. (2) We propose a linear-space data structure that can be used to mine the top-KK frequent substrings of SS or to tune the parameters of the USI data structure. (3) We propose a novel space-efficient algorithm for estimating the set of the top-KK frequent substrings of SS, thus improving the construction space of the data structure for USI. (4) We show that popular space-efficient top-KK frequent item mining strategies employed by state-of-the-art algorithms do not smoothly translate from items to substrings. (5) Using billion-letter datasets, we experimentally demonstrate that: (i) our top-KK frequent substring mining algorithms are accurate and scalable, unlike two state-of-the-art methods; and (ii) our USI data structures are up to 1515 times faster in querying than 44 nontrivial baselines while occupying the same space with them.

Keywords

Cite

@article{arxiv.2504.05917,
  title  = {Indexing Strings with Utilities},
  author = {Giulia Bernardini and Huiping Chen and Alessio Conte and Roberto Grossi and Veronica Guerrini and Grigorios Loukides and Nadia Pisanti and and Solon P. Pissis},
  journal= {arXiv preprint arXiv:2504.05917},
  year   = {2025}
}

Comments

ICDE 2025 (abstract abridged to satisfy arXiv requirements)

R2 v1 2026-06-28T22:50:41.915Z