Algorithms and Indexing Lower Bounds for Variable String Matching
Abstract
A generalized degenerate string (GD) is a sequence T=T1… Tn of nonempty finite sets of strings, called segments, such that all strings in a segment have the same length. Given a solid pattern P, GD string matching asks whether P occurs in T. 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(N m)-time algorithm, where N is the total size of T and m=|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) query time after linear preprocessing. We adapt this index to GD strings, obtaining O(nm) query time. Conversely, under SETH, we rule out GD indices with polynomial preprocessing and query time O(n1-m O(1)+m). Under the k-Clique conjecture, we further rule out combinatorial GD indices with query time O(n O(1)m1-+m), and combinatorial ED indices with query time O(n O(1)m2-), matching the quadratic dependence on m 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 m cannot be answered in O(m2-) time. Since these queries are the standard bottleneck in ED matching, improving indexed ED queries below O(n O(1)m2) would require both non-combinatorial techniques and an approach that avoids using active-prefix queries as the main bottleneck.
Turn this paper into a full lesson
ArcXiv compiles a staged curriculum from this paper: 8-12 lessons across beginner → advanced, synthesised section guides, visuals, flashcards, a quiz, exercises, and on-demand deep dives per section. Grounded in the abstract, never invented.