数理解析研究所講究録 1437 巻 2005 年 11-16 11

SYNTACTIC AND LANGUAGES *

TERUYUKI MITOMA AND KUNITAKA SHOJI DEPARTMENT OF MATHEMATICS, SHIMANE UNIVERSITY MATSUE, SHJMANE, 690-8504 JAPAN

In this paper, we investigate the structures of syntactic monoids of languages and take up the related problems.

1 Syntactic monoids

$X$ $L$ $X$ $X^{*}$ subset of ”, Definition 1. $X$ is finite alphabet, is the set of words over , is a ’ $X^{*}$ $w\sigma_{L}w$ is called a language. The syntactic congruence $\sigma L$ on is defined by if and only

$y)\in X^{*}\mathrm{x}$ $X^{*}|$ $\in L$ $\{(x,y)\in X^{*}\cross X^{*}|xwy \in L\}$ are equal to each if the sets { ( $x$ , xwy } $)$ other. The syntactic of $L$ is defined to be a monoid $X^{*}/\sigma L$ .

Definition 2. An finite automaton $A$ is a quintuple

$A=(A, V, E, I,T)$

$V$ $E$ finite set of directed edges where $X$ is a finite alphabet, is a finite set of states, is a

$e$ $(v, a, v’)$ where each of which is labelled by a letter of $X$ ; edges are written as $e=$ $T$ is $a\in X$ $V$ of which is called an initial state, and $v$ , $v’\in V$ and . I is a subset of , each a subset of $V$ , each of which is called a terminal state.

$X$ $L$ over if there Let $L$ be a language over X. Then we say that is a exists an automaton $A$ with $L=L(A)$ .

$L$ only $Syn(L)$ is $a$ Result 1. Let $L$ be a language over X. Then is regular if and if finite rnonoid. Problem 1. Given a language $L$ , discribe structure of $Syn(L)$ .

$L$ $X^{*}$ $X^{*}$ $L^{c}$ the set in . Then Result 2. Let $L$ be a language of and the complement of $Syn(L)=Syn(L^{c})$ .

$A^{*}$ $A=\{\mathrm{a}\mathrm{i}, \cdots, a_{n}\}$ $L$ syntactic monoid Example 1. Let . Let be a language of . If the . $Syn(L)$ is a right zero semigroup with 1, then $Syn(L)$ is three-element

$\overline{*\mathrm{T}\mathrm{h}\mathrm{i}\mathrm{s}\mathrm{i}\mathrm{s}\mathrm{a}\mathrm{n}\mathrm{a}\mathrm{b}\mathrm{s}\mathrm{r}\mathrm{t}\mathrm{a}\mathrm{c}\mathrm{t}}$and the paper will appear elsewhere 12

Example 2. $A=\{a_{1}, \cdots , a_{n}\}$ . For any $w=b_{1}b_{2}\cdots b_{r}$ , let $w^{R}=b_{r}\cdots$ $b_{2}b_{1}$ . Let $L=\{ww^{R}|w\in A^{*}\}$ . Then $Syn(L)$ is the $A^{*}$ on $A$ .

Example 3. Let $A=\{a, b\}$ and $L=\{a^{n}b^{n}|n\in N\}$ . Then all of $\sigma_{L}$ -classes are {1}, $0=A^{*}baA^{*}$ {ab}, {ab}, $\{b^{n}\}$ , $c_{n}=\{a^{p+n}b^{\mathrm{p}}|p\in N\}$ , $d_{n}=\{a^{q}b^{q+n}|q\in N\}$ , . Also,

$Syn(L)-\{0, 1\}$ is a $D$-clas $\mathrm{s}$ .

$A^{*}$ Example 4 Let $A=\{\mathrm{a}, \cdots, a_{n}\}$ . Give the length and lexicographic ordering on with

$n$ $x_{1}^{n}$ $a_{1}<\cdots

$w_{2}=(a_{1}a_{1})(a_{1}a_{2})\cdots\cdots(a_{1}a_{n})\cdots$ $(a_{n}a_{n-1})(a_{n}a_{n})$ and so on.

and let $L=\{w_{n}|n\in N\}$ be the set of words. The free monoid $A^{*}$ on $A$ is isomorphic to $Syn(L)$ .

Example 5. Let $A=\{a_{1}, \cdots, ar\}$ and let $L$ be the set of words $w_{n}$ in which each $ai$ occurs exactly $n$ times. Then the free commutative monoid on A is isomorphic to $Syn(L)$ .

