0% found this document useful (0 votes)
64 views27 pages

Algebraic Approach To Automata Theory: Deepak D'Souza

This document provides an overview of the algebraic approach to automata theory, specifically regarding language recognition via monoid morphisms. It defines monoids and monoid morphisms, and explains how a language is recognizable if there exists a monoid and morphism such that the language is the inverse image of a subset of the monoid. It also discusses transition monoids, syntactic monoids, syntactic congruences, and how the syntactic monoid characterizes the canonical automaton for a language.

Uploaded by

deepakk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views27 pages

Algebraic Approach To Automata Theory: Deepak D'Souza

This document provides an overview of the algebraic approach to automata theory, specifically regarding language recognition via monoid morphisms. It defines monoids and monoid morphisms, and explains how a language is recognizable if there exists a monoid and morphism such that the language is the inverse image of a subset of the monoid. It also discusses transition monoids, syntactic monoids, syntactic congruences, and how the syntactic monoid characterizes the canonical automaton for a language.

Uploaded by

deepakk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

Overview Recognition via monoid morphisms Transition monoid Syntactic Monoid First-Order Definable Languages

Algebraic Approach to Automata Theory

Deepak D’Souza

Department of Computer Science and Automation


Indian Institute of Science, Bangalore.

11 September 2018
Overview Recognition via monoid morphisms Transition monoid Syntactic Monoid First-Order Definable Languages

Outline

1 Overview

2 Recognition via monoid morphisms

3 Transition monoid

4 Syntactic Monoid

5 First-Order Definable Languages


Overview Recognition via monoid morphisms Transition monoid Syntactic Monoid First-Order Definable Languages

Algebraic approach to automata: Overview

Defines language recognition via morphisms into a monoid.


Analogous result to canonical automaton in the setting of
monoids.
Helps in characterising class of FO-definable languages.
Overview Recognition via monoid morphisms Transition monoid Syntactic Monoid First-Order Definable Languages

Monoids

A monoid is a structure (M, ◦, 1), where


M is a base set containing the element “1”,
◦ is an associative binary operation on M, and
1 is the identity element with respect to ◦.
Examples of monoids: (N, +, 0), (A∗ , ·, ).
Another Example: (X → X , ◦, id), where
X → X denotes the set of all functions from a set X to itself,
f ◦ g is function composition:

(f ◦ g )(x) = g (f (x)).
Overview Recognition via monoid morphisms Transition monoid Syntactic Monoid First-Order Definable Languages

Monoid morphisms

A morphism from a monoid (M, ◦M , 1M ) to a monoid


(N, ◦N , 1N ) is a map ϕ : M → N, satisfying
ϕ(1M ) = 1N , and,
ϕ(m ◦M m0 ) = ϕ(m) ◦N ϕ(m0 ).
Example: ϕ : A∗ → N, given by

ϕ(w ) = |w |

is a morphism from (A∗ , ·, ) to (N, +, 0).


Overview Recognition via monoid morphisms Transition monoid Syntactic Monoid First-Order Definable Languages

Language recognition via monoid morphisms

A language L ⊆ A∗ is said to be recognizable if there exists a


monoid (M, ◦, 1) and a morphism ϕ from (A∗ , ·, ) to
(M, ◦, 1), and a subset X of M such that

L = ϕ−1 (X ).

In this case, we say that the monoid M recognizes L.


Overview Recognition via monoid morphisms Transition monoid Syntactic Monoid First-Order Definable Languages

Example of language recognition via monoid


Consider monoid M = ({1, m}, ◦, 1} where ◦ is given by:

◦ 1 m
1 1 m
m m m

Consider the morphism ϕ : A∗ → M given by

 7→ 1
w 7→ m for w ∈ A+ .

Then M recognizes A+ , since ϕ−1 ({m}) = A+ .


M also recognizes {} (taking X = {1}), A∗ (taking X = {1, m}),
and ∅ (taking X = {}).
Overview Recognition via monoid morphisms Transition monoid Syntactic Monoid First-Order Definable Languages

Example of language recognition via monoid


Consider monoid M = ({1, m}, ◦, 1} where ◦ is given by:

◦ 1 m
1 1 m
m m m

Consider the morphism ϕ : A∗ → M given by

 7→ 1
w 7→ m for w ∈ A+ .

Then M recognizes A+ , since ϕ−1 ({m}) = A+ .


M also recognizes {} (taking X = {1}), A∗ (taking X = {1, m}),
and ∅ (taking X = {}).

Question: Is every language recognizable?


Overview Recognition via monoid morphisms Transition monoid Syntactic Monoid First-Order Definable Languages

Exercise

Show that the language of odd a’s over the alpbabet A = {a, b} is
recognizable.
Overview Recognition via monoid morphisms Transition monoid Syntactic Monoid First-Order Definable Languages

Transition Monoid of a DA

