Operations on Weakly Recognizing Morphisms

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9777)


Weakly recognizing morphisms from free semigroups onto finite semigroups are a classical way for defining the class of \(\omega \)-regular languages, i.e., a set of infinite words is weakly recognizable by such a morphism if and only if it is accepted by some Büchi automaton. We consider the descriptional complexity of various constructions for weakly recognizing morphisms. This includes the conversion from and to Büchi automata, the conversion into strongly recognizing morphisms, and complementation. For some problems, we are able to give more precise bounds in the case of binary alphabets or simple semigroups.


Weak Recognizability Simple Semigroup Infinite Words Nondeterministic Finite Automaton finite Words 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

1 Introduction

Büchi automata define the class of \(\omega \)-regular languages. They were introduced by Büchi for deciding the monadic second-order theory of \((\mathbb {N},<)\) [2]. Since then, \(\omega \)-regular languages have become an important tool in formal verification, and many other automata models for this language class have been considered; see e.g. [10, 13]. Each automaton model has its merits and its disadvantages. Recently, the authors have shown that recognizing morphisms have many nice algorithmic properties [5]. Such morphisms come in two different flavors. Strongly recognizing morphisms admit efficient minimization and complementation, whereas weakly recognizing morphisms can be exponentially more succinct (but there is no minimal weak recognizer and there is no efficient complementation). The situation is similar to the behavior of deterministic and nondeterministic finite automata. The major difference to both nondeterministic finite automata and Büchi automata is that there is an efficient inclusion test for weakly recognizing morphisms [5]. Every strongly recognizing morphism is also weakly recognizing, but the converse is false.

In this paper, we consider the descriptional complexity of various operations on weakly recognizing morphisms and conversions involving nondeterministic Büchi automata (\(\text {BA}\)) and strongly recognizing morphisms. In each case, we give asymptotically tight bounds. For the conversion of a \(\text {BA}\) into a weakly recognizing morphism, we give a lower bound which matches the naive upper bound. Our results are summarized in Table 1.

There are some similarities between recognizing morphisms over finite and over infinite words. Strong recognition is the natural counterpart to recognition for finite words. Nevertheless, in order to prove lower bounds for the conversion of Büchi automata to weakly recognizing morphisms, we first show that bounds for converting nondeterministic finite automata to recognizing morphisms over finite words (with some limitations) also hold for the conversion of Büchi automata to weakly recognizing morphisms. We then use techniques of Sakoda and Sipser [12] and of Yan [14] to obtain tight bounds for the conversion of nondeterministic finite automata to recognizing morphisms. This step is similar to the work of Holzer and König [6]. To the best of our knowledge, our lower bound over finite words for the conversion of an NFA into a recognizing morphism is also a new result.
Table 1.

Bounds for the descriptional complexity of various operations.


Lower bound

Upper bound

\(\text {BA}\) to weak recognition

\(2^{n^2}\) [new]

\(2^{n^2}\) [9]

\(\text {BA}\) to weak recognition, binary alphabet

\(2^{{(n-1)}^2/4}\) [new]

\(2^{n^2}\) [9]

Weak recognition to \(\text {BA}\)

\((n-3)(n+1)/32\) [new]

\(n(n + 1)\) [9]

Weak recognition to strong recognition

\(n 2^{n-1}\) [new]

\(2^{n^2}\) [10]

Complementation of weak recognition

\(n 2^{n-1}\) [new]

\(2^{n^2}\) [10]

Complementation for simple semigroups

\(n 2^{n-1}\) [new]

\(n 2^n\) [new]

2 Preliminaries

This section gives a brief overview of some basic definitions from the fields of formal languages, finite automata and semigroup theory. We refer to [10, 11] for more detailed introductions.

Words. Let A be a finite alphabet. The elements of A are called letters. A finite word is a sequence \(a_1 a_2 \cdots a_n\) of letters of A and an infinite word is an infinite sequence \(a_1 a_2 \cdots \). The empty word is denoted by \(\varepsilon \). Given an infinite word \(\alpha = a_1 a_2 \cdots \), we let \(\inf (\alpha ) \subseteq A\) denote the set of letters in \(\alpha \) which occur infinitely often.

Let K be a set of finite words and let L be a set of infinite words. We set \(KL = \left\{ u\alpha \mid u \in K, \alpha \in L\right\} \), \(K^n = \left\{ u_1 u_2 \cdots u_n \mid u_i \in K\right\} \), \(K^+ = \mathop {\bigcup }_{n \geqslant 1} K^n\) and \(K^* = K^+ \mathbin {\cup }\left\{ \varepsilon \right\} \). Moreover, if \(\varepsilon \not \in K\) we define the infinite iteration \(K^\omega = \left\{ u_1 u_2 \cdots \mid u_i \in K\right\} \). A natural extension to \(K \subseteq A^*\) is \(K^\omega = {(K \setminus \left\{ \varepsilon \right\} )}^\omega \mathbin {\cup }\left\{ \varepsilon \right\} \).

Automata. A finite automaton is a 5-tuple \(\mathcal {A}= (Q, A, \delta , I, F)\) where Q is a finite set of states and A is a finite alphabet. The transition relation \(\delta \) is a subset of \(Q \times A \times Q\) and its elements are called transitions. The sets I and F are subsets of Q and are called initial states and final states, respectively.

A finite run of a word \(a_1 a_2 \cdots a_n\) on \(\mathcal {A}\) is a sequence \(q_0 a_1 q_1 a_1 \cdots q_{n-1} a_n q_n\) such that \(q_0 \in I\) and \((q_i, a_{i+1}, q_{i+1}) \in \delta \) for all \(i \in \left\{ 0, \dots , n-1\right\} \). The run is said to start in \(q_0\) and end in \(q_n\). The word \(a_1 a_2 \cdots a_n\) is the label of the run. A finite run is called accepting if it ends in a final state. A finite word u is said to be accepted by \(\mathcal {A}\) if there exists an accepting finite run of u on \(\mathcal {A}\) and the language accepted by \(\mathcal {A}\) is the set of all finite words over \(A^*\) accepted by \(\mathcal {A}\). It is denoted by \(L_{\text {NFA}}(\mathcal {A})\).