Result 3. For every finitely generated G, there exists a language L of $X^{*}$ such that G is isomorphic to $Syn(L)$ .

2 $A$-Graphs, Automata, and embedding of monoids in Syntactic monoids

Definition 3. Let $A$ be a finite set. Then $G=(A, V, E)$ is a {directed) $A$ -graph, where $V$ is a set of vertices, $E$ is a set of directed edges with a letter as label and so edges $e$ from

$v’$ $v\supset^{a}v^{t}$ a vertex $v$ to a vertex are written as $e=(v, a, v’)$ or 6 ; .

A $A$-graph $G=(A, V, E)$ is said to be dete rministic if $\forall v\in V$, $\forall a\in A$ , there exists at most one vertex $v’\in V$ such that $(v, a, v’)\in E$ .

Assume that a $A$-graph $G=(A, V, E)$ is deterministic. For any $a\in A$ , define a partial

$\varphi_{a}(u)=v$ map $\varphi_{a}$ : $Varrow V$ by if there exsists $(u, a, v)\in E$ . We obtain the submonoid

$M(G)$ of $\mathcal{P}\mathcal{T}(V)$ generated by the set $\{\varphi_{a}\}_{a\in A}$ , where $P\mathcal{T}(V)$ is the monoid of all partial maps $Varrow V$ . $M(G)$ is called the monoid of $G$ .

Fix a deterministic $A$-graph $G=(A, V, E)$ . Let $\mathrm{i}$ be an element of $V$ , called an initial vertex of $G$ . Let $T$ be a subset of $V$ , whose elements are called terminal vertices of $G$. We obtain a (unnecessarily finite) deterministic automaton $A(G)$ in which $V$ is a set of states,

$E$ is a set of edges, $\mathrm{i}$ is an initial state, and $T$ is a set of terminal states.

Given edges $e_{i}=(u_{i}, a_{i}, u_{\iota+1})(1\leq \mathrm{i}\leq n)$ , the sequence eie2 $\ldots e_{n}$ is called path from

a state $u_{1}$ to a state $u_{n+1}$ . the word $a_{1}a_{2}\cdots a_{n}$ is a label of the path $p=\mathrm{e}\mathrm{i}\mathrm{e}2\cdots$ $e_{n}$ , the

length of $p$ is $n$ , and then we write it as $|p|=n$ . 13

$\ldots$ If $u_{1}$ is an initial state and $v_{n}$ is a terminal state, then $e1$ e2 $e_{n}$ is called a successful path.

A deterministic automaton $A(G)$ is called accessible if for any vertex $v$ of $G$ , there exists a path from a initial vertex to $v$ .

A deterministic automaton $A(G)$ is called $co$ accessible if for any vertex $v$ of $G$ , there exists a path from $v$ to a terminal vertex. Lemma 1. For any deterministic automaton A, there exists an accessible and co- accessible automaton B such that $L(A)$ $=L(B)$ .

There is an action of $A^{*}$ on $V$ , that is, we write as $vw=u$ if there exists a path fiiom

$u$ to $v$ with a label $w$ .

Fix an automaton $A=(A, V, E, I,T)$ . Define a relation $\equiv \mathrm{o}\mathrm{n}$ $V$ defined by $v\equiv u$ $(u, v\in V)$ if and only if

$\{w\in A^{*}|vw\in T\}$ $=\{w\in A^{*}|uw\in T\}$ .

We get anew automaton $\overline{A}=$ $(A, \overline{V},\overline{E},\overline{I},\overline{T})$ , where $\overline{V}=V/\equiv$ , $\overline{E}=\{(\overline{u},a,\overline{v})|(u, a, v)\in$

$\overline{T}=T/\equiv$ $E\}$ (for $u\in V$), $\overline{u}=\{v\in V|u\equiv v\})$ , $\overline{I}=I/\equiv$ , .

Lemma 2. Let A $=(A,$V, E, I, T) 6e an deterministic accessible $co$ -accessible automaton. Then $\overline{A}=(A,\overline{V},\overline{E},\overline{I},\overline{T})$ is a minimal automaton recognizing $L(A)$ .

Fix a deterministic $A$-graph $G=$ $(A, V=\{v_{1},v_{2}, \ldots\}, E)$ . We get an minimal $A’=A\cup\{\alpha,\beta\}$ $V’=V\cup\{\mathrm{i}, t\}$ automaton $Ac$ $=$ $(A’, V’, E’, \{\mathrm{i}\}, \{t\})$ where , and $E^{t}=\{(\mathrm{i}, \alpha,v_{1}), (v_{j}, \alpha, v_{j+1}), (v_{j+1}, \beta,v_{j}), (v_{1}, \beta, t)|j=1,2, \ldots\}$.

