中文

Algorithms and Indexing Lower Bounds for Variable String Matching

数据结构与算法 2026-07-09 v1

摘要

A \emph{generalized degenerate string} (GD) is a sequence T=T1TnT=T_1\dots T_n of nonempty finite sets of strings, called \emph{segments}, such that all strings in a segment have the same length. Given a solid pattern PP, GD string matching asks whether PP occurs in TT. Ascone et al. (WABI 2024) identified this as the main remaining boundary case in the fine-grained complexity of pattern matching on variable strings, between variants with near-linear algorithms and those with SETH-based quadratic lower bounds. We give a O~(Nm)\tilde{\mathcal O}(N\sqrt m)-time algorithm, where NN is the total size of TT and m=Pm=|P|, placing GD matching on the subquadratic side of this boundary. We also study indexing. For elastic-degenerate strings (ED), which drop the equal-width restriction, Gibney (SPIRE 2020) obtained O(nm2)\mathcal O(nm^2) query time after linear preprocessing. We adapt this index to GD strings, obtaining O(nm)\mathcal O(nm) query time. Conversely, under SETH, we rule out GD indices with polynomial preprocessing and query time O(n1εmO(1)+m)\mathcal O(n^{1-\varepsilon}m^{\mathcal O(1)}+m). Under the kk-Clique conjecture, we further rule out combinatorial GD indices with query time O(nO(1)m1ε+m)\mathcal O(n^{\mathcal O(1)}m^{1-\varepsilon}+m), and combinatorial ED indices with query time O(nO(1)m2ε)\mathcal O(n^{\mathcal O(1)}m^{2-\varepsilon}), matching the quadratic dependence on mm in Gibney's upper bound. Finally, under the OMv conjecture, we show that, after polynomial preprocessing of a string set and a pattern, active-prefix queries on a bit vector of length mm cannot be answered in O(m2ε)\mathcal O(m^{2-\varepsilon}) time. Since these queries are the standard bottleneck in ED matching, improving indexed ED queries below O(nO(1)m2)\mathcal O(n^{\mathcal O(1)}m^2) would require both non-combinatorial techniques and an approach that avoids using active-prefix queries as the main bottleneck.

引用

@article{arxiv.2607.08566,
  title  = {Algorithms and Indexing Lower Bounds for Variable String Matching},
  author = {Estéban Gabory},
  journal= {arXiv preprint arXiv:2607.08566},
  year   = {2026}
}