- Source: Syntactic monoid
In mathematics and computer science, the syntactic monoid
M
(
L
)
{\displaystyle M(L)}
of a formal language
L
{\displaystyle L}
is the smallest monoid that recognizes the language
L
{\displaystyle L}
.
Syntactic quotient
The free monoid on a given set is the monoid whose elements are all the strings of zero or more elements from that set, with string concatenation as the monoid operation and the empty string as the identity element. Given a subset
S
{\displaystyle S}
of a free monoid
M
{\displaystyle M}
, one may define sets that consist of formal left or right inverses of elements in
S
{\displaystyle S}
. These are called quotients, and one may define right or left quotients, depending on which side one is concatenating. Thus, the right quotient of
S
{\displaystyle S}
by an element
m
{\displaystyle m}
from
M
{\displaystyle M}
is the set
S
/
m
=
{
u
∈
M
|
u
m
∈
S
}
.
{\displaystyle S\ /\ m=\{u\in M\;\vert \;um\in S\}.}
Similarly, the left quotient is
m
∖
S
=
{
u
∈
M
|
m
u
∈
S
}
.
{\displaystyle m\setminus S=\{u\in M\;\vert \;mu\in S\}.}
Syntactic equivalence
The syntactic quotient induces an equivalence relation on
M
{\displaystyle M}
, called the syntactic relation, or syntactic equivalence (induced by
S
{\displaystyle S}
).
The right syntactic equivalence is the equivalence relation
s
∼
S
t
⇔
S
/
s
=
S
/
t
⇔
(
∀
x
∈
M
:
x
s
∈
S
⇔
x
t
∈
S
)
{\displaystyle s\sim _{S}t\ \Leftrightarrow \ S\,/\,s\;=\;S\,/\,t\ \Leftrightarrow \ (\forall x\in M\colon \ xs\in S\Leftrightarrow xt\in S)}
.
Similarly, the left syntactic equivalence is
s
S
∼
t
⇔
s
∖
S
=
t
∖
S
⇔
(
∀
y
∈
M
:
s
y
∈
S
⇔
t
y
∈
S
)
{\displaystyle s\;{}_{S}{\sim }\;t\ \Leftrightarrow \ s\setminus S\;=\;t\setminus S\ \Leftrightarrow \ (\forall y\in M\colon \ sy\in S\Leftrightarrow ty\in S)}
.
Observe that the right syntactic equivalence is a left congruence with respect to string concatenation and vice versa; i.e.,
s
∼
S
t
⇒
x
s
∼
S
x
t
{\displaystyle s\sim _{S}t\ \Rightarrow \ xs\sim _{S}xt\ }
for all
x
∈
M
{\displaystyle x\in M}
.
The syntactic congruence or Myhill congruence is defined as
s
≡
S
t
⇔
(
∀
x
,
y
∈
M
:
x
s
y
∈
S
⇔
x
t
y
∈
S
)
{\displaystyle s\equiv _{S}t\ \Leftrightarrow \ (\forall x,y\in M\colon \ xsy\in S\Leftrightarrow xty\in S)}
.
The definition extends to a congruence defined by a subset
S
{\displaystyle S}
of a general monoid
M
{\displaystyle M}
. A disjunctive set is a subset
S
{\displaystyle S}
such that the syntactic congruence defined by
S
{\displaystyle S}
is the equality relation.
Let us call
[
s
]
S
{\displaystyle [s]_{S}}
the equivalence class of
s
{\displaystyle s}
for the syntactic congruence.
The syntactic congruence is compatible with concatenation in the monoid, in that one has
[
s
]
S
[
t
]
S
=
[
s
t
]
S
{\displaystyle [s]_{S}[t]_{S}=[st]_{S}}
for all
s
,
t
∈
M
{\displaystyle s,t\in M}
. Thus, the syntactic quotient is a monoid morphism, and induces a quotient monoid
M
(
S
)
=
M
/
≡
S
{\displaystyle M(S)=M\ /\ {\equiv _{S}}}
.
This monoid
M
(
S
)
{\displaystyle M(S)}
is called the syntactic monoid of
S
{\displaystyle S}
.
It can be shown that it is the smallest monoid that recognizes
S
{\displaystyle S}
; that is,
M
(
S
)
{\displaystyle M(S)}
recognizes
S
{\displaystyle S}
, and for every monoid
N
{\displaystyle N}
recognizing
S
{\displaystyle S}
,
M
(
S
)
{\displaystyle M(S)}
is a quotient of a submonoid of
N
{\displaystyle N}
. The syntactic monoid of
S
{\displaystyle S}
is also the transition monoid of the minimal automaton of
S
{\displaystyle S}
.
A group language is one for which the syntactic monoid is a group.
Myhill–Nerode theorem
The Myhill–Nerode theorem states: a language
L
{\displaystyle L}
is regular if and only if the family of quotients
{
m
∖
L
|
m
∈
M
}
{\displaystyle \{m\setminus L\,\vert \;m\in M\}}
is finite, or equivalently, the left syntactic equivalence
S
∼
{\displaystyle {}_{S}{\sim }}
has finite index (meaning it partitions
M
{\displaystyle M}
into finitely many equivalence classes).
This theorem was first proved by Anil Nerode (Nerode 1958) and the relation
S
∼
{\displaystyle {}_{S}{\sim }}
is thus referred to as Nerode congruence by some authors.
= Proof
=The proof of the "only if" part is as follows. Assume that a finite automaton recognizing
L
{\displaystyle L}
reads input
x
{\displaystyle x}
, which leads to state
p
{\displaystyle p}
. If
y
{\displaystyle y}
is another string read by the machine, also terminating in the same state
p
{\displaystyle p}
, then clearly one has
x
∖
L
=
y
∖
L
{\displaystyle x\setminus L\,=y\setminus L}
. Thus, the number of elements in
{
m
∖
L
|
m
∈
M
}
{\displaystyle \{m\setminus L\,\vert \;m\in M\}}
is at most equal to the number of states of the automaton and
{
m
∖
L
|
m
∈
L
}
{\displaystyle \{m\setminus L\,\vert \;m\in L\}}
is at most the number of final states.
For a proof of the "if" part, assume that the number of elements in
{
m
∖
L
|
m
∈
M
}
{\displaystyle \{m\setminus L\,\vert \;m\in M\}}
is finite. One can then construct an automaton where
Q
=
{
m
∖
L
|
m
∈
M
}
{\displaystyle Q=\{m\setminus L\,\vert \;m\in M\}}
is the set of states,
F
=
{
m
∖
L
|
m
∈
L
}
{\displaystyle F=\{m\setminus L\,\vert \;m\in L\}}
is the set of final states, the language
L
{\displaystyle L}
is the initial state, and the transition function is given by
δ
y
:
x
∖
L
→
y
∖
(
x
∖
L
)
=
(
x
y
)
∖
L
{\displaystyle \delta _{y}\colon x\setminus L\to y\setminus (x\setminus L)=(xy)\setminus L}
. Clearly, this automaton recognizes
L
{\displaystyle L}
.
Thus, a language
L
{\displaystyle L}
is recognizable if and only if the set
{
m
∖
L
|
m
∈
M
}
{\displaystyle \{m\setminus L\,\vert \;m\in M\}}
is finite. Note that this proof also builds the minimal automaton.
Examples
Let
L
{\displaystyle L}
be the language over
A
=
{
a
,
b
}
{\displaystyle A=\{a,b\}}
of words of even length. The syntactic congruence has two classes,
L
{\displaystyle L}
itself and
L
1
{\displaystyle L_{1}}
, the words of odd length. The syntactic monoid is the group of order 2 on
{
L
,
L
1
}
{\displaystyle \{L,L_{1}\}}
.
For the language
(
a
b
+
b
a
)
∗
{\displaystyle (ab+ba)^{*}}
, the minimal automaton has 4 states and the syntactic monoid has 15 elements.
The bicyclic monoid is the syntactic monoid of the Dyck language (the language of balanced sets of parentheses).
The free monoid on
A
{\displaystyle A}
(where
|
A
|
>
1
{\displaystyle \left|A\right|>1}
) is the syntactic monoid of the language
{
w
w
R
∣
w
∈
A
∗
}
{\displaystyle \{ww^{R}\mid w\in A^{*}\}}
, where
w
R
{\displaystyle w^{R}}
is the reversal of the word
w
{\displaystyle w}
. (For
|
A
|
=
1
{\displaystyle \left|A\right|=1}
, one can use the language of square powers of the letter.)
Every non-trivial finite monoid is homomorphic to the syntactic monoid of some non-trivial language, but not every finite monoid is isomorphic to a syntactic monoid.
Every finite group is isomorphic to the syntactic monoid of some regular language.
The language over
{
a
,
b
}
{\displaystyle \{a,b\}}
in which the number of occurrences of
a
{\displaystyle a}
and
b
{\displaystyle b}
are congruent modulo
2
n
{\displaystyle 2^{n}}
is a group language with syntactic monoid
Z
/
2
n
Z
{\displaystyle \mathbb {Z} /2^{n}\mathbb {Z} }
.
Trace monoids are examples of syntactic monoids.
Marcel-Paul Schützenberger characterized star-free languages as those with finite aperiodic syntactic monoids.
References
Anderson, James A. (2006). Automata theory with modern applications. With contributions by Tom Head. Cambridge: Cambridge University Press. ISBN 0-521-61324-8. Zbl 1127.68049.
Holcombe, W.M.L. (1982). Algebraic automata theory. Cambridge Studies in Advanced Mathematics. Vol. 1. Cambridge University Press. ISBN 0-521-60492-3. Zbl 0489.68046.
Lawson, Mark V. (2004). Finite automata. Chapman and Hall/CRC. ISBN 1-58488-255-7. Zbl 1086.68074.
Pin, Jean-Éric (1997). "10. Syntactic semigroups". In Rozenberg, G.; Salomaa, A. (eds.). Handbook of Formal Language Theory (PDF). Vol. 1. Springer-Verlag. pp. 679–746. Zbl 0866.68057.
Sakarovitch, Jacques (2009). Elements of automata theory. Translated from the French by Reuben Thomas. Cambridge University Press. ISBN 978-0-521-84425-3. Zbl 1188.68177.
Straubing, Howard (1994). Finite automata, formal logic, and circuit complexity. Progress in Theoretical Computer Science. Basel: Birkhäuser. ISBN 3-7643-3719-2. Zbl 0816.68086.
Kata Kunci Pencarian:
- Monoid sintaktik
- Eksponensiasi
- Syntactic monoid
- Monoid
- Semigroup
- Free monoid
- Bicyclic semigroup
- Regular language
- Dyck language
- Aperiodic semigroup
- Transformation semigroup
- Semiautomaton