Syntactic monoid explained
In mathematics and computer science, the syntactic monoid
of a
formal language
is the smallest
monoid that
recognizes the language
.
Syntactic quotient
of a free monoid
, one may define sets that consist of formal left or right inverses of elements in
. These are called
quotients, and one may define right or left quotients, depending on which side one is concatenating. Thus, the
right quotient of
by an element
from
is the set
S / m=\{u\inM \vert um\inS\}.
Similarly, the left quotient is
m\setminusS=\{u\inM \vert mu\inS\}.
Syntactic equivalence
The syntactic quotient induces an equivalence relation on
, called the
syntactic relation, or
syntactic equivalence (induced by
).
The right syntactic equivalence is the equivalence relation
s\simSt \Leftrightarrow S/s = S/t \Leftrightarrow (\forallx\inM\colon xs\inS\Leftrightarrowxt\inS)
.
Similarly, the left syntactic equivalence is
s {}S{\sim} t \Leftrightarrow s\setminusS = t\setminusS \Leftrightarrow (\forally\inM\colon sy\inS\Leftrightarrowty\inS)
.
Observe that the right syntactic equivalence is a left congruence with respect to string concatenation and vice versa; i.e.,
for all
.
The syntactic congruence or Myhill congruence[1] is defined as[2]
s\equivSt \Leftrightarrow (\forallx,y\inM\colon xsy\inS\Leftrightarrowxty\inS)
.
The definition extends to a congruence defined by a subset
of a general monoid
. A
disjunctive set is a subset
such that the syntactic congruence defined by
is the equality relation.
[3] Let us call
the equivalence class of
for the syntactic congruence.The syntactic congruence is
compatible with concatenation in the monoid, in that one has
for all
. Thus, the syntactic quotient is a monoid morphism, and induces a quotient monoid
.
This monoid
is called the
syntactic monoid of
.It can be shown that it is the smallest
monoid that
recognizes
; that is,
recognizes
, and for every monoid
recognizing
,
is a quotient of a submonoid of
. The syntactic monoid of
is also the
transition monoid of the minimal automaton of
.
[1] [2] [4] A group language is one for which the syntactic monoid is a group.[5]
Myhill–Nerode theorem
The Myhill–Nerode theorem states: a language
is regular if and only if the family of quotients
\{m\setminusL\vert m\inM\}
is finite, or equivalently, the left syntactic equivalence
has
finite index (meaning it partitions
into finitely many equivalence classes).
This theorem was first proved by Anil Nerode and the relation
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
reads input
, which leads to state
. If
is another string read by the machine, also terminating in the same state
, then clearly one has
. Thus, the number of elements in
\{m\setminusL\vert m\inM\}
is at most equal to the number of states of the automaton and
\{m\setminusL\vert m\inL\}
is at most the number of final states.
For a proof of the "if" part, assume that the number of elements in
\{m\setminusL\vert m\inM\}
is finite. One can then construct an automaton where
Q=\{m\setminusL\vert m\inM\}
is the set of states,
F=\{m\setminusL\vert m\inL\}
is the set of final states, the language
is the initial state, and the transition function is given by
\deltay\colonx\setminusL\toy\setminus(x\setminusL)=(xy)\setminusL
. Clearly, this automaton recognizes
.
Thus, a language
is recognizable if and only if the set
\{m\setminusL\vert m\inM\}
is finite. Note that this proof also builds the minimal automaton.
Examples
be the language over
of words of even length. The syntactic congruence has two classes,
itself and
, the words of odd length. The syntactic monoid is the group of order 2 on
.
[6]
, the minimal automaton has 4 states and the syntactic monoid has 15 elements.
[7]
(where
) is the syntactic monoid of the language
, where
is the reversal of the word
. (For
, 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,[8] but not every finite monoid is isomorphic to a syntactic monoid.[9]
- Every finite group is isomorphic to the syntactic monoid of some regular language.[8]
- The language over
in which the number of occurrences of
and
are congruent modulo
is a group language with syntactic monoid
.
[5]
References
- Book: Anderson, James A. . Automata theory with modern applications . With contributions by Tom Head . Cambridge . . 2006 . 0-521-61324-8 . 1127.68049 .
- Book: Holcombe, W.M.L. . Algebraic automata theory . 0489.68046 . Cambridge Studies in Advanced Mathematics . 1 . . 1982 . 0-521-60492-3 .
- Book: Lawson, Mark V. . Finite automata . Chapman and Hall/CRC . 2004 . 1-58488-255-7 . 1086.68074 .
- Book: Pin, Jean-Éric . Rozenberg . G. . Salomaa . A. . Jean-Éric Pin. Handbook of Formal Language Theory . 10. Syntactic semigroups . 1 . . 1997 . 679–746 . 0866.68057 .
- Book: Sakarovitch, Jacques . Elements of automata theory . Translated from the French by Reuben Thomas . . 2009 . 978-0-521-84425-3 . 1188.68177 .
- Book: Straubing, Howard . Finite automata, formal logic, and circuit complexity . registration . Progress in Theoretical Computer Science . Basel . Birkhäuser . 1994 . 3-7643-3719-2 . 0816.68086 .
Notes and References
- Holcombe (1982) p.160
- Lawson (2004) p.210
- Lawson (2004) p.232
- Straubing (1994) p.55
- Sakarovitch (2009) p.342
- Straubing (1994) p.54
- Lawson (2004) pp.211-212
- Book: McNaughton . Robert . Papert . Seymour . Seymour Papert . With an appendix by William Henneman . Research Monograph . 65 . 1971 . Counter-free Automata . MIT Press . 0-262-13076-9 . 0232.94024 . 48 . registration .
- Lawson (2004) p.233
- Marcel-Paul Schützenberger . Marcel-Paul Schützenberger . On finite monoids having only trivial subgroups . Information and Computation. 1965. 8 . 2 . 190–194. 10.1016/s0019-9958(65)90108-7. free .
- Straubing (1994) p.60