arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1804.10459cs.FL
收藏

Simon's congruence的测试

Testing Simon's congruence

Lukas Fleischer, Manfred Kufleitner

摘要:

分段可测试语言是正则语言的一个子类。定义它们有许多等价的方法; Simon的同余$\sim_k$是最经典的方法之一。如果两个字具有相同的长度至多为k的(分散的)子字集合,则它们是$\sim_k$等价的。语言L是分段可测的,如果存在某个k使得L是$\sim_k$-类的并.对于$\sim_k$的每个等价类,可以定义一个shortlex范式的规范表示,即$\sim_k$中最短单词中相对于词典顺序的最小单词。我们提出了一个算法,用于计算的规范代表的$\sim_k$类的一个给定的词$w \in A^*$的长度为n。即使$k \le n$是输入的一部分,我们的算法的运行时间也是O(|A| n)。这是令人惊讶的,因为可能的子字的数量在k中呈指数增长。$k > n$的情况从那时起就不有趣了,w的等价类是单例的。如果字母表是固定的,我们的算法的运行时间是线性的输入单词的大小。此外,对于固定字母表,我们证明了在确定性对数空间中计算$\sim_k$的shortlex标准形是可能的。我们的算法的结果之一是,可以用相同的复杂度检查两个字是否是$\sim_k$-等价的(k是输入的一部分)。

英文摘要:

Piecewise testable languages are a subclass of the regular languages. There are many equivalent ways of defining them; Simon's congruence $\sim_k$ is one of the most classical approaches. Two words are $\sim_k$-equivalent if they have the same set of (scattered) subwords of length at most k. A language L is piecewise testable if there exists some k such that L is a union of $\sim_k$-classes. For each equivalence class of $\sim_k$, one can define a canonical representative in shortlex normal form, that is, the minimal word with respect to the lexicographic order among the shortest words in $\sim_k$. We present an algorithm for computing the canonical representative of the $\sim_k$-class of a given word $w \in A^*$ of length n. The running time of our algorithm is in O(|A|n) even if $k \le n$ is part of the input. This is surprising since the number of possible subwords grows exponentially in k. The case $k > n$ is not interesting since then, the equivalence class of w is a singleton. If the alphabet is fixed, the running time of our algorithm is linear in the size of the input word. Moreover, for fixed alphabet, we show that the computation of shortlex normal forms for $\sim_k$ is possible in deterministic logarithmic space. One of the consequences of our algorithm is that one can check with the same complexity whether two words are $\sim_k$-equivalent (with k being part of the input).

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

↑