We introduce the task of out-of-order membership to a formal language L, where the letters of a word w are revealed one by one in an adversarial order. The length |w| is known in advance, but the content of w is streamed as pairs (i, w[i]), received exactly once for each position i, in arbitrary order. We study efficient algorithms for this task when L is regular, seeking tight complexity bounds as a function of |w| for a fixed target language. Most of our results apply to an algebraically defined variant dubbed out-of-order evaluation: this problem is defined for a fixed finite monoid or semigroup S, and our goal is to compute the ordered product of the streamed elements of w.
We show that, for any fixed regular language or finite semigroup, both problems can be solved in constant time per streamed symbol and in linear space. However, the precise space complexity strongly depends on the algebraic structure of the target language or evaluation semigroup. Our main contributions are therefore to show (deterministic) space complexity characterizations, which we do for out-of-order evaluation of monoids and semigroups.
For monoids, we establish a trichotomy: the space complexity is either Θ(1), Θ(log n), or Θ(n), where n = |w|. More specifically, the problem admits a constant-space solution for commutative monoids, while all non-commutative monoids require Ω(log n) space. We further identify a class of monoids admitting an O(log n)-space algorithm, and show that all remaining monoids require Ω(n) space.
For general semigroups, the situation is more intricate. We characterize a class of semigroups admitting constant-space algorithms for out-of-order evaluation, and show that semigroups outside this class require at least Ω(log n) space.
Construction of fuzzy automata from fuzzy regular expressions
Li和Pedrycz [Y. M. Li,W. Pedrycz,Fuzzy finite automata and fuzzy regular expressions with membership values in lattice-ordered monoid,Fuzzy Sets and Systems 156(2005)68- 92]已经证明了基本结果,这些结果提供了在格序monoid中表示具有隶属值的模糊语言的不同等价方式,并且推广了形式语言的经典理论的众所周知的结果。特别是,他们已经证明,一个模糊语言的整体格序幺半群可以表示为模糊正则表达式,当且仅当它可以识别的模糊有限自动机。然而,他们没有给出任何有效的方法来构造一个等价的模糊有限自动机从一个给定的模糊正则表达式。在本文中,我们提供了这样一个有效的方法。通过将模糊正则表达式α中的标量变换为新的扩展字母表中的字母,将模糊正则表达式α转化为普通正则表达式α R。然后,从识别语言的任意非确定性有限自动机A开始,||α_R||用正则表达式α R表示,构造了模糊有限自动机A_α和A_α^r,它们的状态数与自动机A相同或更少,它们识别模糊语言||α||由模糊正则表达式α表示。起始的非确定性有限自动机A可以从α_R中使用任何一种众所周知的将正则表达式转换为非确定性有限自动机的构造来获得,例如Glushkov-McNaughton-Y…