Analogously, an infinite run of a word \(a_1 a_2 \cdots \) on \(\mathcal {A}\) is an infinite sequence \(q_0 a_1 q_1 a_1 \cdots \) such that \(q_0 \in I\) and \((q_i, a_{i+1}, q_{i+1}) \in \delta \) for all \(i \geqslant 0\). It is called accepting if \(\inf (q_0 q_1 q_2 \cdots ) \mathbin {\cap }F \ne \emptyset \). An infinite word \(\alpha \) is said to be Büchi-accepted by \(\mathcal {A}\) if there exists an accepting infinite run of \(\alpha \) on \(\mathcal {A}\). The language Büchi-accepted by \(\mathcal {A}\) is the set of all infinite words Büchi-accepted by \(\mathcal {A}\) and it is denoted by \(L_{\text {BA}}(\mathcal {A})\).

We use the term run for both finite and infinite runs if the reference is clear from the context. A language \(L \subseteq A^*\) (resp. \(L \subseteq A^\omega \)) is regular (resp. \(\omega \) -regular) if it is accepted (resp. Büchi-accepted) by some finite automaton.

Finite semigroups. A semigroup morphism is a mapping \(h :S \rightarrow T\) between two (not necessarily finite) semigroups S and T such that \(h(s)h(t) = h(st)\) for all \(s, t \in S\). Since we do not consider morphisms of other objects, we use the term morphism synonymously. A subsemigroup of a semigroup S is a subset that is closed under multiplication. We say that a semigroup T divides a semigroup S if there exists a surjective morphism from a subsemigroup of S onto T.

Green’s relations are an important tool in the study of semigroups. For the remainder of this subsection, let S be a finite semigroup. We let \(S^1\) denote the monoid that is obtained by adding a new neutral element 1 to S. For \(s, t \in S\) let
$$\begin{aligned} s&\mathrel {\mathcal {R}}t \text { if there exist } q, q' \in S^1 \text { such that } sq = t \text { and } tq' = s, \\ s&\mathrel {\mathcal {L}}t \text { if there exist } p, p' \in S^1 \text { such that } ps = t \text { and } p't = s, \\ s&\mathrel {\mathcal {J}}t \text { if there exist } p, q, p', q' \in S^1 \text { such that } psq = t \text { and } p'tq' = s, \\ s&\mathrel {\mathcal {H}}t \text { if } s \mathrel {\mathcal {R}}t \text { and } s \mathrel {\mathcal {L}}t. \end{aligned}$$
These relations are equivalence relations. The equivalence classes of \(\mathrel {\mathcal {R}}\) (resp. \(\mathrel {\mathcal {L}}\), \(\mathrel {\mathcal {J}}\), \(\mathrel {\mathcal {H}}\)) are called \(\mathcal {R}\) -classes (resp. \(\mathcal {L}\) -classes, \(\mathcal {J}\) -classes, \(\mathcal {H}\) -classes). For \(s \in S\), we denote the \(\mathcal {R}\)-class (resp. \(\mathcal {L}\)-class) of s by \(R_s\) (resp. \(L_s\)) and we let \({S} / {\mathcal {R}} = \left\{ R_s \mid s \in S\right\} \) as well as \({S} / {\mathcal {L}} = \left\{ L_s \mid s \in S\right\} \).

A semigroup is called \(\mathcal {J}\) -trivial if each of its \(\mathcal {J}\)-classes contains exactly one element. A semigroup is called simple if it consists of a single \(\mathcal {J}\)-class. In a finite simple semigroup, the relations \(s \mathrel {\mathcal {R}}st \mathrel {\mathcal {L}}t\) hold for all \(s, t \in S\). Moreover, each \(\mathcal {H}\)-class forms a group and all such groups are isomorphic [11]. We will also utilize the following lemma:

Lemma 1

Let S be a finite simple semigroup and let \(x, y, z \in S\) such that \(y \mathrel {\mathcal {R}}z\). Then \(xy = xz\) implies \(y = z\).


Suppose that \(xy = xz\). Since S is simple, we have \(y \mathrel {\mathcal {L}}xy\) and thus, there exists an element \(p \in S^1\) such that \(pxy = y\). Since \(y \mathrel {\mathcal {R}}z\), there exists an element \(q \in S^1\) with \(yq = z\). It follows that \(y = pxy = pxz = pxyq = yq = z\).   \(\square \)

Recognition by morphisms. Let \(h :A^+ \rightarrow S\) be a morphism to a finite semigroup S. A pair (se) of elements of S is a linked pair if \(se = s\) and \(e^2 = e\). For \(s \in S\), we set \({[s]}_h = h^{-1}(s)\) and if h is understood from the context, we may skip the reference to the morphism in the subscript. A language \(L \subseteq A^+\) is recognized by a morphism \(h: A^+ \rightarrow S\) if L is a union of sets \([s_i]\) with \(s_i \in S\). A language \(L \subseteq A^\omega \) is weakly recognized by a morphism \(h: A^+ \rightarrow S\) if it is a union of sets \([s_i]{[e_i]}^\omega \) where \((s_i, e_i)\) are linked pairs of S. A language \(L \subseteq A^\omega \) is strongly recognized by a morphism \(h: A^+ \rightarrow S\) if \([s]{[t]}^\omega \mathbin {\cap }L \ne \emptyset \) implies \([s]{[t]}^\omega \subseteq L\) for all \(s, t \in S\). It is easy to see that strong recognition implies weak recognition, see e.g. [10, Theorem 2.2]. Moreover, if a morphism strongly recognizes L, it also strongly recognizes its complement \(A^\omega \setminus L\). By extension, we also say that a semigroup S recognizes (resp. weakly recognizes, strongly recognizes) a language L if there exists a morphism \(h :A^+ \rightarrow L\) that recognizes (resp. weakly recognizes, strongly recognizes) L.

