Hellis Tamm Institute of Cybernetics, Tallinn. Theory Seminar, April 21, Joint work with Janusz Brzozowski, accepted to DLT 2011

Similar documents
CS 154, Lecture 2: Finite Automata, Closure Properties Nondeterminism,

Deterministic Finite Automata. Non deterministic finite automata. Non-Deterministic Finite Automata (NFA) Non-Deterministic Finite Automata (NFA)

Parsing Regular Expressions and Regular Grammars

THE DISTINGUISHABILITY OPERATION ON REGULAR LANGUAGES

Inf2A: Converting from NFAs to DFAs and Closure Properties

CMPSCI 250: Introduction to Computation. Lecture #22: From λ-nfa s to NFA s to DFA s David Mix Barrington 22 April 2013

Automata and Formal Languages - CM0081 Non-Deterministic Finite Automata

Nondeterministic Finite Automata

COM364 Automata Theory Lecture Note 2 - Nondeterminism

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

Equivalence of DFAs and NFAs

Languages. Non deterministic finite automata with ε transitions. First there was the DFA. Finite Automata. Non-Deterministic Finite Automata (NFA)

Closure under the Regular Operations

Finite Automata. BİL405 - Automata Theory and Formal Languages 1

T (s, xa) = T (T (s, x), a). The language recognized by M, denoted L(M), is the set of strings accepted by M. That is,

Constructions on Finite Automata

Constructions on Finite Automata

Theory of Computation (I) Yijia Chen Fudan University

Regular Expressions. Definitions Equivalence to Finite Automata

Introduction to the Theory of Computation. Automata 1VO + 1PS. Lecturer: Dr. Ana Sokolova.

CS 154. Finite Automata, Nondeterminism, Regular Expressions

Introduction to the Theory of Computation. Automata 1VO + 1PS. Lecturer: Dr. Ana Sokolova.

Lecture 3: Nondeterministic Finite Automata

CS 208: Automata Theory and Logic

C2.1 Regular Grammars

CS 455/555: Finite automata

C2.1 Regular Grammars

Sri vidya college of engineering and technology

On Properties and State Complexity of Deterministic State-Partition Automata

Automata and Formal Languages - CM0081 Finite Automata and Regular Expressions

Finite Universes. L is a fixed-length language if it has length n for some

Finite Automata. Seungjin Choi

UNIT-II. NONDETERMINISTIC FINITE AUTOMATA WITH ε TRANSITIONS: SIGNIFICANCE. Use of ε-transitions. s t a r t. ε r. e g u l a r

Nondeterministic Finite Automata

On Minimality and Size Reduction of One-Tape and Multitape Finite Automata. Hellis Tamm

Operations on Unambiguous Finite Automata

CS 530: Theory of Computation Based on Sipser (second edition): Notes on regular languages(version 1.1)

Theory of Computation 4 Non-Deterministic Finite Automata

Intro to Theory of Computation

Classes and conversions

NFA and regex. the Boolean algebra of languages. regular expressions. Informatics 1 School of Informatics, University of Edinburgh

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

Simplification of finite automata

Nondeterministic Finite Automata. Nondeterminism Subset Construction

Chapter 2: Finite Automata

A Characterisation of NL/poly via Nondeterministic Finite Automata.

Chapter 6: NFA Applications

Automata and Languages

Decision, Computation and Language

Chapter Five: Nondeterministic Finite Automata

Uses of finite automata

Algorithms for Computing Complete Deterministic Fuzzy Automata via Invariant Fuzzy Quasi-Orders

Harvard CS 121 and CSCI E-207 Lecture 4: NFAs vs. DFAs, Closure Properties

State Complexity of Two Combined Operations: Catenation-Union and Catenation-Intersection

Descriptional Complexity of Formal Systems (Draft) Deadline for submissions: April 14, 2009 Final versions: June 15, 2009

HKN CS/ECE 374 Midterm 1 Review. Nathan Bleier and Mahir Morshed

INF Introduction and Regular Languages. Daniel Lupp. 18th January University of Oslo. Department of Informatics. Universitetet i Oslo

Nondeterministic Finite Automata

Finite Automata and Languages

Recitation 2 - Non Deterministic Finite Automata (NFA) and Regular OctoberExpressions

NOTES ON AUTOMATA. Date: April 29,

CMSC 330: Organization of Programming Languages. Theory of Regular Expressions Finite Automata

Aperiodic languages and generalizations

CSE 105 Theory of Computation Professor Jeanne Ferrante

Obtaining the syntactic monoid via duality

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

Theory of Computation (II) Yijia Chen Fudan University

Pushdown automata. Twan van Laarhoven. Institute for Computing and Information Sciences Intelligent Systems Radboud University Nijmegen

Chapter 5. Finite Automata

CS243, Logic and Computation Nondeterministic finite automata

Extended transition function of a DFA

Deterministic Finite Automaton (DFA)

Distinguishability Operations and Closures

