In
mathematics
Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
and
computer science
Computer science is the study of computation, information, and automation. Computer science spans Theoretical computer science, theoretical disciplines (such as algorithms, theory of computation, and information theory) to Applied science, ...
, the syntactic monoid
of a
formal language is the minimal
monoid that
recognizes the language
. By the
Myhill–Nerode theorem, the syntactic monoid is unique up to unique isomorphism.
Syntactic quotient
An
alphabet is a finite
set.
The
free monoid
In abstract algebra, the free monoid on a set is the monoid whose elements are all the finite sequences (or strings) of zero or more elements from that set, with string concatenation as the monoid operation and with the unique sequence of zero ...
on a given alphabet 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
In formal language theory, the empty string, or empty word, is the unique String (computer science), string of length zero.
Formal theory
Formally, a string is a finite, ordered sequence of character (symbol), characters such as letters, digits ...
as the
identity element
In mathematics, an identity element or neutral element of a binary operation is an element that leaves unchanged every element when the operation is applied. For example, 0 is an identity element of the addition of real numbers. This concept is use ...
.
Given a
subset
In mathematics, a Set (mathematics), set ''A'' is a subset of a set ''B'' if all Element (mathematics), elements of ''A'' are also elements of ''B''; ''B'' is then a superset of ''A''. It is possible for ''A'' and ''B'' to be equal; if they a ...
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
:
Similarly, the left quotient is
:
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
:
.
Similarly, the left syntactic equivalence is
:
.
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
[Holcombe (1982) p. 160] is defined as
[Lawson (2004) p.210]
:
.
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.
[Lawson (2004) p.232]
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
In abstract algebra, a monoid is a set equipped with an associative binary operation and an identity element. For example, the nonnegative integers with addition form a monoid, the identity element being .
Monoids are semigroups with identi ...
, 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
In abstract algebra, a monoid is a set equipped with an associative binary operation and an identity element. For example, the nonnegative integers with addition form a monoid, the identity element being .
Monoids are semigroups with identity ...
of
. The syntactic monoid of
is also the
transition monoid of the
minimal automaton of
.
[Straubing (1994) p.55]
A group language is one for which the syntactic monoid is a group.[Sakarovitch (2009) p.342]
Examples
* Let 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 .[Straubing (1994) p.54]
* For the language , the minimal automaton has 4 states and the syntactic monoid has 15 elements.[Lawson (2004) pp.211-212]
* The bicyclic monoid is the syntactic monoid of the Dyck language (the language of balanced sets of parentheses).
* The free monoid
In abstract algebra, the free monoid on a set is the monoid whose elements are all the finite sequences (or strings) of zero or more elements from that set, with string concatenation as the monoid operation and with the unique sequence of zero ...
on (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, but not every finite monoid is isomorphic to a syntactic monoid.[Lawson (2004) p.233]
* Every finite group
In abstract algebra, a finite group is a group whose underlying set is finite. Finite groups often arise when considering symmetry of mathematical or physical objects, when those objects admit just a finite number of structure-preserving tra ...
is isomorphic to the syntactic monoid of some regular language.[
* The language over in which the number of occurrences of and are congruent modulo is a group language with syntactic monoid .][
* Trace monoids are examples of syntactic monoids.
* Marcel-Paul Schützenberger] characterized star-free languages as those with finite aperiodic syntactic monoids.[Straubing (1994) p.60]
References
*
*
*
*
*
* {{cite book , last=Straubing , first=Howard , title=Finite automata, formal logic, and circuit complexity , url=https://archive.org/details/finiteautomatafo0000stra , url-access=registration , series=Progress in Theoretical Computer Science , location=Basel , publisher=Birkhäuser , year=1994 , isbn=3-7643-3719-2 , zbl=0816.68086
Formal languages
Semigroup theory