Theorem 1. Let G $=(A,$V, E) be a deterministic $A$ -graph. For the automaton $A_{G}$ constructed above, $M(G)$ is embedded in $Syn(L(A_{G}))$ . Consequently, any monoid is a submonoid of a syntactic monoid.

3 Embedding of inverse monoids in syntactic monoids

Definition 4. A monoid $M$ is called an inverse monoid if for any $s\in M$ , there exsists uniquely an element $m\in M$ with $msrn=m$ , $srns=s$ .

Let $G=(A, V, E)$ be a deterministic $A$-graph. Then $G$ is called injective if there is no pair of two edges of form $(u, a, v)$ and $(u’, a,v)$ , where $a\in A$ , $u$ , $u’$ , $v\in V$ . By choosing initial vertices and terminal vertices from $V$ , we obtain an injective de- terministic automaton $A(G)$ .

$S(V)$ Then the monoid $M(G)$ of $G$ is a submonoid of the symmetric inverse monoid on the set of $V$ . 14

Now we have the following results which are an inverse monoid-version of Lemma 2 and Theorem 1.

Lemma 3. Let A $=(A,$V, E, I, T) be an deterministic accessible $co$ -accessible injective automaton.

Then $\overline{A}=(A,\overline{V},\overline{E}, \overline{I}, \overline{T})$ is a minimal automaton decognizing $L(A)$ .

Fix a deterministic injective $A$-graph $G=$ $(A, V=\{v_{1},v_{2}, \ldots\},E)$ . We get an injec- tive automaton $A_{G}=$ $(A’, V’, E’, \{\mathrm{i}\}, \{t\})$ where $A’=A\cup\{\alpha, \beta\}$ , $V’=V\cup\{\mathrm{i},t\}$ , $E^{l}=$

$4\mathrm{I}(\mathrm{i}, \alpha, v_{1})$ , $(vj, \alpha, vj+1)$ , $(\mathrm{V}, \alpha’, \mathrm{i})$ , $(v_{j+1,j}\alpha’, v)$ , $(vj+1, \beta, v_{j})$ , $(v_{1}, \beta, t)$ , $(\mathrm{V}, \beta’, v_{j+1})$ , $(t, \beta’, v_{1})$

$|_{\mathrm{J}}=1$ , 2, $\ldots$ }. Theorem 2. Let G $=(A,$V, E) be a deterministic injectiveA-graph. For the automaton $A_{G}$ constructed above, $M(G)$ is embedded in an inverse monoid $Syn(L(A_{G}))$ . Consequently, any inverse monoid is a submonoid of an inverse syntactic monoid.

4 Word problems for Syntactic monoids of context- free languages

Definition 5, Context-free languages are defined as languages consisting of words ac- cepted by pushdown automata. Equivalently, context-free languages are defined languages

accepted by formal grammars as follow $\mathrm{s}$ :

$\Gamma$ A formal gramm ar consists of a finite set $V$ of symbols and a special symbol $\sigma$ , a finite set of alphabets $A$ and a subset $P$ of $V^{+}\cross$ $(V\cup A)’$ , which is called product. Then the formal grammar $\Gamma$ is denoted by $(V, A, P, \sigma)$ . Definition 6. Let L be a language over a finite alphabet A. Then a word problem for the syntactic monoid $Syn(L)$ is the following question:

For any pair of two words $w,w^{J}\in A^{*}$ , does there exists an algorithm deciding whether $(w, w’)\in\sigma_{L}$ or $(w, w’)\not\in\sigma_{L}$ ?

Let I be a non-empty set of a semigroup $S$ . Then I is called an ideal of $S$ . An ideal

