Syntactic monoid explained

In mathematics and computer science, the syntactic monoid

M(L)

of a formal language

L

is the smallest monoid that recognizes the language

L

.

Syntactic quotient

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=\{u\inM\vertum\inS\}.

Similarly, the left quotient is

m\setminusS=\{u\inM\vertmu\inS\}.

Syntactic equivalence

The syntactic quotient induces an equivalence relation on

M

, called the syntactic relation, or syntactic equivalence (induced by

S

).

The right syntactic equivalence is the equivalence relation

s\simSt\LeftrightarrowS/s = S/t\Leftrightarrow(\forallx\inM\colonxs\inS\Leftrightarrowxt\inS)

.

Similarly, the left syntactic equivalence is

s{}S{\sim}t\Leftrightarrows\setminusS = t\setminusS\Leftrightarrow(\forally\inM\colonsy\inS\Leftrightarrowty\inS)

.

Observe that the right syntactic equivalence is a left congruence with respect to string concatenation and vice versa; i.e.,

s\simSt  ⇒  xs\simSxt

for all

x\inM

.

The syntactic congruence or Myhill congruence[1] is defined as[2]

s\equivSt\Leftrightarrow(\forallx,y\inM\colonxsy\inS\Leftrightarrowxty\inS)

.

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.[3]

Let us call

[s]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[t]S=[st]S

for all

s,t\inM

. Thus, the syntactic quotient is a monoid morphism, and induces a quotient monoid

M(S)=M/{\equivS}

.

This monoid

M(S)

is called the syntactic monoid of

S

.It can be shown that it is the smallest monoid that recognizes

S

; that is,

M(S)

recognizes

S

, and for every monoid

N

recognizing

S

,

M(S)

is a quotient of a submonoid of

N

. The syntactic monoid of

S

is also the transition monoid of the minimal automaton of

S

.[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

L

is regular if and only if the family of quotients

\{m\setminusL\vertm\inM\}

is finite, or equivalently, the left syntactic equivalence

{}S{\sim}

has finite index (meaning it partitions

M

into finitely many equivalence classes).

This theorem was first proved by Anil Nerode and the relation

{}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

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\setminusL=y\setminusL

. Thus, the number of elements in

\{m\setminusL\vertm\inM\}

is at most equal to the number of states of the automaton and

\{m\setminusL\vertm\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\vertm\inM\}

is finite. One can then construct an automaton where

Q=\{m\setminusL\vertm\inM\}

is the set of states,

F=\{m\setminusL\vertm\inL\}

is the set of final states, the language

L

is the initial state, and the transition function is given by

\deltay\colonx\setminusL\toy\setminus(x\setminusL)=(xy)\setminusL

. Clearly, this automaton recognizes

L

.

Thus, a language

L

is recognizable if and only if the set

\{m\setminusL\vertm\inM\}

is finite. Note that this proof also builds the minimal automaton.

Examples

L

be the language over

A=\{a,b\}

of words of even length. The syntactic congruence has two classes,

L

itself and

L1

, the words of odd length. The syntactic monoid is the group of order 2 on

\{L,L1\}

.[6]

(ab+ba)*

, the minimal automaton has 4 states and the syntactic monoid has 15 elements.[7]

A

(where

\left|A\right|>1

) is the syntactic monoid of the language

\{wwR\midw\inA*\}

, where

wR

is the reversal of the word

w

. (For

\left|A\right|=1

, one can use the language of square powers of the letter.)

\{a,b\}

in which the number of occurrences of

a

and

b

are congruent modulo

2n

is a group language with syntactic monoid

Z/2nZ

.[5]

References

Notes and References

  1. Holcombe (1982) p.160
  2. Lawson (2004) p.210
  3. Lawson (2004) p.232
  4. Straubing (1994) p.55
  5. Sakarovitch (2009) p.342
  6. Straubing (1994) p.54
  7. Lawson (2004) pp.211-212
  8. 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 .
  9. Lawson (2004) p.233
  10. 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 .
  11. Straubing (1994) p.60