For a language \(L \subseteq A^+ \mathbin {\cup }A^\omega \), we have \(u \equiv _L v\) if and only if
$$\begin{aligned} (xuy)z^\omega \in L&\Leftrightarrow (xvy)z^\omega \in L \text { and } \\ z{(xuy)}^\omega \in L&\Leftrightarrow z{(xvy)}^\omega \in L \end{aligned}$$
for all finite words \(x, y, z \in A^*\). Keep in mind that \(\varepsilon ^\omega = \varepsilon \). The relation \(\equiv _L\) was introduced by Arnold [1]; it is called the syntactic congruence of L. The congruence classes of \(\equiv _L\) form the so-called syntactic semigroup \({{A}^+} / {\equiv _L}\) and the syntactic morphism \(h_L :A^+ \rightarrow {{A}^+} / {\equiv _L}\) is the natural quotient map. If \(L \subseteq A^*\) (resp. \(L \subseteq A^\omega \)) is regular (resp. \(\omega \)-regular), the syntactic semigroup of L is finite and \(h_L\) recognizes (resp. strongly recognizes) the language L; see [1, 10].

3 Lower Bound Techniques

3.1 Proving Lower Bounds for Weakly Recognizing Morphisms

We first consider the general problem of proving lower bounds for the size of weakly recognizing semigroups for a given language L. In the case of recognizing morphisms over finite words and in the case of strongly recognizing morphisms, this is easy since one only needs to compute the syntactic semigroup, which immediately yields a tight lower bound. On the contrary, weakly recognizing morphisms do not admit minimal objects. However, it turns out that one can still use a relaxed version of Arnold’s syntactic congruence.

We first prove a combinatorial lemma and then give the main result of this section.

Lemma 2

Let \(u, v \in A^+\) and let (se) be a linked pair. Then \(uv^\omega \) is contained in \([s]{[e]}^\omega \) if and only if there exists a factorization \(v = v_1 v_2\) and powers \(k, \ell \geqslant 0\) such that \(\ell \) is odd, \(h(u v^k v_1) = s\) and \(h(v_2 v^\ell v_1) = e\).


