Papers
Topics
Authors
Recent
Search
2000 character limit reached

Longest Common Extension of a Dynamic String in Parallel Constant Time

Published 14 Apr 2026 in cs.DS | (2604.12696v1)

Abstract: A longest common extension (LCE) query on a string computes the length of the longest common suffix or prefix at two given positions. A dynamic LCE algorithm maintains a data structure that allows efficient LCE queries on a string that can change via character insertions and deletions. A dynamic parallel constant-time algorithm is presented that can maintain LCE queries on a common CRCW PRAM with $\mathcal{O}(nε)$ work, for any $ε> 0$. The algorithm maintains a string synchronizing sets hierarchy, which it uses to answer substring equality queries, which it in turn uses to answer LCE queries. To achieve constant runtime, the algorithm allows parts of its information to become outdated by up to $\log n \log* n$ updates. It answers queries by combining this slightly outdated information with a list of the recent changes. Two applications of this dynamic LCE algorithm are shown. Firstly, a dynamic parallel constant-time algorithm can maintain membership in a Dyck language $D_k, k > 0$ with $\mathcal{O}(nε)$ work for any $ε> 0$. Secondly, a dynamic parallel constant-time algorithm can maintain squares with $\mathcal{O}(nε)$ work for any $ε> 0$.

Authors (1)

Summary

  • The paper introduces a parallel constant-time solution for the dynamic LCE problem by integrating hierarchical synchronizing sets with controlled staleness.
  • It employs efficient batching and localized updates to ensure both substring queries and dynamic updates run in constant time using sublinear processor work.
  • The approach is validated through practical applications in dynamic Dyck languages and square detection, marking a significant advancement in parallel dynamic string algorithms.

Parallel Dynamic Longest Common Extension in Constant Time

Problem Definition and Relevance

The paper addresses the dynamic Longest Common Extension (LCE) problem under parallel computation. An LCE query returns the length of the longest common prefix or suffix between two substrings starting or ending at specified indices of a string. In the dynamic variant, the underlying string is mutable, supporting character-level insertions and deletions. Efficient LCE data structures are central for dynamic text indexing, string matching, pattern algorithms, and numerous combinatorial problems on strings.

Prior research provides constant-time (sequential) LCE queries for static strings using suffix trees or arrays, and polylogarithmic-time dynamic solutions on sequential RAMs. In parallel settings, particularly on PRAMs, previous approaches focus almost exclusively on static LCE, achieving polylogarithmic time bounds. This work closes a critical theoretical gap by presenting a parallel constant-time solution for the dynamic LCE problem, explicitly within the common CRCW PRAM model, at the expense of slightly sublinear total work.

Algorithmic Framework

The approach is built upon three foundational elements:

  1. String Synchronizing Sets Hierarchy (Kempa & Kociumaka): These are hierarchical collections of substring occurrences that facilitate efficient substring-equality and, by extension, LCE queries via canonical segment coverings. Each level stores occurrences for substrings of length τ=2z\tau=2^z with guarantees of density, consistency, and sparseness, as well as a naming mechanism that allows constant-time equality checks.
  2. Dynamic Parallelization via Muddling-Lemma Techniques: The standard dynamic construction and maintenance of synchronizing sets hierarchies, as in Kempa & Kociumaka (2022), are inherently sequential and polylogarithmic in time. To parallelize, the algorithm strategically relaxes consistency: it briefly tolerates the data structures being slightly outdated (up to O(lognlogn)O(\log n \log^* n) updates), maintaining a recent-changes log and amortizing the work needed for each update over a sliding window of subsequent updates. The key insight is that, although parts of the hierarchy might refer to states up to O(lognlogn)O(\log n \log^* n) steps old, queries can be made correct by piecing together up-to-date and delayed information across segment boundaries.
  3. Efficient Batching and Locality: Updates and queries are carefully designed to only affect and inspect O(logn)\mathcal{O}(\log^* n)-sized neighborhoods in the decomposition and synchronizing sets hierarchies. Mechanisms such as deterministic coin flipping allow merges and decisions to be highly local, minimizing cross-dependence and enabling efficient parallel batch processing.

Key Theoretical Results

The main technical result is stated formally as follows:

For any constant ϵ>0\epsilon > 0, there exists a dynamic algorithm operating on a "common CRCW PRAM" that maintains a data structure for a size-nn string SS, such that:

  • Initialization runs in parallel constant time using O(nlognlogn)\mathcal{O}(n \log n \log^* n) processors.
  • Both updates (single-character insertion or deletion) and LCE queries are answered in parallel constant time using O(nϵ)\mathcal{O}(n^{\epsilon}) processors.
  • Data structure size is O(nlognlogn)\mathcal{O}(n \log n \log^* n).