Finite Automata and Regular languages

3515ICT: Theory of Computation. Regular languages

Automata Theory. Lecture on Discussion Course of CS120. Runzhe SJTU ACM CLASS

CSC236 Week 11. Larry Zhang

Theoretical Computer Science. State complexity of basic operations on suffix-free regular languages

CS 154, Lecture 3: DFA NFA, Regular Expressions

Outline. Theorem 1. For every regular expression E, there exists an ε-nfa A such that L(E)=L(A).

Lecture Notes On THEORY OF COMPUTATION MODULE -1 UNIT - 2

Finite Automata. Mahesh Viswanathan

Theory of Computation

Course 4 Finite Automata/Finite State Machines

Finite Automata and Regular Languages

Reversal of Regular Languages and State Complexity

Foundations of Informatics: a Bridging Course

CSE 105 THEORY OF COMPUTATION

Theory of Languages and Automata

CS 301. Lecture 18 Decidable languages. Stephen Checkoway. April 2, 2018

Definition of Büchi Automata

Automata: a short introduction

Name: Student ID: Instructions:

Finite Automata Part Two

Takeaway Notes: Finite State Automata

Chap. 1.2 NonDeterministic Finite Automata (NFA)

Fooling Sets and. Lecture 5

September 7, Formal Definition of a Nondeterministic Finite Automaton

Nondeterminism. September 7, Nondeterminism

Computer Sciences Department

Transcription:

Theory of Átomata Hellis Tamm Institute of Cybernetics, Tallinn Theory Seminar, April 21, 2011 Joint work with Janusz Brzozowski, accepted to DLT 2011 This work was supported by the Natural Sciences and Engineering Research Council of Canada under grant No. OGP0000871, by the Estonian Center of Excellence in Computer Science, EXCS, financed by the European Regional Development Fund, and by the Estonian Science Foundation grant 7520. 1

Introduction Nondeterministic finite automata (NFAs), introduced by Rabin and Scott in 1959, play a major role in the theory of automata and regular languages. For many purposes it is necessary to convert an NFA to a deterministic finite automaton (DFA). In particular, for every regular language there exists a unique minimal DFA. As well, it is possible to associate an NFA with each regular language (universal automaton, canonical residual automaton). 2

Our results We define a unique NFA an átomaton for every regular language. It has non-empty intersections of complemented and uncomplemented quotients the atoms of the language as its states. We introduce atomic NFAs, in which the right language of any state is a union of some atoms. This is a generalization of residual NFAs in which the right language of any state is a left quotient (which we prove to be a union of atoms), and includes also átomata (where the right language of any state is an atom), trim DFAs, and the trim parts of universal automata. 3

Main result We characterize the class of NFAs for which the subset construction yields a minimal DFA. More specifically, we show that the subset construction applied to a trim NFA produces a minimal DFA if and only if the reverse automaton of that NFA is atomic. This generalizes Brzozowski s method for DFA minimization by double reversal. 4

Automata and languages An NFA is a quintuple N = (Q,Σ,δ,I,F), where Q is a finite, non-empty set of states, Σ is a finite non-empty alphabet, δ : Q Σ 2 Q is the transition function, I Q is the set of initial states, and F Q is the set of final states. The language accepted by an NFA N is L(N) = {w Σ δ(i,w) F }. Two NFA s are equivalent if they accept the same language. The left and right language of a state q of N are L I,q (N) = {w Σ q δ(i,w)}, and L q,f (N) = {w Σ δ(q,w) F }. A DFA is a quintuple D = (Q,Σ,δ,q 0,F), with the transition function δ : Q Σ Q, and the initial state q 0. 5

Quotients and the quotient DFA The left quotient of a language L by a word w is the language w 1 L = {x Σ wx L}. The quotient DFA of a regular language L is D = (Q,Σ,δ,q 0,F), where Q = {w 1 L w Σ }, δ(w 1 L,a) = a 1 (w 1 L), q 0 = ε 1 L = L, and F = {w 1 L ε w 1 L}. Evidently, for an NFA N, a state q of N, and x L I,q (N), L q,f (N) x 1 (L(N)). If D is a DFA and x L q0,q(d), then L q,f (D) = x 1 (L(D)). 6

Nondeterministic system of equations For any language L let L ε = if ε L and L ε = {ε} otherwise. A nondeterministic system of equations (NSE) with n variables L 1,...,L n is a set of language equations L i = a Σ a( j J i,a L j ) L ε i i = 1,...,n, (1) together with an initial set of variables {L i i I}, where I,J i,a {1,...,n}. The language defined by an NSE is L = i I L i. Each NSE defines a unique NFA N and vice versa. States of N correspond to the variables L i, there is a transition L i a Lj in N if and only if j J i,a, the set of initial states of N is {L i i I}, and the set of final states is {L i L ε i = {ε}}. 7

