English

Near-Optimal Search Time in $\delta$-Optimal Space, and Vice Versa

Data Structures and Algorithms 2023-11-10 v4

Abstract

Two recent lower bounds on the compressibility of repetitive sequences, δγ\delta \le \gamma, have received much attention. It has been shown that a length-nn string SS over an alphabet of size σ\sigma can be represented within the optimal O(δlognlogσδlogn)O(\delta\log\tfrac{n\log \sigma}{\delta \log n}) space, and further, that within that space one can find all the occocc occurrences in SS of any length-mm pattern in time O(mlogn+occlogϵn)O(m\log n + occ \log^\epsilon n) for any constant ϵ>0\epsilon>0. Instead, the near-optimal search time O(m+(occ+1)logϵn)O(m+({occ+1})\log^\epsilon n) has been achieved only within O(γlognγ)O(\gamma\log\frac{n}{\gamma}) space. Both results are based on considerably different locally consistent parsing techniques. The question of whether the better search time could be supported within the δ\delta-optimal space remained open. In this paper, we prove that both techniques can indeed be combined to obtain the best of both worlds: O(m+(occ+1)logϵn)O(m+({occ+1})\log^\epsilon n) search time within O(δlognlogσδlogn)O(\delta\log\tfrac{n\log \sigma}{\delta \log n}) space. Moreover, the number of occurrences can be computed in O(m+log2+ϵn)O(m+\log^{2+\epsilon}n) time within O(δlognlogσδlogn)O(\delta\log\tfrac{n\log \sigma}{\delta \log n}) space. We also show that an extra sublogarithmic factor on top of this space enables optimal O(m+occ)O(m+occ) search time, whereas an extra logarithmic factor enables optimal O(m)O(m) counting time.

Keywords

Cite

@article{arxiv.2206.00781,
  title  = {Near-Optimal Search Time in $\delta$-Optimal Space, and Vice Versa},
  author = {Tomasz Kociumaka and Gonzalo Navarro and Francisco Olivares},
  journal= {arXiv preprint arXiv:2206.00781},
  year   = {2023}
}