This is achieved while only requiring an integer alphabet and a fixed maximum string size (this limitation can be relaxed with additional work, as discussed in the appendices).

Notably, answering substring equality and LCE queries reduces to a sequence of O(lognlogn)O(\log n \log^* n)0 comparisons across the synchronizing sets hierarchy, and out-of-date components are repaired via recent-changes tracking and cutting queries into a small number of sub-queries. Binary search for LCE values is parallelized via O(lognlogn)O(\log n \log^* n)1-ary branching, reducing depth to a small constant.

Application Scenarios

Two notable dynamic string applications are demonstrated:

  • Membership in Dyck Languages (O(lognlogn)O(\log n \log^* n)2): By reducing dynamic Dyck language recognition for O(lognlogn)O(\log n \log^* n)3-type parentheses (well-formedness checking) to string equality checks—mediated via the LCE data structure—the paper achieves maintaining Dyck language membership in parallel constant time using O(lognlogn)O(\log n \log^* n)4 processors, for arbitrary O(lognlogn)O(\log n \log^* n)5.
  • Dynamic Detection of Squares and Square-Freeness: The dynamic LCE primitive, composed with carefully-chosen local text decompositions and prefix/suffix matching arguments (building on prior sequential algorithms), enables maintaining and querying all squares or square-freeness under parallel constant time constraints and sublinear processor work.

Technical Insights and Innovations

  • Relaxed Consistency and Staleness Control: The deliberate relaxation of maintaining strict up-to-dateness for synchronizing sets allows efficient batch processing and parallel advancement across hierarchy levels—similar in spirit to ideas from the Muddling Lemma for dynamic descriptive complexity. Freshness is sufficiently bounded that the number of 'border' positions (those affected by outdated changes) is polylogarithmic, admitting efficient parallel correction during queries.
  • Efficient Naming Oracles: Assignment and reuse of compact substring identifiers, managed via dynamic naming functions and nearest-neighbor data structures, allow constant-time comparisons at each hierarchy level, even under batch updates and parallel contention.
  • Highly Localized Update Propagation: Key invariants in the decomposition hierarchy ensure that only O(lognlogn)O(\log n \log^* n)6-neighborhoods are ever affected by a change, which is crucial for both parallel update correctness and bounding processor work.

Numerical Results and Claims

  • Work Complexity: Both queries and updates require only O(lognlogn)O(\log n \log^* n)7 work for any O(lognlogn)O(\log n \log^* n)8, with strictly constant worst-case parallel time per operation.
  • Space Complexity: The structure's space is slightly superlinear, O(lognlogn)O(\log n \log^* n)9, reflecting the cost of the synchronizing sets hierarchy and recent change logging.

Implications and Outlook

Practically, this result demonstrates that dynamic string algorithmics can achieve the holy grail of constant-time queries and updates under realistic parallel computation constraints, albeit with moderately superlinear processor resources. This has direct implications for real-time streaming text systems, database maintenance, dynamic pattern recognition, and parallel algorithms for formal language recognition.

On the theoretical side, the work:

  • Bridges approaches between string algorithms and parallel descriptive complexity, opening the door to re-implementing more advanced text indexing and pattern algorithms in parallel, with similar staleness-tolerant designs.
  • Highlights the separation between work-efficient (sequentially optimal) and time-optimal (maximal parallel speedup) designs—raising open questions about tight lower bounds for constant-time dynamic string problems and whether simultaneously work- and time-optimal solutions can be achieved.

Potential future work includes:

  • Removing further limitations, such as dependence on fixed-size integer alphabets and maximum string length.
  • Generalizing to more powerful models or further reductions for parallel algorithms concerning other dynamic combinatorial problems on strings, grammars, or automata.
  • Pursuing provable lower bounds under parallel computation models for dynamic string data structures.

Conclusion

This paper advances the state-of-the-art in parallel dynamic string processing by providing the first constant-time parallel algorithms for LCE and several related problems under reasonable resource assumptions. The integration of synchronizing sets hierarchies, locality-aware dynamic decompositions, and delayed-update techniques yields powerful new tools for both theoretical and practical algorithm design in parallel computation and dynamic symbolic processing.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.

Tweets

Sign up for free to view the 1 tweet with 1 like about this paper.