arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.14748cs.FLcs.DS
收藏

正则语言中词内缀的常数时间动态枚举

Constant-Time Dynamic Enumeration of Word Infixes in a Regular Language

Univ. Lille, Inria, CNRS, Centrale Lille(里尔大学、法国国家信息与自动化研究所、法国国家科学研究中心、里尔中央理工学院);Télécom SudParis, Institut Polytechnique de Paris(巴黎高等电信学院、巴黎理工学院);Inria & ENS Paris(法国国家信息与自动化研究所、巴黎高等师范学院)

Antoine Amarilli, Sven Dziadek, Luc Segoufin

AI总结:

研究正则语言中词内缀的动态枚举问题,提出在常数时间内实现动态更新和常数延迟的算法,适用于更广泛的半可扩展ZG语言类。

摘要:

对于固定的正则语言L,L-内缀的枚举任务是:给定一个输入词w = a₁⋯aₙ,我们必须枚举属于L的w的内缀,即所有满足i ≤ j且aᵢ⋯aⱼ ∈ L的i,j对。我们关注动态枚举L-内缀,其中还需要支持对w的字母替换更新(例如,“将w的第i个字母替换为字母a”)。每次更新会改变需要枚举的内缀集合,并重置枚举状态。我们研究对于哪些正则语言L可以实现L-内缀的常数延迟(即每次生成下一个内缀的时间都是常数时间)和常数额外内存的动态枚举,同时支持每次更新在常数时间内完成。我们证明,对于具有中性字母的正则语言L,如果L属于ZG类且是可扩展的(即如果u ∈ L且u是v的因子,则v ∈ L),则可以通过一个简单的算法实现L-内缀的动态枚举,该算法确保常数时间更新和常数延迟,但不使用常数额外内存。我们的主要贡献是展示一个仅使用常数额外内存的算法,并将其应用于更广泛的半可扩展ZG语言类,我们为此类语言给出了几种等价的特征描述。我们还讨论我们的结果是否可以推广到更大的语言类,并展示了一些(条件性的)下界。

英文摘要:

For a fixed regular language $L$, the enumeration of $L$-infixes is the following task: we are given an input word $w = a_1 \cdots a_n$ and we must enumerate the infixes of $w$ that belong to $L$, i.e., the pairs $i \leq j$ such that $a_i \cdots a_j \in L$. We are interested in dynamic enumeration of $L$-infixes, where we must additionally support letter substitution updates on $w$ (e.g., "replace the $i$-th letter of $w$ by a letter $a$"). Each update changes the set of infixes to enumerate, and resets the enumeration state. We study for which regular languages $L$ we can perform dynamic enumeration of $L$-infixes in constant delay (i.e., the next infix is always produced in constant time) and constant additional memory throughout the enumeration, while supporting each update in constant time. We show that, for languages $L$ with a neutral letter, if the language $L$ belongs to the class ZG and is extensible (i.e., if $u \in L$ and $u$ is a factor of $v$ then $v \in L$), then dynamic enumeration of $L$-infixes can be achieved with a simple algorithm that ensures constant-time updates and constant delay, but not constant additional memory. Our main contribution is then to show an algorithm that additionally uses only constant additional memory, and applies to a more general class of semi-extensible ZG languages for which we give several equivalent characterizations. We further discuss whether our results can be generalized to larger language classes and show some (conditional) lower bounds.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