We consider two-variable first-order logic $\text{FO}^2$ and its quantifier alternation hierarchies over both finite and infinite words. Our main results are forbidden patterns for deterministic automata (finite words) and for Carton-Michel automata (infinite words). In order to give concise patterns, we allow the use of subwords on paths in finite graphs. This concept is formalized as subword-patterns. For certain types of subword-patterns there exists a non-deterministic logspace algorithm to decide their presence or absence in a given automaton. In particular, this leads to $\mathbf{NL}$ algorithms for deciding the levels of the $\text{FO}^2$ quantifier alternation hierarchies. This applies to both full and half levels, each over finite and infinite words. Moreover, we show that these problems are $\mathbf{NL}$-hard and, hence, $\mathbf{NL}$-complete.
翻译:我们考虑的是两个可变的第一阶逻辑 $\ text{ Fo ⁇ 2$ 及其量化的交替等级, 包括限制和无限的单词。 我们的主要结果是: 确定性自动数( 无限单词) 和 Carton- Michel 自动化数( 无限单词) 的禁止模式。 为了给出简明的公式, 我们允许在限制图形路径中使用子词。 这一概念作为子字式形式正式化。 对于某些类型的子词型来说, 存在一种非定义的逻辑空间算法, 来决定它们是否存在于一个特定的自动matomaton。 特别是, 这导致为决定 $\ text{ FO ⁇ 2$ 四分解变式等级的算法 $\ mathbf{ NL} 。 这适用于整级和半级, 每个限制和无限的单词。 此外, 我们显示这些问题是 $\ mathb{ NL}, 和 因此, $\\\\\\\\\\\\\\\\\\ n} n} com。