HOME

TheInfoList



OR:

In mathematics and
computer science Computer science is the study of computation, automation, and information. Computer science spans theoretical disciplines (such as algorithms, theory of computation, information theory, and automation) to practical disciplines (includin ...
, the syntactic monoid M(L) of a
formal language In logic, mathematics, computer science, and linguistics, a formal language consists of words whose letters are taken from an alphabet and are well-formed according to a specific set of rules. The alphabet of a formal language consists of s ...
L is the smallest
monoid In abstract algebra, a branch of mathematics, 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 0. Monoids ...
that recognizes the language 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 In formal language theory and computer programming, string concatenation is the operation of joining character strings end-to-end. For example, the concatenation of "snow" and "ball" is "snowball". In certain formalisations of concatenatio ...
as the monoid operation and the empty string as the
identity element In mathematics, an identity element, or neutral element, of a binary operation operating on a set is an element of the set that leaves unchanged every element of the set when the operation is applied. This concept is used in algebraic structures s ...
. Given a
subset In mathematics, set ''A'' is a subset of a set ''B'' if all 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 are unequal, then ''A'' is a proper subset o ...
S of a free monoid M, one may define sets that consist of formal left or right inverses of elements in 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 by an element m from M is the set :S \ / \ m=\. Similarly, the left quotient is :m \setminus S=\.


Syntactic equivalence

The syntactic quotient induces an
equivalence relation In mathematics, an equivalence relation is a binary relation that is reflexive, symmetric and transitive. The equipollence relation between line segments in geometry is a common example of an equivalence relation. Each equivalence relatio ...
on M, called the syntactic relation, or syntactic equivalence (induced by S). The ''right syntactic equivalence'' is the equivalence relation :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 \ \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 Congruence may refer to: Mathematics * Congruence (geometry), being the same size and shape * Congruence or congruence relation, in abstract algebra, an equivalence relation on an algebraic structure that is compatible with the structure * In mod ...
with respect to
string concatenation In formal language theory and computer programming, string concatenation is the operation of joining character strings end-to-end. For example, the concatenation of "snow" and "ball" is "snowball". In certain formalisations of concatenatio ...
and vice versa; i.e., s \sim_S t \ \Rightarrow\ xs \sim_S xt\ for all x \in M. The syntactic congruence or Myhill congruenceHolcombe (1982) p.160 is defined asLawson (2004) p.210 :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 of a general monoid M. A disjunctive set is a subset S such that the syntactic congruence defined by S is the equality relation.Lawson (2004) p.232 Let us call S the equivalence class of s for the syntactic congruence. The syntactic congruence is compatible with concatenation in the monoid, in that one has : S S= tS for all s,t\in M. Thus, the syntactic quotient is a monoid morphism, and induces a quotient monoid :M(S)= M \ / \ . This monoid M(S) is called the syntactic monoid of S. It can be shown that it is the smallest
monoid In abstract algebra, a branch of mathematics, 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 0. Monoids ...
that recognizes S; that is, M(S) recognizes S, and for every monoid N recognizing S, M(S) is a quotient of a
submonoid In abstract algebra, a branch of mathematics, 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 0. Monoids a ...
of N. The syntactic monoid of S is also the transition monoid of the
minimal automaton In automata theory (a branch of theoretical computer science), DFA minimization is the task of transforming a given deterministic finite automaton (DFA) into an equivalent DFA that has a minimum number of states. Here, two DFAs are called equi ...
of S.Straubing (1994) p.55 A group language is one for which the syntactic monoid is a group.Sakarovitch (2009) p.342


Myhill–Nerode theorem

The Myhill–Nerode theorem states: a language L is regular if and only if the family of quotients \ is finite, or equivalently, the left syntactic equivalence _S has ''finite index'' (meaning it partitions M into finitely many equivalence classes). This theorem was first proved by Anil Nerode and the relation _S 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 reads input x, which leads to state p. If y is another string read by the machine, also terminating in the same state p, then clearly one has x \setminus L\,= y \setminus L. Thus, the number of elements in \ is at most equal to the number of states of the automaton and \ is at most the number of final states. For a proof of the "if" part, assume that the number of elements in \ is finite. One can then construct an automaton where Q=\ is the set of states, F=\ is the set of final states, the language L is the initial state, and the transition function is given by \delta_y \colon x \setminus L \to y\setminus(x \setminus L) =(xy) \setminus L. Clearly, this automaton recognizes L. Thus, a language L is recognizable if and only if the set \ is finite. Note that this proof also builds the minimal automaton.


Examples

* Let L be the language over A = \ of words of even length. The syntactic congruence has two classes, L itself and L_1, the words of odd length. The syntactic monoid is the group of order 2 on \.Straubing (1994) p.54 * For the language (ab+ba)^*, 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 on A (where \left, A\ > 1) is the syntactic monoid of the language \, where w^R is the reversal of the word w. (For \left, A\ = 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.Lawson (2004) p.233 * Every finite group is isomorphic to the syntactic monoid of some regular language. * The language over \ in which the number of occurrences of a and b are congruent modulo 2^n is a group language with syntactic monoid \mathbb / 2^n\mathbb. * Trace monoids are examples of syntactic monoids. * Marcel-Paul Schützenberger characterized star-free languages as those with finite
aperiodic A periodic function is a function that repeats its values at regular intervals. For example, the trigonometric functions, which repeat at intervals of 2\pi radians, are periodic functions. Periodic functions are used throughout science to desc ...
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