$S$ I of is called completely prime if for any $x$ , $y\in S$ , $xy\in I$ implies that either $x\in I$ or $y\in I$ . The following follows immediately. Lemma 4. Let L be a language over A and sub(L)) the set of subwords of words in L. Then the complement of sub(L) in $L$ is completely prime. Corollary 1. Let L be a language over A and sub(Ll the set of subwords of words in L. 15

Then the syntactic monoid $Syn(L)$ has a zero element if and only if either $A^{*}\neq$ sub(L) or $A^{*}\neq sub(L^{\mathrm{c}})$ .

Theorem 3. Let $L$ be a language over A. The syntactic monoid Syn(L) has a zero $A^{*}wA^{*}\subseteq L$ element if and only if there exists $a$ word $w$ over A such that either or $A^{*}wA^{*}\underline{\subseteq}L^{c}$ . Problem 2 Let L be a deterministic context-free language over a finite alphabet A. Then is word problem for the syntactic monoid $Syn(L)$ undecidable ? Problem 3 Let L be a deterministic context-free language over a finite alphabet A. Then $Syn(L\mathrm{I}$ ? is it decidable whether the syntactic monoid , has a zero element or not

5 Presentation of monoids with regular congru- ence classes

$A^{*}arrow G$ Result 4. Let G be a finitely generated group and $\varphi$ : an onto homornorphism with L $=\varphi^{-1}(1)(\subseteq A^{*})$ . Then

(1) ([6]) $G$ is finite if and only if $L$ is a regular language.

$L$ $G$ is (2) ([7], [8], [9]) is veriually free (a finite extension of free group) if and only if a dete rministic context-free language.

$A^{*}$ Lemma 5. Let L be a language of $A^{*}$ . Then L is a union of $\sigma_{L}$ classes in .

Theorem 4. Let L be a language of $A^{*}$ . Then the following are equivalent :

$L$ $A^{*}$ (1) is a $\sigma_{L}$ -class in .

(2) $xLy\cap L\neq\emptyset$ $(x, y\in A^{*})\Rightarrow xLy\subseteq L$ .

$A^{*}$ $M$ $\phi^{-1}(m)$ $\phi$ . (3) $L$ is an inverse image of a homomorphism of to a monoid Theorem 5. For every finitely generated monoid M, there exist languages $\{L_{m}\}_{m\in M}$ of $A^{*}$ such that M is embedded in the direct product of syntactic .

$A$ $M$ with Definition 7. Let $M$ be a monoid and a finite alphabet. has the presentation $A^{*}arrow M$ regular congruence classes if there exists a onto homomorphism of $\varphi$ : is such that if for any $m\in M$ , $\varphi^{-1}(m)$ is a regular language. Definition 8. A monoid M is residually finite if for each pair of elements $m,m’\in M$ , $M/\mu$ is finite and (m,$m’)\not\in\mu$ . there exists a conguence $\mu$ on M such that the factor monoid

Theorem 6. Let M be a finitely generated monoid and $\phi$ : $A^{*}arrow M$ a onto homomor- phism. Then for each $m\in M$ , the following are equivalen 1 $\mathrm{e}$

(1) $\phi^{-1}(m)$ is a regular language

(2) $|M/\sigma_{m}|<\infty$ .

$a\sigma_{m}b(a, b\in M)$ Let $M$ be a monoid and $m$ an element of M. Define a relation $\sigma_{m}$ by if and only if

$\{(x, y)\in M\mathrm{x} M|xay=m\}=\{(x, y)\in M\mathrm{x} M|xby=m\}$ .

$M$ Then $\sigma_{m}$ is a congruence on .

Theorem 7. Let M be a finitely generated monoid and $\varphi$ : $A^{*}arrow M$ be a presentation of M with regular congruence classes. Then M is residually finite.

References

[1] A. H. Clifford and G. B. Preston, Algebraic theory of semigroups, Amer. Math. Soc, Math. Survey, No.7, Providence, R.I., Vol. $1(1961)$ ; $\mathrm{V}\mathrm{o}\mathrm{l}.11(1967)$ . [2] S. Eilenberg, Automata, Languages, and Machines, Vol. B Academic Press, 1974. [3] J. E. Hopcroft and J. D. Ullman Introduction to Automata theory, Languages, and Computation, Addison-Wesly Publishing, 1979. [4] G. Lallernant, Semigroups and combinatorial applications, Jhon Wiley & Sons, 1979. [5] J. E. Pin, Varieties of Formal Languages, North Oxford Academic Publishers, 1984. [6] M. J. Dunwoody, The accessiblity of finitely presentesd groups, Invnt. Math., 81(1985), 449-457. [7] V. A. Anisimov, Groups languages, Kibernetika, 4(1971), 18-24, [8] D. C. Muller and P. E. Shupp, Groups, the theory of ends, and context-free languages, J. Comput. System ScL, 67(1983), 295-310. [9] D. C. Muller and P. E. Shupp, The theory of ends, pushdown automata, and second- order logic, Thoeritical Comput. ScL, 37(1985), 51-75