Emergent Mind

Testing Simon's congruence

(1804.10459)
Published Apr 27, 2018 in cs.FL

Abstract

Piecewise testable languages are a subclass of the regular languages. There are many equivalent ways of defining them; Simon's congruence $\simk$ is one of the most classical approaches. Two words are $\simk$-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 $\simk$-classes. For each equivalence class of $\simk$, 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 $\simk$. We present an algorithm for computing the canonical representative of the $\simk$-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 $\simk$ 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 $\simk$-equivalent (with k being part of the input).

We're not able to analyze this paper right now due to high demand.

Please check back later (sorry!).

Generate a summary of this paper on our Pro plan:

We ran into a problem analyzing this paper.

Newsletter

Get summaries of trending comp sci papers delivered straight to your inbox:

Unsubscribe anytime.