English

Document Listing on Repetitive Collections with Guaranteed Performance

Data Structures and Algorithms 2018-11-15 v3

Abstract

We consider document listing on string collections, that is, finding in which strings a given pattern appears. In particular, we focus on repetitive collections: a collection of size NN over alphabet [1,σ][1,\sigma] is composed of DD copies of a string of size nn, and ss edits are applied on ranges of copies. We introduce the first document listing index with size O~(n+s)\tilde{O}(n+s), precisely O((nlogσ+slog2N)logD)O((n\log\sigma+s\log^2 N)\log D) bits, and with useful worst-case time guarantees: Given a pattern of length mm, the index reports the \ndoc>0\ndoc>0 strings where it appears in time O(mlog1+ϵN\ndoc)O(m\log^{1+\epsilon} N \cdot \ndoc), for any constant ϵ>0\epsilon>0 (and tells in time O(mlogN)O(m\log N) if \ndoc=0\ndoc=0). Our technique is to augment a range data structure that is commonly used on grammar-based indexes, so that instead of retrieving all the pattern occurrences, it computes useful summaries on them. We show that the idea has independent interest: we introduce the first grammar-based index that, on a text T[1,N]T[1,N] with a grammar of size rr, uses O(rlogN)O(r\log N) bits and counts the number of occurrences of a pattern P[1,m]P[1,m] in time O(m2+mlog2+ϵr)O(m^2 + m\log^{2+\epsilon} r), for any constant ϵ>0\epsilon>0. We also give the first index using O(zlog(N/z)logN)O(z\log(N/z)\log N) bits, where TT is parsed by Lempel-Ziv into zz phrases, counting occurrences in time O(mlog2+ϵN)O(m\log^{2+\epsilon} N).

Keywords

Cite

@article{arxiv.1707.06374,
  title  = {Document Listing on Repetitive Collections with Guaranteed Performance},
  author = {Gonzalo Navarro},
  journal= {arXiv preprint arXiv:1707.06374},
  year   = {2018}
}

Comments

Extended version of CPM'17 paper

R2 v1 2026-06-22T20:52:31.548Z