Deterministic system of equations A deterministic system of equations (DSE) is an NSE L i = a ΣaL ia L ε i i = 1,...,n, (2) where i a {1,...,n}, I = {1}, and the empty language is retained if it appears. Each DSE defines a unique DFA D and vice versa. States of D correspond to the variables L i, there is a transition L i a Lj in D if and only if i a = j, the initial state of D is L 1, and the set of final states is {L i L ε i = {ε}}. If D is minimal, its DSE constitutes its quotient equations where every L i is a quotient of the initial language L 1. 8

Atoms Let L 1 = L,L 2,...,L n be the quotients of a regular language L. An atom of L is any non-empty language of the form A = L 1 L 2 L n, where L i is either L i or L i, and at least one of the L i is not complemented (L 1 L 2 L n is not an atom). A language has at most 2 n 1 atoms. An atom is initial if it has L 1 (rather than L 1 ) as a term. An atom is final if and only if it contains ε. There is exactly one final atom, the atom L 1 L 1 L n, where L i = L i if ε L i, L i = L i otherwise. 9

Some properties of atoms Let A 1,...,A m be the atoms of L. The following properties hold for atoms: Atoms are pairwise disjoint, that is, A i A j = for all i,j {1,...,m}, i j. The quotient w 1 L of L by w Σ is a (possibly empty) union of atoms. The quotient w 1 A i of A i by w Σ is a (possibly empty) union of atoms. 10

Átomaton We use a one-to-one correspondence A i A i between atoms A i of a language L and the states A i of the NFA A defined below. Let L = L 1 Σ be any regular language with the set of atoms Q = {A 1,...,A m }, initial set of atoms I Q, and final atom A m. The átomaton of L is the NFA A = (Q,Σ,δ,I,{A m }), where Q = {A i A i Q}, I = {A i A i I}, and A j δ(a i,a) if and only if aa j A i, for all A i,a j Q. 11

Example Let L be defined by the following quotient equations: L 1 = al 2 bl 1, L 2 = al 3 bl 1 ε, L 3 = al 3 bl 2. We find the atoms using the quotient equations: L 1 L 2 L 3 = (al 2 bl 1 ) (al 3 bl 1 ε) (al 3 bl 2 ) = (al 2 al 3 al 3 ) (bl 1 bl 1 bl 2 ) = a(l 2 L 3 ) b(l 1 L 2 ) = a[(l 1 L 2 L 3 ) (L 1 L 2 L 3 )] b[(l 1 L 2 L 3 ) (L 1 L 2 L 3 )],etc. We denote L i L j by L ij, L i L j by L ij, etc. 12

Example Noting that L 123 is empty, we have the atom equations on the right: L 1 = al 2 bl 1, L 123 = a(l 123 L 123 ) b(l 123 L 123 ), L 2 = al 3 bl 1 ε, L 123 = al 123, L 3 = al 3 bl 2. L 123 = bl 123, L 123 = b(l 123 L 123 ), L 123 = a(l 123 L 123 ), L 123 = ε. 13

Example b 1 a b 2 (a) a b a 3 a,b L 123 a L 123 1 2 3 b b L 123 L 123 a a 4 a 5 6 b L 123 L 123 b (b) Figure 1: (a) quotient DFA; (b) átomaton 14

Some properties of átomaton Let A 1,...,A m be the atoms and let A be the átomaton of L. The right language of state A i of A is the atom A i, that is, L Ai,{A m }(A) = A i, for all i {1,...,m}. The language accepted by A is L, that is, L(A) = L. The reverse automaton A R of A is a minimal (incomplete) DFA for the reverse language of L. A is isomorphic to the minimal incomplete DFA of L if and only if L is bideterministic. 15

Atomic automata We define an NFA N = (Q,Σ,δ,I,F) to be atomic if for every state q Q, the right language L q,f (N) of q is a union of some atoms of L(N). We call an NFA N residual, if L q,f (N) is a (left) quotient of L(N) for every q Q. Since every quotient is a union of atoms, every residual NFA is atomic. Every trim DFA is a special case of a residual NFA; hence every trim DFA is atomic. Naturally, the átomaton A is atomic since the right language of every state of A is an atom of L. Also, it can be shown that the trim part of the universal automaton is atomic. 16

Extension of Brzozowski s Theorem Theorem (Brzozowski, 1963). For a trim NFA N, N D is minimal if N R is deterministic. This theorem forms the basis for Brzozowski s DFA minimization algorithm: Given any DFA D, 1) reverse it to get D R, 2) determinize D R to get D RD, 3) reverse D RD to get D RDR, 4) determinize D RDR to get D RDRD. Our generalization: Theorem. For a trim NFA N, N D is minimal if and only if N R is atomic. 17

Conclusions We have introduced a natural set of languages the atoms that are defined by every regular language. We defined a unique NFA for every regular language, the átomaton, and related it to other known concepts. We introduced atomic NFAs, and showed that some known subclasses of NFAs belong to this class. We characterized the class of trim NFAs for which the subset construction yields a minimal DFA. 18