Algebraic Approach to Automata Theory

Similar documents
Obtaining the syntactic monoid via duality

Aperiodic languages p. 1/34. Aperiodic languages. Verimag, Grenoble

Regular Expressions Kleene s Theorem Equation-based alternate construction. Regular Expressions. Deepak D Souza

2. Syntactic Congruences and Monoids

Duality and Automata Theory

Closure under the Regular Operations

Algebra Meets Logic: The Case of Regular Languages (With Applications to Circuit Complexity) Denis Thérien, McGill University p.

Languages, logics and automata

Duality in Logic. Duality in Logic. Lecture 2. Mai Gehrke. Université Paris 7 and CNRS. {ε} A ((ab) (ba) ) (ab) + (ba) +

CS 121, Section 2. Week of September 16, 2013

Definition of Büchi Automata

CS 133 : Automata Theory and Computability

The theory of regular cost functions.

September 7, Formal Definition of a Nondeterministic Finite Automaton

F. Blanchet-Sadri and F.D. Gaddis, "On a Product of Finite Monoids." Semigroup Forum, Vol. 57, 1998, pp DOI: 10.

Aperiodic languages and generalizations

Regular Expressions Kleene s Theorem Equation-based alternate construction. Regular Expressions. Deepak D Souza

SEPARATING REGULAR LANGUAGES WITH FIRST-ORDER LOGIC

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

Büchi Automata and their closure properties. - Ajith S and Ankit Kumar

SYNTACTIC SEMIGROUP PROBLEM FOR THE SEMIGROUP REDUCTS OF AFFINE NEAR-SEMIRINGS OVER BRANDT SEMIGROUPS

Theory of Computation (I) Yijia Chen Fudan University

CS 154. Finite Automata, Nondeterminism, Regular Expressions

NOTES ON AUTOMATA. Date: April 29,

Notes on Monoids and Automata

Non Deterministic Recognizability of Fuzzy Languages

Polynomial closure and unambiguous product

Languages and monoids with disjunctive identity

Warshall s algorithm

Finite Automata and Regular Languages

September 11, Second Part of Regular Expressions Equivalence with Finite Aut

First-order definability of rational transductions: An algebraic approach

