English

Adaptive Learning of Compressible Strings

Data Structures and Algorithms 2021-10-20 v3

Abstract

Suppose an oracle knows a string SS that is unknown to us and that we want to determine. The oracle can answer queries of the form "Is ss a substring of SS?". In 1995, Skiena and Sundaram showed that, in the worst case, any algorithm needs to ask the oracle σn/4O(n)\sigma n/4 -O(n) queries in order to be able to reconstruct the hidden string, where σ\sigma is the size of the alphabet of SS and nn its length, and gave an algorithm that spends (σ1)n+O(σn)(\sigma-1)n+O(\sigma \sqrt{n}) queries to reconstruct SS. The main contribution of our paper is to improve the above upper-bound in the context where the string is compressible. We first present a universal algorithm that, given a (computable) compressor that compresses the string to τ\tau bits, performs q=O(τ)q=O(\tau) substring queries; this algorithm, however, runs in exponential time. For this reason, the second part of the paper focuses on more time-efficient algorithms whose number of queries is bounded by specific compressibility measures. We first show that any string of length nn over an integer alphabet of size σ\sigma with rlerle runs can be reconstructed with q=O(rle(σ+lognrle))q=O(rle (\sigma + \log \frac{n}{rle})) substring queries in linear time and space. We then present an algorithm that spends qO(σglogn)q \in O(\sigma g\log n) substring queries and runs in O(n(logn+logσ)+q)O(n(\log n + \log \sigma)+ q) time using linear space, where gg is the size of a smallest straight-line program generating the string.

Keywords

Cite

@article{arxiv.2011.07143,
  title  = {Adaptive Learning of Compressible Strings},
  author = {Gabriele Fici and Nicola Prezza and Rossano Venturini},
  journal= {arXiv preprint arXiv:2011.07143},
  year   = {2021}
}

Comments

Accepted for publication in Theoretical Computer Science

R2 v1 2026-06-23T20:12:10.499Z