Let \(v = a_1 a_2 \cdots a_n\) with \(n \geqslant 1\) and \(a_i \in A\). If \(uv^\omega \) is contained in \([s]{[e]}^\omega \), there exists a factorization \(uv^\omega = u' v_1' v_2' \cdots \) such that \(h(u') = s\) and \(h(v_i') = e\) for all \(i \geqslant 1\). Since u and v are finite words, there exist indices \(j > i \geqslant 1\), powers \(k, \ell \geqslant 1\) and a position \(m \in \left\{ 1, \dots , n\right\} \) such that \(u' v_1' v_2' \cdots v_{i-1}' = u v^k a_1 a_2 \cdots a_m\) and \(v_i' v_{i+1}' \cdots v_j' = a_{m+1} a_{m+2} \cdots a_n v^\ell a_1 a_2 \cdots a_m\). We set \(v_1 = a_1 a_2 \cdots a_m\) and \(v_2 = a_{m+1} a_{m+2} \cdots a_n\). Then \(v_1 v_2 = v\),
If \(\ell \) is even, we can replace \(\ell \) by \(2\ell + 1\) since \(h(v_2 v^{2\ell +1} v_1) = h(v_2 v^\ell v_1 v_2 v^\ell v_1) = e^2 = e\). The converse implication is trivial.   \(\square \)

Theorem 3

Let \(L \subseteq A^\omega \) be a language weakly recognized by some morphism \(h :A^+ \rightarrow S\) and let \(u, v, z \in A^+\) and \(x, y \in A^*\) be words such that one of the following two properties holds:
  1. 1.

    \(xuyz^\omega \in L\) and \(xvyz^\omega \not \in L\)

  2. 2.

    \(x{(uy)}^\omega \in L\) and \(x{(uyvy)}^\omega \not \in L\) and \(x{(vyuy)}^\omega \not \in L\).


Then \(h(u) \ne h(v)\).


We consider finite words \(u, v \in A^+\) such that \(h(u) = h(v)\) and show that in this case, neither of the properties can hold.

If the first property holds, there exists a linked pair (se) such that \(xuyz^\omega \in [s]{[e]}^\omega \subseteq L\). Thus, by Lemma 2, we have \(h(xuy z^k z_1) = s\) and \(h(z_2 z^\ell z_1) = e\) for some factorization \(z = z_1 z_2\) and powers \(k, \ell \geqslant 0\). Now, since \(h(xvy z^k z_1) = h(xuy z^k z_1) = s\), we obtain \(xvyz^\omega \in [s]{[e]}^\omega \subseteq L\), a contradiction.

If the second property holds, there exists a linked pair (se) of S such that \(xw^\omega \in [s]{[e]}^\omega \subseteq L\) where \(w = uy\). Thus, by Lemma 2, we have \(h(x w^k w_1) = s\) and \(h(w_2 w^\ell w_1) = e\) for some factorization \(w = w_1 w_2\), some power \(k \geqslant 0\) and some odd power \(\ell \geqslant 0\). Since \(\ell \) is odd \((\ell -1)/2\) is an integer and we have \(h(w_2 {(vyuy)}^{(\ell -1) / 2} vy w_1) = h(w_2 {(uy)}^\ell w_1) = e\). Now, if k is odd as well, we obtain \(h(x {(vyuy)}^{(k-1)/2} vy w_1) = h(x {(uy)}^k w_1) = s\) and therefore, \(x{(vyuy)}^\omega \in L\). Equivalently, if k is even, we have \(h(x {(uyvy)}^{k/2} w_1) = h(x {(uy)}^k w_1) = s\) and hence, \(x{(uyvy)}^\omega \in L\). Both cases contradict Property 2 above.   \(\square \)

The next proposition is another simple, yet useful, tool for proving lower bounds. It allows to transfer bounds from the setting of finite words to infinite words.

Proposition 4

Let \(\mathcal {A}= (Q, A, \delta , I, F)\) and let \(a \in A\) be a letter such that for all \(q \in Q\) and \(q_f \in F\), we have \((q, a, q_f) \in \delta \) if and only if \(q = q_f\). Let \(K = L_{\text {BA}}(\mathcal {A})\) and let \(L = L_{\text {NFA}}(\mathcal {A})\). Then each semigroup weakly recognizing K has at least \(\left| {{A}^+} / {\equiv _L}\right| \) elements.


Let \(h :A^+ \rightarrow S\) be a morphism weakly recognizing K and consider two words \(u, v \in A^+\) such that \(u \not \equiv _L v\). Then, without loss of generality, there exist \(x, y \in A^*\) such that \(xuy \in L\) and \(xvy \not \in L\). This implies \(xuya^\omega \in K\) since \((q_f, a, q_f) \in \delta \) for all \(q_f \in F\). Equivalently, because of \((q, a, q_f) \not \in \delta \) for all \(q \in Q \setminus F\) and \(q_f \in F\), we have \(xvya^\omega \not \in K\). By Theorem 3, this yields \(h(u) \ne h(v)\).   \(\square \)

3.2 The Full Automata Technique

The full automata technique is a useful tool for proving lower bounds for the conversion of automata to other objects. It was introduced by Yan [14] who attributes it to Sakoda and Sipser [12]. The technique works for both accepted and Büchi-accepted languages. However, we will prove the main result of this section only for the setting of finite words and use Proposition 4 to obtain analogous results for infinite words.

Let Q be a finite set and let IF be subsets of Q. The full automaton \(\mathcal {F}({Q}, {I}, {F})\) is the finite automaton \((Q, B, \varDelta , I, F)\) defined by \(B = 2^{Q^2}\) and by the transition relation \(\varDelta = \left\{ (p, T, q) \in Q \times B \times Q \mid (p, q) \in T\right\} \).

Theorem 5

Let \(\mathcal {A}= (Q, A, \delta , I, F)\) be a finite automaton and let \(\mathcal {F}({Q}, {I}, {F}) = (Q, B, \varDelta , I, F)\) be the corresponding full automaton. Then the syntactic semigroup of \(L_{\text {NFA}}(\mathcal {A})\) divides the syntactic semigroup of \(L_{\text {NFA}}(\mathcal {F}({Q}, {I}, {F}))\).


We first define a morphism \(\pi :A^+ \rightarrow B^+\) by \(\pi (a) = \left\{ (p, q) \mid (p, a, q) \in \delta \right\} \). Let \(K = L_{\text {NFA}}(\mathcal {F}({Q}, {I}, {F}))\) and let \(L = L_{\text {NFA}}(\mathcal {A})\). It suffices to show that \(\pi (u) \equiv _K \pi (v)\) implies \(u \equiv _L v\). Thus, consider \(u, v \in A^+\) such that \(\pi (u) \equiv _K \pi (v)\). In particular, for all \(x, y \in A^*\), we have \(\pi (xuy) \in K\) if and only if \(\pi (xvy) \in K\). By the definition of \(\pi \), we have \(\pi (w) \in K\) if and only if \(w \in L\) for all \(w \in A^+\). Using the equivalence from above, this yields \(xuy \in L\) if and only if \(xvy \in L\) for all \(x, y \in A^*\), thereby proving that \(u \equiv _L v\).   \(\square \)

4 From Automata to Weakly Recognizing Morphisms

The standard construction for converting a finite automaton \(\mathcal {A}\) to a recognizing morphism is the so-called transition semigroup of \(\mathcal {A}\). For a given word \(u \in A^+\), it encodes for each pair (pq) of states whether there is a run of u on \(\mathcal {A}\) starting in p and ending in q. Thus, for a finite automaton with n states the transition semigroup has \(2^{n^2}\) elements. For details on the construction, we refer to [10, 11]. We show that this construction is optimal.

Theorem 6

Let \(\mathcal {A}\) be a finite automaton with n states. Then there exists a semigroup recognizing \(L_{\text {NFA}}(\mathcal {A})\) (resp. weakly recognizing \(L_{\text {BA}}(\mathcal {A})\)) which has at most \(2^{n^2}\) elements and this bound is tight.


Each language that is accepted (resp. Büchi-accepted) by \(\mathcal {A}\) is recognized (resp. weakly recognized) by the transition semigroup of \(\mathcal {A}\) which has size \(2^{n^2}\).

To show that this is optimal, we consider the full automaton \(\mathcal {F}({N}, {N}, {N}) = (N, B, \varDelta , N, N)\) where \(N = \left\{ 1, \dots , n\right\} \) and let \(L = L_{\text {NFA}}(\mathcal {F}({N}, {N}, {N}))\). For two different letters \(X, Y \in B\) we may assume, without loss of generality, that there exist \(p, q \in N\) such that \((p, q) \in X \setminus Y\). With \(P = \left\{ (p, p)\right\} \) and \(Q = \left\{ (q, q)\right\} \), we then have \(PXQ \in L\) and \(PYQ \not \in L\). Thus, \(X \not \equiv _L Y\). This shows that \({{B}^+} / {\equiv _L}\) has at least \(\left| B\right| = 2^{n^2}\) elements.

Noting that the transitions labeled by the letter \(\left\{ (q, q) \mid q \in N\right\} \) form self-loops at each state, the Büchi case immediately follows by Proposition 4.   \(\square \)

The proof of the optimality result requires a large alphabet that grows super-exponentially in the number of states of the automaton. A natural restriction is considering automata over fixed-size alphabets.

By a result of Chrobak [3], the size of the syntactic semigroup of an unary language accepted by a finite automaton of size n is in \(2^{\mathcal {O}({\sqrt{n \log n}})}\) (note that since unary languages are commutative, the syntactic monoid is isomorphic to the minimal deterministic automaton). Over infinite words, the unary case is uninteresting since the only language over the alphabet \(A = \left\{ a\right\} \) is \(\left\{ a^\omega \right\} \).

For binary alphabets, a lower bound can be obtained by combining the full automata technique with a result from the study of semigroups of binary relations [7, Proposition 6]. In order to keep the paper self-contained, we present a proof that is adapted to finite automata and does not require any knowledge of binary relations.

Theorem 7

Let \(A = \left\{ a, b\right\} \) and let n be an odd natural number. There exists a language \(L \subseteq A^+\) (resp. \(L \subseteq A^\omega \)) and a finite automaton with n states accepting (resp. Büchi-accepting) L, such that each semigroup recognizing (resp. weakly recognizing) L has at least \(2^{{(n-1)}^2/4}\) elements.


We first analyze the case of finite words. Let \(m = (n-1)/2\) and let \(M = \left\{ 1, \dots , m\right\} \). We consider the automaton \(\mathcal {A}\) depicted below and let \(L = L_{\text {NFA}}(\mathcal {A})\).

For \(1 \leqslant i,j \leqslant m\) we first define \(p_{i,j} = (m+j-i)m - i\) and \(q_{i,j} = (m+i-j+2)m + i\). Furthermore, we set \(u_{i,j} = a^{p_{i,j}}ba^{q_{i,j}}\). We claim that for each ij there exists a path from state k to \(\ell \) labeled by \(u_{i,j}\) if and only if \((k, \ell ) = (i, j+m)\) or \(k = \ell \).

The two a-cycles have length m and \(m+1\), respectively. Since for each pair (ij) we have \(p_{i,j} + q_{i,j} = 2m(m + 1)\) and since one can always stay in the same state when reading the letter b, there clearly exists a path from each state to itself labeled by \(u_{i,j}\). Now, fix some (ij) and let \((k, \ell ) = (i, j+m)\). We have \(i + p_{i,j} = (m + j - i)m\) which means that, when starting in state i, one can reach state m by reading \(a^{p_{i,j}}\). Being in state m, one of the b-transitions leads to state \(m+1\). From there on, we make a single step backwards whenever reading the factor \(a^m\). Thus, by reading the word \(a^{q_{i,j}}\), we perform \((m+i-j+2) - i = m-j+2\) backward steps in total, finally reaching state \(n+1 - (m-j+2) = 2m+2-(m-j+2) = m + j = \ell \). The converse direction of our claim follows immediately since the automaton is deterministic when restricted to a-transitions and since one can only reach states \(\ell > m\) by using the transition \((m, b, m+1)\).

For \(X \subseteq M \times M\), we now define \(u_X\) as the concatenation of all \(u_{i,j}\) with \((i,j) \in X\), where the factors are ordered according to their indices (ij). By the above argument, it is easy to see that there is a path from state i to \(j + m\) labeled by \(u_X\) if and only if \((i, j) \in X\). Since there are \(2^{m^2} = 2^{{(n-1)}^2/4}\) subsets of the Cartesian product \(M \times M\), it remains to show that for different subsets \(X, Y \subseteq M \times M\), we have \(u_X \not \equiv _L v_Y\). To this end, assume without loss of generality that \((i, j) \in X \setminus Y\). Then \(a^{i-1} u_X a^{n-j} \in L\) but \(a^{i-1} u_Y a^{n-j} \not \in L\), as desired.

For the Büchi case note that for all \(i \in Q\), we have \((i, b, n) \in \delta \) if and only if \(i = n\). Therefore, by Proposition 4 and the arguments above, the smallest semigroup weakly recognizing \(L_{\text {BA}}(\mathcal {A})\) has at least \(2^{{(n-1)}^2/4}\) elements.   \(\square \)

The construction above does not reach the \(2^{n^2}\) bound obtained when using a larger alphabet. However, this is not surprising, given the following result.

Proposition 8

Let \(m \in \mathbb {N}\) be a fixed integer and let A be an alphabet of size m. Then there exists an integer \(n_m \geqslant 1\) such that for each finite automaton \(\mathcal {A}\) over A with \(n \geqslant n_m\) states, the language \(L_{\text {NFA}}(\mathcal {A}) \subseteq A^*\) (resp. \(L_{\text {BA}}(\mathcal {A}) \subseteq A^\omega \)) is recognized (resp. weakly recognized) by a morphism onto a semigroup with less than \(2^{n^2}\) elements.

We do not give a full proof of the proposition here, but the claim essentially follows from a careful analysis of the subsemigroup of the transition semigroup generated by the transitions corresponding to the letters in A. Applying Devadze’s Theorem [4, 8] to the matrix representation of this subsemigroup shows that it is proper, i.e., smaller than the full transition semigroup itself.

5 From Weakly Recognizing Morphisms to Automata

The well-known construction to convert weakly recognizing morphisms to finite automata with a Büchi-acceptance condition has quadratic blow-up [10]. We show that this is optimal up to a constant factor.

Theorem 9

Let \(A = \left\{ a, b\right\} \), let \(n \geqslant 3\), and let \(L = \mathop {\bigcup }_{i=1}^n {(b a^i b A^*)}^\omega \). Then there exists a semigroup with \(4n+3\) elements that weakly recognizes L and every finite automaton Büchi-accepting L has at least \(n(n+1) / 2\) states.


We first define a semigroup \(S = \left\{ a^i, a^i b, b a^i, b a^i b \mid 1 \leqslant i \leqslant n\right\} \mathbin {\cup }\left\{ b, bb, 0\right\} \) by the multiplication \(0 \cdot s = s \cdot 0 = 0\) for all \(s \in S\) and
$$\begin{aligned} b^\ell a^i b^r \cdot b^m a^j b^s&= {\left\{ \begin{array}{ll} bb &{} \text {if } i = j = 0 \\ b^\ell a^{i+j} b^s &{} \text {if } r = m = 0 \text { and } 1 \leqslant i + j \leqslant n \\ 0 &{} \text {if } r = m = 0 \text { and } i + j > n \\ b^\ell a^i b &{} \text {otherwise} \end{array}\right. } \end{aligned}$$
where \(\ell , m, r, s \in \left\{ 0, 1\right\} \) and \(i, j \in \left\{ 0, \dots , n\right\} \). The morphism \(h :A^+ \rightarrow S\) defined by \(h(a) = a\) and \(h(b) = b\) now weakly recognizes L since L is the union of all sets \([b a^i b]{[b a^i b]}^\omega \) with \(1 \leqslant i \leqslant n\).
Now assume that we are given a finite automaton \(\mathcal {A}= (Q, A, \delta , I, F)\) such that \(L_{\text {BA}}(\mathcal {A}) = L\). For each \(i \in \left\{ 1, \dots , n\right\} \), we consider the word \(\alpha _i = {(b a^i b)}^\omega \) and let \(r_i\) be an accepting run of \(\alpha _i\). We first show that for \(i \ne j\), we have \(\inf (r_i) \mathbin {\cap }Q \mathbin {\cap }\inf (r_j) = \emptyset \), and then prove that \(\left| \inf (r_i) \mathbin {\cap }Q\right| \geqslant i\) for \(1 \leqslant i \leqslant n\). Together, this yields
$$\begin{aligned} \left| Q\right| \geqslant \sum _{i=1}^n \left| \inf (r_i) \mathbin {\cap }Q\right| \geqslant \sum _{i=1}^n i = n(n+1) / 2. \end{aligned}$$
Let \(i, j \in \left\{ 1, \dots , n\right\} \) such that \(i \ne j\). We assume for the sake of contradiction that there exists a state \(q \in Q\) with \(q \in \inf (r_i)\) and \(q \in \inf (r_j)\). Let \(u \in b a^i b A^*\) be a prefix of \(\alpha _i\) such that \(r_i\) visits q after reading u. Let \(v \in A^*\) be a factor of \(\alpha _j\) such that there exists a finite run labeled by v, which starts and ends in q, visits at least one final state and such that \(v^\omega = {(b a^j b)}^\omega \) or \(v^\omega = a^k b {(b a^j b)}^\omega \) for some \(k \in \left\{ 0, \dots , j\right\} \). Obviously, we then have \(uv^\omega \in L_{\text {BA}}(\mathcal {A})\) but \(uv^\omega \not \in L\), a contradiction.

For the second part of the proof, assume again for the sake of contradiction that \(\left| \inf (r_i) \mathbin {\cap }Q\right| < i\) for some accepting run \(r_i\) of \(\alpha _i\). Then inside each \(b a^i b\)-factor, a state is visited twice and we can apply the standard pumping argument to show that a word in \(A^\omega \setminus L_{\text {BA}}(\mathcal {A})\) has an accepting run as well.   \(\square \)

6 Complementation

To date, the best construction for complementing weakly recognizing morphisms is the so-called strong expansion [10]. Given a morphism \(h :A^+ \rightarrow S\), the strong expansion of h is a morphism \(g :A^+ \rightarrow T\) which strongly recognizes all languages weakly recognized by h. If S has n elements, the size of T is \(2^{n^2}\). The purpose of this section is to give a lower bound for complementation. At the same time, the established bound also serves as a lower bound for the conversion of weak recognition to strong recognition since each morphism strongly recognizing a language also strongly recognizes its complement.

Complementing weakly recognizing morphisms is easy in the case of \(\mathcal {J}\)-trivial semigroups since each language weakly recognized by a \(\mathcal {J}\)-trivial semigroup S is already strongly recognized by S, i.e., there is no need the compute the strong expansion if the \(\mathcal {J}\)-classes of the input are trivial already. In order to establish a lower bound, we thus consider the class of simple semigroups, which is dual to \(\mathcal {J}\)-trivial semigroups in the sense that simple semigroups consist of a single \(\mathrel {\mathcal {J}}\)-class only.

Proposition 10

Let \(n \geqslant 1\) be an arbitrary integer and let \(A = \left\{ a_1, a_2, \dots , a_n\right\} \). The language \(L = \bigcup _{i=1}^n {(a_i A^*)}^\omega \) is weakly recognized by a simple semigroup with n elements and every semigroup weakly recognizing \(A^\omega \setminus L\) has at least \(n 2^{n-1}\) elements.


The alphabet A can be extended to a semigroup by defining an associative operation \(a \circ b = a\) for all \(a, b \in A\). Now, the morphism \(h :A^+ \rightarrow (A, \circ )\) given by \(h(a) = a\) for all \(a \in A\) weakly recognizes L. The semigroup \((A, \circ )\) contains \(\left| A\right| = n\) elements and it is simple because we have \(a \mathrel {\mathcal {L}}b\) for all \(a, b \in A\).

Now, let \(h :A^+ \rightarrow S\) be a morphism weakly recognizing \(A^\omega \setminus L\). For a letter \(b \in A\) and a subset \(B \subseteq A \setminus \left\{ b\right\} \), let \(u_{b,B}\) be the uniquely defined word \(b a_{i_1} a_{i_2} \cdots a_{i_\ell }\) such that \(i_1< i_2< \cdots < i_\ell \) and \(\left\{ a_{i_1}, a_{i_2}, \dots , a_{i_\ell }\right\} = B\). Consider two letters \(b, c \in A\) and subsets \(B \subseteq A \setminus \left\{ b\right\} \), \(C \subseteq A \setminus \left\{ c\right\} \). If \(b \ne c\), we have \(u_{b,B} c^\omega \not \in L\) and \(u_{c,C} c^\omega \in L\). If \(B \ne C\) we may assume, without loss of generality, that there exists a letter \(a \in B \setminus C\). In this case, we have \(a {u_{c,C}}^\omega \not \in L\) but \(a {(u_{b,B} u_{c,C})}^\omega \in L\) and \(a {(u_{c,C} u_{b,B})}^\omega \in L\). By Theorem 3, this suffices to conclude that \(h(u_{b,B}) \ne h(u_{c,C})\) whenever \(b \ne c\) or \(B \ne C\) and therefore, S contains at least \(\left| A\right| 2^{\left| A\right| -1} = n 2^{n-1}\) elements.   \(\square \)

Rather surprisingly, the established lower bound turns out to be asymptotically tight in the case of simple semigroups. More generally, for simple semigroups, the construction of the strong expansion can be improved such that only \(n 2^n\) elements are needed. This will be proved in the remainder of this section.

We start with a morphism \(h :A^+ \rightarrow S\) onto a simple semigroup with \(n = \left| S\right| \) elements. Since S is simple, there exists a surjective mapping \(\gamma :S \rightarrow G\) onto a finite group G that becomes a bijection when restricted to a single \(\mathcal {H}\)-class. Therefore, the mapping \(\pi :({S} / {\mathcal {R}}) \times G \times ({S} / {\mathcal {L}}) \rightarrow S\) with \(\pi ^{-1}(s) = (R_s, \gamma (s), L_s)\) for all \(s \in S\) is well-defined and bijective. Moreover, for \(s, t \in S\), we write \(R_t \cdot s\) to denote the element \(\pi (R_t, \gamma (s), L_s)\).

Let \(T = \left\{ (s, X) \mid s \in S, X \subseteq S\right\} \) and let \(g :A^+ \rightarrow T\) be defined by
$$\begin{aligned} g(u) = (h(u), \left\{ R_{h(q)} \cdot h(p) \mid p, q \in A^+, pq = u\right\} ) \end{aligned}$$
for all \(u \in A^+\). The set T can be extended to a semigroup by defining an associative multiplication
$$\begin{aligned} (s, X) \cdot (t, Y) = (st, X \mathbin {\cup }\left\{ R_t \cdot s\right\} \mathbin {\cup }\hat{Y}) \end{aligned}$$
where \(\hat{Y}\) denotes the set \(\left\{ \pi (R_y, \gamma (s (R_t \cdot y)), L_y) \mid y \in Y\right\} \). Under this extension, the mapping g becomes a morphism.

The following three technical lemmas capture important properties of the construction and are needed for the main proof.

Lemma 11

Let \(s, t \in S\). Then \(R_t \cdot s\) is the unique element x such that \(x \mathrel {\mathcal {R}}t\), \(x \mathrel {\mathcal {L}}s\) and \(\gamma (x) = \gamma (s)\) or, equivalently, the unique element x such that \(x \mathrel {\mathcal {H}}ts\) and \(\gamma (x) = \gamma (s)\).


Let \(x = R_t \cdot s\). We have \((R_x, \gamma (x), L_x) = \pi ^{-1}(x) = \pi ^{-1}(R_t \cdot s) = (R_t, \gamma (s), L_s)\). Together with the fact that \(\pi \) is bijective, this establishes the first claim. For the second claim, note that since S is simple, \(x \mathrel {\mathcal {R}}t\) is equivalent to \(x \mathrel {\mathcal {R}}ts\) and \(x \mathrel {\mathcal {L}}s\) is equivalent to \(x \mathrel {\mathcal {L}}ts\).   \(\square \)

Lemma 12

Let \(u \in A^+\) with \(g(u) = (s, X)\) and let \(x \in S\). Then \(x \in X \mathbin {\cup }\left\{ s\right\} \) if and only if there exists a factorization \(u = pq\) with \(p \in A^+\) and \(q \in A^*\) such that \(x \mathrel {\mathcal {H}}h(qp)\) and \(\gamma (x) = \gamma (h(p))\).


Obviously, we have \(x = s\) if and only if there exists a factorization \(u = pq\) with \(p = u\) and \(q = \varepsilon \) satisfying the properties described above. Thus, it suffices to consider factorizations where \(p, q \in A^+\). By Lemma 11, such a factorization exists if and only if \(x = R_{h(q)} \cdot h(p)\) which is, in turn, equivalent to \(x \in X\) by the definition of g.   \(\square \)

Lemma 13

Let (tf) be a linked pair of S, let \(\big ((s, X), (e, Y)\big )\) be a linked pair of T and let \(\alpha \in [(s, X)]_g {[(e, Y)]}_g^\omega \). Then \(\alpha \in [t]_h{[f]}_h^\omega \) if and only if \(tq = s\), \(pq = e\), \(qp = f\), \(R_q \cdot t \in X\) and \(R_q \cdot p \in Y\) for some \(p, q \in S\).


For the direction from left to right, let \(\alpha = u v_1 v_1' v_2 v_2' \cdots \) such that \(g(u) = (s, X)\), \(g(v_i v_i') = (e, Y)\), \(h(u v_1) = t\) and \(h(v_i' v_{i+1}) = f\) for all \(i \geqslant 1\). Furthermore, we assume without loss of generality that \(v_i, v_i' \ne \varepsilon \) for all \(i \geqslant 1\) and that \(h(v_1) = h(v_2)\). We set \(p = h(v_1) = h(v_2)\) and \(q = h(v_1')\). Now, \(tq = h(u v_1 v_1') = se = s\), \(pq = h(v_1 v_1') = e\) and \(qp = h(v_1' v_2) = f\). Moreover, by the definition of g, we have \(R_q \cdot t = R_{h(v_1')} \cdot h(u v_1) \in X\) and \(R_q \cdot p = R_{h(v_1')} \cdot h(v_1) \in Y\).

For the converse implication, note that by Lemma 12, there exists a factorization \(\alpha = u v_1 v_1' v_2 v_2' \cdots \) such that \(h(u) = s\), \(h(v_i v_i') = e\), \(R_{h(v_1')} \cdot h(u v_1) = R_q \cdot t\) and \(R_{h(v_i')} \cdot h(v_i) = R_q \cdot p\) for all \(i \geqslant 1\). Since S is simple, \(h(v_i) \mathrel {\mathcal {R}}h(v_i v_i') = e \mathrel {\mathcal {R}}p\) and \(h(v_i) \mathrel {\mathcal {L}}(R_{h(v_i')} \cdot h(v_i)) = (R_q \cdot p) \mathrel {\mathcal {L}}p\) for all \(i \geqslant 1\). Furthermore, \(\gamma (h(v_i)) = \gamma (R_{h(v_i')} \cdot h(v_i)) = \gamma (R_q \cdot p) = \gamma (p)\). Together, this yields \(h(v_i) = p\) by Lemma 11. Similarly, we have \(h(v_i') \mathrel {\mathcal {R}}(R_{h(v_i')} \cdot h(v_i)) = (R_q \cdot p) \mathrel {\mathcal {R}}q\) and thus, \(p h(v_i') = h(v_i v_i') = pq\) implies \(h(v_i') = q\) for all \(i \geqslant 1\) by Lemma 1. This shows that \(h(u v_1) = sp = tqp = tf = t\) and \(h(v_i' v_{i+1}) = qp = f\). We conclude that \(\alpha \in [t]{[f]}^\omega \).   \(\square \)

Theorem 14

Let \(h :A^+ \rightarrow S\) be a morphism onto a simple semigroup of size \(n = \left| S\right| \) that weakly recognizes a language \(L \subseteq A^\omega \). Then there exists a morphism \(g :A^+ \rightarrow T\) to a semigroup of size \(\left| T\right| = n 2^n\) that strongly recognizes L.


The construction we use is the one described in the introduction of this section. Consider a linked pair ((sX), (eY)) of T as well as two infinite words \(\alpha , \beta \in [(s, X)]{[(e, Y)]}^\omega \). If \(\alpha \in L\), there exists a linked pair (tf) of S such that \(\alpha \in [t]{[f]}^\omega \subseteq L\). Lemma 13 immediately yields \(\beta \in [t]{[f]}^\omega \subseteq L\), thereby showing that g strongly recognizes L.   \(\square \)

7 Discussion and Open Problems

We presented lower bound techniques and gave tight bounds for the conversion between finite automata and weakly recognizing morphisms. One can use techniques similar to those described in Sect. 4 to obtain a \(3^{n^2}\) lower bound for the conversion of finite automata with transition-based Büchi acceptance to strongly recognizing morphisms. However, with the usual state-based Büchi acceptance criterion, the analysis becomes much more involved and it is not clear whether the \(3^{n^2}\) upper bound can be reached. Analogously, there is no straightforward adaptation of the conversion of weakly recognizing morphisms into Büchi automata in Sect. 5 to strongly recognizing morphisms. It would be interesting to see whether the quadratic lower bound also holds in this setting.

Another open problem is to close the remaining gaps between the upper and the lower bounds. This is particularly true for the complexity of complementation and the conversion of weakly recognizing morphisms to strong recognition. We showed that there is an exponential lower bound and gave an asymptotically optimal construction for simple semigroups which was a first candidate for semigroups that are hard to complement. It is easy to adapt this construction to families of semigroups where the size of each \(\mathcal {J}\)-class is bounded by a constant. However, for the general case, the gap between \(n 2^{n-1}\) and \(2^{n^2}\) remains.

Beyond that, another direction for future research is to investigate whether any of the bounds can be improved by considering the size of the accepting set, i.e., the number of linked pairs used to describe a language.



We thank the anonymous referees for several useful suggestions which helped to improve the presentation of this paper.


  1. 1.
    Arnold, A.: A syntactic congruence for rational \(\omega \)-languages. Theoret. Comput. Sci. 39, 333–335 (1985)MathSciNetCrossRefzbMATHGoogle Scholar
  2. 2.
    Büchi, J.R.: Weak second-order arithmetic and finite automata. Zeitschrift für mathematische Logik und Grundlagen der Mathematik 6, 66–92 (1960)MathSciNetCrossRefzbMATHGoogle Scholar
  3. 3.
    Chrobak, M.: Finite automata and unary languages. Theoret. Comput. Sci. 47(2), 149–158 (1986)MathSciNetCrossRefzbMATHGoogle Scholar
  4. 4.
    Devadze, H.M.: Generating sets of the semigroup of all binary relations in a finite set. Doklady Akademii Nauk BSSR 12, 765–768 (1968)MathSciNetzbMATHGoogle Scholar
  5. 5.
    Fleischer, L., Kufleitner, M.: Efficient algorithms for morphisms over omega-regular languages. In: Proceedings of the FSTTCS 2015. LIPIcs, vol. 45, pp. 112–124. Dagstuhl Publishing (2015)Google Scholar
  6. 6.
    Holzer, M., König, B.: On deterministic finite automata and syntactic monoid size. Theoret. Comput. Sci. 327(3), 319–347 (2004)MathSciNetCrossRefzbMATHGoogle Scholar
  7. 7.
    Kim, K.H., Roush, F.W.: Two-generator semigroups of binary relations. J. Math. Psychol. 17(3), 236–246 (1978)MathSciNetCrossRefzbMATHGoogle Scholar
  8. 8.
    Konieczny, J.: A proof of Devadze’s theorem on generators of the semigroup of boolean matrices. Semigroup Forum 83(2), 281–288 (2011)MathSciNetCrossRefzbMATHGoogle Scholar
  9. 9.
    Pécuchet, J.: Variétés de semis groupes et mots infinis. In: Proceedings of the STACS 1986, pp. 180–191 (1986)Google Scholar
  10. 10.
    Perrin, D., Pin, J.-É.: Infinite Words. Pure and Applied Mathematics, vol. 141. Elsevier, Amsterdam (2004)zbMATHGoogle Scholar
  11. 11.
    Pin, J.-É.: Varieties of Formal Languages. North Oxford Academic, London (1986)CrossRefzbMATHGoogle Scholar
  12. 12.
    Sakoda, W.J., Sipser, M.: Nondeterminism and the size of two way finite automata. In: Proceedings of the STOC 1978, pp. 275–286. ACM Press (1978)Google Scholar
  13. 13.
    Thomas, W.: Automata on infinite objects. In: Handbook of Theoretical Computer Science, chap. 4, pp. 133–191. Elsevier (1990)Google Scholar
  14. 14.
    Yan, Q.: Lower bounds for complementation of omega-automata via the full automata technique. Logical Methods Comput. Sci. 4(1), 1–20 (2008)MathSciNetCrossRefzbMATHGoogle Scholar

Copyright information

© IFIP International Federation for Information Processing 2016

Authors and Affiliations

  1. 1.FMIUniversity of StuttgartStuttgartGermany

Personalised recommendations