L is finite or cofinite}, A + k+1 = { L A + L is a boolean combination of languages of the form L 1 L n (n 1) with L 1, L n A +

A SURVEY ON DIFFERENCE HIERARCHIES OF REGULAR LANGUAGES

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

Languages. A language is a set of strings. String: A sequence of letters. Examples: cat, dog, house, Defined over an alphabet:

Introduction to Turing Machines

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

CSE 135: Introduction to Theory of Computation Nondeterministic Finite Automata (cont )

Nondeterministic Finite Automata

On the use of guards for logics with data

Closure under the Regular Operations

Deterministic PDA s. Deepak D Souza. 21 October Department of Computer Science and Automation Indian Institute of Science, Bangalore.

Finite State Automata

Some results on the generalized star-height problem

Chapter 5. Finite Automata

Theory of Computation (II) Yijia Chen Fudan University

Green s Relations and their Use in Automata Theory

One-relation languages and ω-code generators

Lecture 3: Nondeterministic Finite Automata

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

Valence automata over E-unitary inverse semigroups

Overlapping tile automata:

Formal Definition of a Finite Automaton. August 26, 2013

The bideterministic concatenation product

More on Finite Automata and Regular Languages. (NTU EE) Regular Languages Fall / 41

Mergible States in Large NFA

On the use of guards for logics with data

Learning Context Free Grammars with the Syntactic Concept Lattice

Theory of Computation

CS 154, Lecture 3: DFA NFA, Regular Expressions

Aperiodic String Transducers

Typed Monoids An Eilenberg-like Theorem for non regular Languages

Finite Automata. Seungjin Choi

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

Profinite methods in automata theory

Deterministic PDA s. Deepak D Souza. 08 Nov Department of Computer Science and Automation Indian Institute of Science, Bangalore.

Automata: a short introduction

Equivalence of DFAs and NFAs

On Strong Alt-Induced Codes

Formal Languages and Automata

Prime Languages, Orna Kupferman, Jonathan Mosheiff. School of Engineering and Computer Science The Hebrew University, Jerusalem, Israel

Chomsky Normal Form for Context-Free Gramars

Constructive Formalization of Regular Languages

Profinite methods in automata theory

Intro to Theory of Computation

On closures of lexicographic star-free languages. E. Ochmański and K. Stawikowska

STAR-FREE GEODESIC LANGUAGES FOR GROUPS

The wreath product principle for ordered semigroups

Theory of Computation

Lecture 2: Regular Expression

Automata and Formal Languages - CM0081 Non-Deterministic Finite Automata

1 Functions, relations, and infinite cardinality

Machines, Models, Monoids, and Modal logic

The Online Space Complexity of Probabilistic Languages

3515ICT: Theory of Computation. Regular languages

1. (a) Explain the procedure to convert Context Free Grammar to Push Down Automata.

Lecture 17: Language Recognition

CpSc 421 Homework 1 Solutions

Context Free Languages. Automata Theory and Formal Grammars: Lecture 6. Languages That Are Not Regular. Non-Regular Languages

1 Functions, relations, and infinite cardinality

Semigroup invariants of symbolic dynamical systems

CONCATENATION AND KLEENE STAR ON DETERMINISTIC FINITE AUTOMATA

Chapter Five: Nondeterministic Finite Automata

ON LOGICAL HIERARCHIES WITHIN FO 2 -DEFINABLE LANGUAGES

CSCI 2670 Introduction to Theory of Computing

Characterizing Families of Tree Languages by Syntactic Monoids. Szeged 2006

Nondeterminism. September 7, Nondeterminism

Finite Automata. Theorems - Unit I SUSAN ELIAS. Professor Department of Computer Science & Engineering Sri Venkateswara College of Engineering

Tree languages defined in first-order logic with one quantifier alternation

Transcription:

Algebraic Approach to Automata Theory Deepak D Souza Department of Computer Science and Automation Indian Institute of Science, Bangalore. 20 September 2016

Outline 1 Overview 2 Recognition via monoid morphisms 3 Transition monoid 4 Syntactic Monoid 5 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.

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

Monoid morphisms A morphism from a monoid (M, M, 1 M ) to a monoid (N, N, 1 N ) is a map ϕ : M N, satisfying ϕ(1 M ) = 1 N, and, ϕ(m M m ) = ϕ(m) N ϕ(m ). Example: ϕ : A N, given by ϕ(w) = w is a morphism from (A,, ɛ) to (N, +, 0).

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.

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 ɛ 1 w m for w A +. Then M recognizes A + (also {ɛ}, A, and ), since ϕ 1 ({m}) = A +.

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 ɛ 1 w m for w A +. Then M recognizes A + (also {ɛ}, A, and ), since ϕ 1 ({m}) = A +. Question: Is every language recognizable?

Transition Monoid of a DA Let A = (Q, s, δ, F ) be a deterministic automaton (DA). For w A, define f w : Q Q by f w (q) = δ(q, w). Consider the monoid M(A) = ({f w w A },, 1). M(A) is called the transition monoid of A.

Example DA and Transition Monoid a 1 b b a 2 3 a, b Distinct elements of M(A) are {f ɛ, f a, f b, f aa, f ab, f ba }. ( ) 1 2 3 We write f a as, or simply (2 3 3). 2 3 3 Question: If Q is finite, how many elements can M(A) have?

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). Define an equivalence relation = L on A, induced by L, as u = L v iff x, y A : xuy L iff xvy L.

Syntactic Congruence of a language = 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 and v = L v imples uv = L u v. = L refines the canonical MN relation, L, for L. Example?

Syntactic Congruence of a language = 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 and v = L v imples uv = L u v. = 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

Characterization of the syntactic monoid Claim For a canonical DA A = (Q, s, δ, F ), f u = f v iff u = L v.

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 and identity element is [ɛ]. Claim [u] [v] = [uv], The monoids M(L) and A / = L are isomorphic. (Use the morphism f w [w].)

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:

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

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 f w.

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 f w. (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).

Canonicity of syntactic monoid/congruence Let M and N be monoids. We say N divides M if there is a submonoid M of M, and a surjective morphism from M to N. M M N 1 1 Theorem Let L A. Then L is recognized by a monoid M iff M(L) divides M.

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

A periodic monoid. An aperiodic monoid. Definitions: Aperiodic Monoids A finite monoid is called aperiodic, if it does not contain a non-trival group, or equivalently, for each element m in the monoid, m n = m n+1, for some n > 0. m 3 m 4 m 3 m 4 m m 2 m 6 m 5 m m 2 Examples: Periodic Aperiodic 1 m 1 1 m m m 1 1 m 1 1 m m m m

Definitions: Counter in a DFA A counter in a DFA A = (Q, s, δ, F ) is a string u A and distinct states q 0, q 1,..., q k in Q, with k 1, such that for each i, δ(q i, u) = q i+1, and δ(q k, u) = q 0. q 0 u q 1 u q 2 u u q q 3 4 u A DFA is counter-free if it does not have any counters. a 1 2 b b a b e a a b o

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.

Illustrative example: L = (ab) FO(<) sentence for L: x ( zero(x) = Q a (x) (Q a (x) = y(succ(x, y) Q b (y))) (Q b (x) last(x) = y(succ(x, y) Q a (y)))) ) Counter-Free DFA for L: a 1 b b a 2 3 a, b Star-Free ERE: {ɛ} (aa A b A (aa + bb)a ). Note that A is short-hand for (what about {ɛ}?).