AI 中文总结
研究从字符串游程编码直接枚举最大封闭子串,引入紧凑族表示,证明\(O(m^2)\)个族有时必要且总是充分,借助后缀树等处理不同情况,能在特定时间和空间内列出所有最大封闭子串的紧凑表示。
AI 中文摘要
字符串\(w\)若\(|w| = 1\)或有仅作为前缀和后缀出现的非空边界则是封闭的。最大封闭子串(MCS)是封闭字符串的最大出现。我们直接从字符串的游程编码(RLE)研究MCS枚举。对于长度为\(n\)且RLE大小为\(m\)的字符串\(T\),引入所有MCS出现的紧凑族表示……
英文摘要
A string $w$ is closed if $|w|=1$, or if $w$ has a non-empty proper border occurring only as its prefix and suffix. A maximal closed substring (MCS) is a maximal occurrence of a closed string; equivalently, it is a maximal closed repeat (MCR). We study the problem of enumerating all MCS occurrences directly from the run-length encoding (RLE) of a string. For a string $T$ of length $n$ with RLE size $m$, we give a compact representation of all MCS occurrences whose worst-case size is $O(m^2)$, and show that this bound is tight for this representation. Our approach is based on a characterization of MCS occurrences in terms of consecutive occurrences of their longest borders, together with data structures built on the RLE of $T$. Denoting the resulting representation by $\mathcal{F}$, we compute it in $O(m\log^2 m + |\mathcal{F}|\log m)$ time using $O(m)$ working space.
CommentsAccepted for SPIRE 2026