Let A = (Q, s, δ, F ) be a deterministic automaton (DA).


For w ∈ A∗ , define fw : Q → Q by

fw (q) = δ(q,
b w ).

Consider the monoid

M(A) = ({fw | w ∈ A∗ }, ◦, 1).

M(A) is called the transition monoid of A.


Overview Recognition via monoid morphisms Transition monoid Syntactic Monoid First-Order Definable Languages

Example DA and Transition Monoid

1 2
b
b a

3 a, b

Distinct elements of M(A) are {f , fa , fb , faa , fab , fba }.


 
1 2 3
We write fa as , or simply (2 3 3).
2 3 3
Question: If Q is finite, how many elements can M(A) have?
Overview Recognition via monoid morphisms Transition monoid Syntactic Monoid First-Order Definable Languages

Syntactic Monoid of a language

Let A≡L = (Q, s, δ, F ) be the canonical automaton for a


language L ⊆ A∗ .
The transition monoid of A≡L is called the syntactic monoid
of L.
We denote the syntactic monoid of L by M(L).
Overview Recognition via monoid morphisms Transition monoid Syntactic Monoid First-Order Definable Languages

Syntactic Congruence of a language


Define an equivalence relation ∼=L on A∗ , induced by L, as
u∼=L v iff ∀x, y ∈ A∗ : xuy ∈ L iff xvy ∈ L.

=L is called the syntactic congruence of L.
Check that ∼=L is a two-sided congruence:
That is, ∼
=L is both a left-congruence (i.e u ∼=L v implies
wu ∼
=L wv , for each w ∈ A ∗
) and a right-congruence (i.e
u∼
=L v implies uw ∼ =L vw ).
Equivalently, u ∼
=L u 0 and v ∼=L v 0 imples uv ∼
=L u 0 v 0 .

=L refines the canonical MN relation, ≡L , for L.
Example?
Overview Recognition via monoid morphisms Transition monoid Syntactic Monoid First-Order Definable Languages

Syntactic Congruence of a language


Define an equivalence relation ∼=L on A∗ , induced by L, as
u∼=L v iff ∀x, y ∈ A∗ : xuy ∈ L iff xvy ∈ L.

=L is called the syntactic congruence of L.
Check that ∼=L is a two-sided congruence:
That is, ∼
=L is both a left-congruence (i.e u ∼=L v implies
wu ∼
=L wv , for each w ∈ A ∗
) and a right-congruence (i.e
u∼
=L v implies uw ∼ =L vw ).
Equivalently, u ∼
=L u 0 and v ∼=L v 0 imples uv ∼
=L u 0 v 0 .

=L refines the canonical MN relation, ≡L , for L.
Example? Consider the language (a + b)∗ bb:
 b

(a + b)∗ a (a + b)∗ ab

(a + b)∗ bb
Overview Recognition via monoid morphisms Transition monoid Syntactic Monoid First-Order Definable Languages

Characterization of the syntactic monoid

Claim
For a canonical DA A = (Q, s, δ, F ),

fu = fv iff u ∼
=L v .

Proof:
By definition the element fu of the transition monoid of the
canonical DA is δ(b , u).
xuy ∈ L iff (fx ◦ fu ◦ fy )(s) ∈ F (in other words, δ(s,
b xuy ) ∈ F ) in
the canonical DA iff (fx ◦ fv ◦ fy )(s) ∈ F in the canonical DA iff
xvy ∈ L
Thus the syntactic congruence u ∼ =L v matches the equality
fu = fv derived from the canonical DA.
Overview Recognition via monoid morphisms Transition monoid Syntactic Monoid First-Order Definable Languages

Syntactic monoid via syntactic congruence

For a language L ⊆ A∗ , consider the monoid A∗ / ∼=L , whose


elements are equivalence classes under ∼
=L , operation ◦ is given by

[u] ◦ [v ] = [uv ],

and identity element is [].

Claim
The monoids M(L) and A∗ / ∼
=L are isomorphic.

(Use the morphism fw 7→ [w ].)


Overview Recognition via monoid morphisms Transition monoid Syntactic Monoid First-Order Definable Languages

Algebraic definition of regular languages

Theorem
Let L ⊆ A∗ . Then the following are equivalent:
1 L is regular
2 The syntactic monoid of L, i.e. M(L), is finite.
3 L is recognized by a finite monoid.

Proof:
Overview Recognition via monoid morphisms Transition monoid Syntactic Monoid First-Order Definable Languages

Algebraic definition of regular languages

Theorem
Let L ⊆ A∗ . Then the following are equivalent:
1 L is regular
2 The syntactic monoid of L, i.e. M(L), is finite.
3 L is recognized by a finite monoid.

Proof:
(1) =⇒ (2): since A≡L is finite, and hence so is M(L).
Overview Recognition via monoid morphisms Transition monoid Syntactic Monoid First-Order Definable Languages

