Online computation of maximal closed substrings

📅 2026-07-01
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This study addresses the problem of efficiently computing all maximal closed substrings (MCS) during the online, character-by-character input of a string. To this end, the authors propose a novel data structure—the Link-Cut Suffix Tree (LCST)—which integrates an online suffix tree with a link-cut tree to dynamically maintain the rightmost occurrence information of every substring. This enables real-time detection of newly formed MCS after each character insertion. Based on the LCST, they design the first worst-case time-optimal online algorithm for MCS enumeration, achieving a total time complexity of $O(n \log n)$ and space complexity of $O(n)$. The approach further extends to related applications such as rightmost LZ77 factorization and recent match queries.
📝 Abstract
A non-empty string is closed if its length is one or its longest border appears exactly twice in the string. An occurrence of a closed substring is a maximal closed substring (MCS) if it cannot be extended to the left or to the right while preserving closedness. MCSs can be regarded as a general class of maximal repetitive structures including runs. In this paper, we study the computation of MCSs of a string given in an online manner, where one character is appended to the string at a time. Our algorithm detects newly formed MCSs after each append operation by using the rightmost previous occurrences of suffixes. To support this efficiently, we introduce the link-cut suffix tree (LCST), a novel data structure combining an online suffix tree with a link-cut tree. The LCST maintains rightmost occurrence information for substrings represented in the suffix tree in $O(n \log n)$ total time and $O(n)$ space, where $n$ is the length of the input string. Using the LCST, we obtain an $O(n \log n)$-time online algorithm for computing all MCSs, which is worst-case optimal. As further direct applications of the LCST, we obtain online algorithms for rightmost LZ77 factorizations and most recent match queries.
Problem

Research questions and friction points this paper is trying to address.

maximal closed substrings
online computation
string algorithms
suffix tree
repetitive structures
Innovation

Methods, ideas, or system contributions that make the work stand out.

maximal closed substring
online algorithm
link-cut suffix tree
rightmost occurrence
LZ77 factorization
🔎 Similar Papers
No similar papers found.