Algebraic definition of regular languages

Theorem
Let L ⊆ A∗ . Then the following are equivalent:
1 L is regular
2 The syntactic monoid of L, i.e. M(L), is finite.
3 L is recognized by a finite monoid.

Proof:
(1) =⇒ (2): since A≡L is finite, and hence so is M(L).
(2) =⇒ (3): Define morphism ϕ : A∗ → M(L), given by w 7→ fw .
Overview Recognition via monoid morphisms Transition monoid Syntactic Monoid First-Order Definable Languages

Algebraic definition of regular languages

Theorem
Let L ⊆ A∗ . Then the following are equivalent:
1 L is regular
2 The syntactic monoid of L, i.e. M(L), is finite.
3 L is recognized by a finite monoid.

Proof:
(1) =⇒ (2): since A≡L is finite, and hence so is M(L).
(2) =⇒ (3): Define morphism ϕ : A∗ → M(L), given by w 7→ fw .
(3) =⇒ (1): Let L be recognized by a finite monoid (M, ◦, 1), via
a morphism ϕ and X ⊆ M. Define a DFA A = (M, 1, δ, X ), where

δ(m, a) = m ◦ ϕ(a).
Overview Recognition via monoid morphisms Transition monoid Syntactic Monoid First-Order Definable Languages

Canonicity of syntactic monoid/congruence

Let M and N be monoids. We say N divides M if there is a


submonoid M 0 of M, and a surjective morphism from M 0 to N.
M

M0
N

1 1

Theorem
Let L ⊆ A∗ . Then L is recognized by a monoid M iff M(L) divides
M.
Overview Recognition via monoid morphisms Transition monoid Syntactic Monoid First-Order Definable Languages

First-Order definable languages

Theorem (Schutzenberger (1965), McNaughton-Papert (1971))


Let L ⊆ A∗ . Then the following are equivalent
1 L is definable in FO(<).
2 L is accepted by a counter-free DFA.
3 A≡L is a counter-free DFA.
4 L is definable by a star-free extended regular expression.
5 L is recognized by an aperiodic finite monoid.
6 M(L) is aperiodic.
Overview Recognition via monoid morphisms Transition monoid Syntactic Monoid First-Order Definable Languages

FO-definable languages

DFA MSO
McNaughton, Paper 1971

CF FO Kamp1968

LTL

Fin Monoid ERE

Schutzenberger 1965

AP SF
Overview Recognition via monoid morphisms Transition monoid Syntactic Monoid First-Order Definable Languages

Definitions: Aperiodic Monoids


A finite monoid is called aperiodic, if it does not contain a
non-trivial group, or equivalently, for each element m in the
monoid, mn = mn+1 , for some n > 0.
m3 m4 m3 m4

m2 m2
m m5 m
m6

Periodic Aperiodic

Examples:

◦ 1 m ◦ 1 m
1 1 m 1 1 m
m m 1 m m m

A periodic monoid. An aperiodic monoid.


Overview Recognition via monoid morphisms Transition monoid Syntactic Monoid First-Order Definable Languages

Definitions: Counter in a DFA


A counter in a DFA A = (Q, s, δ, F ) is a string u ∈ A∗ and
distinct states q0 , q1 , . . . , qk in Q, with k ≥ 1, such that for
each i, δ(q
b i , u) = qi+1 , and δ(q b k , u) = q0 .
q1
u
u

q2

q0

u
u

q3
q4
u

A DFA is counter-free if it does not have any counters.


a

b b
a
1 2
b
b a e o
a
Overview Recognition via monoid morphisms Transition monoid Syntactic Monoid First-Order Definable Languages

Definitions: Star-Free Regular Expressions

A star-free regular expression is an extended regular expression


obtained using the syntax:

s ::= ∅ | a | s + s | s · s | s ∩ s | s,

where a ∈ A, and s denotes the language A∗ − L(s).


A language L ⊆ A∗ is called star-free if there is a star-free
regular expression defining it.
For example the language A∗ is star-free since the star-free
expression ∅ denotes it.
Overview Recognition via monoid morphisms Transition monoid Syntactic Monoid First-Order Definable Languages

Illustrative example: L = (ab)∗


FO(<) sentence for L:
∀x ( zero(x) =⇒ Qa (x) ∧
(Qa (x) =⇒ ∃y (succ(x, y ) ∧ Qb (y ))) ∧
(Qb (x) ∧ ¬last(x) =⇒ ∃y (succ(x, y ) ∧ Qa (y ))))
)
Counter-Free DFA for L:
a

1 2
b
b a

3 a, b

Star-Free ERE:
{} ∪ (aA∗ ∩ A∗ b ∩ A∗ (aa + bb)A∗ ).
Note that A∗ is short-hand for ∅ (what about {}?).

You might also like