Magic Numbers and Subset Construction Samik Datta Sayantan Mahinder.

Slides:



Advertisements
Similar presentations
Recognising Languages We will tackle the problem of defining languages by considering how we could recognise them. Problem: Is there a method of recognising.
Advertisements

CSC 361NFA vs. DFA1. CSC 361NFA vs. DFA2 NFAs vs. DFAs NFAs can be constructed from DFAs using transitions: Called NFA- Suppose M 1 accepts L 1, M 2 accepts.
Complexity and Computability Theory I Lecture #4 Rina Zviel-Girshin Leah Epstein Winter
Finite Automata CPSC 388 Ellen Walker Hiram College.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 3 School of Innovation, Design and Engineering Mälardalen University 2012.
Formal Language, chapter 9, slide 1Copyright © 2007 by Adam Webber Chapter Nine: Advanced Topics in Regular Languages.
CS21 Decidability and Tractability
Introduction to Computability Theory
1 Introduction to Computability Theory Lecture3: Regular Expressions Prof. Amos Israeli.
Finite Automata Great Theoretical Ideas In Computer Science Anupam Gupta Danny Sleator CS Fall 2010 Lecture 20Oct 28, 2010Carnegie Mellon University.
1 Introduction to Computability Theory Lecture2: Non Deterministic Finite Automata Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture4: Regular Expressions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture3: Regular Expressions Prof. Amos Israeli.
Introduction to Computability Theory
Introduction to Computability Theory
1 Introduction to Computability Theory Discussion1: Non-Deterministic Finite Automatons Prof. Amos Israeli.
Costas Busch - RPI1 Single Final State for NFAs. Costas Busch - RPI2 Any NFA can be converted to an equivalent NFA with a single final state.
Courtesy Costas Busch - RPI1 Non Deterministic Automata.
1 Introduction to Computability Theory Lecture2: Non Deterministic Finite Automata (cont.) Prof. Amos Israeli.
Finite Automata Finite-state machine with no output. FA consists of States, Transitions between states FA is a 5-tuple Example! A string x is recognized.
Lecture 3 Goals: Formal definition of NFA, acceptance of a string by an NFA, computation tree associated with a string. Algorithm to convert an NFA to.
Fall 2004COMP 3351 Single Final State for NFA. Fall 2004COMP 3352 Any NFA can be converted to an equivalent NFA with a single final state.
Validating Streaming XML Documents Luc Segoufin & Victor Vianu Presented by Harel Paz.
1 Single Final State for NFAs and DFAs. 2 Observation Any Finite Automaton (NFA or DFA) can be converted to an equivalent NFA with a single final state.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Nondeterminism.
1 NFAs accept the Regular Languages. 2 Equivalence of Machines Definition: Machine is equivalent to machine if.
Lecture 3 Goals: Formal definition of NFA, acceptance of a string by an NFA, computation tree associated with a string. Algorithm to convert an NFA to.
Fall 2006Costas Busch - RPI1 Non-Deterministic Finite Automata.
CS5371 Theory of Computation Lecture 4: Automata Theory II (DFA = NFA, Regular Language)
1 Non-Deterministic Automata Regular Expressions.
Theory of Computing Lecture 22 MAS 714 Hartmut Klauck.
Fall 2004COMP 3351 Another NFA Example. Fall 2004COMP 3352 Language accepted (redundant state)
Costas Busch - LSU1 Non-Deterministic Finite Automata.
Foundations of (Theoretical) Computer Science Chapter 1 Lecture Notes (Section 1.2: NFA’s) David Martin With some modifications.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
1 A Single Final State for Finite Accepters. 2 Observation Any Finite Accepter (NFA or DFA) can be converted to an equivalent NFA with a single final.
Fall 2004COMP 3351 Regular Expressions. Fall 2004COMP 3352 Regular Expressions Regular expressions describe regular languages Example: describes the language.
Nondeterminism (Deterministic) FA required for every state q and every symbol  of the alphabet to have exactly one arrow out of q labeled . What happens.
Great Theoretical Ideas in Computer Science.
Formal Language Finite set of alphabets Σ: e.g., {0, 1}, {a, b, c}, { ‘{‘, ‘}’ } Language L is a subset of strings on Σ, e.g., {00, 110, 01} a finite language,
NFA ε - NFA - DFA equivalence. What is an NFA An NFA is an automaton that its states might have none, one or more outgoing arrows under a specific symbol.
Nondeterministic Finite Automata CS 130: Theory of Computation HMU textbook, Chapter 2 (Sec 2.3 & 2.5)
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
REGULAR LANGUAGES.
1 Unit 1: Automata Theory and Formal Languages Readings 1, 2.2, 2.3.
Introduction to CS Theory Lecture 3 – Regular Languages Piotr Faliszewski
State Complexity: Recent Results and Future Directions Sheng Yu Department of Computer Science University of Western Ontario London, Ontario,
Prof. Busch - LSU1 NFAs accept the Regular Languages.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 3 Mälardalen University 2010.
INHERENT LIMITATIONS OF COMPUTER PROGAMS CSci 4011.
Recognising Languages We will tackle the problem of defining languages by considering how we could recognise them. Problem: Is there a method of recognising.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 3 Mälardalen University 2007.
Chapter 5 Finite Automata Finite State Automata n Capable of recognizing numerous symbol patterns, the class of regular languages n Suitable for.
Finite Automata Great Theoretical Ideas In Computer Science Victor Adamchik Danny Sleator CS Spring 2010 Lecture 20Mar 30, 2010Carnegie Mellon.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
Regular Languages Chapter 1 Giorgi Japaridze Theory of Computability.
Complexity and Computability Theory I Lecture #5 Rina Zviel-Girshin Leah Epstein Winter
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 3 Mälardalen University 2006.
Lecture #5 Advanced Computation Theory Finite Automata.
Non Deterministic Automata
Chapter 2 FINITE AUTOMATA.
Hierarchy of languages
Non-Deterministic Finite Automata
Non Deterministic Automata
CSE 311: Foundations of Computing
Chapter Nine: Advanced Topics in Regular Languages
FORMAL LANGUAGES, AUTOMATA, AND COMPUTABILITY
CSE 311 Foundations of Computing I
Chapter 1 Regular Language
NFAs accept the Regular Languages
Presentation transcript:

Magic Numbers and Subset Construction Samik Datta Sayantan Mahinder

Magic Number, α Iwama, Matsuura, Paterson defined a magic number as an integer α between n and (both inclusive) such that there is no minimal NFA of n states which require exactly α states in the minimal equivalent DFA. We know that n and are not magic numbers. Why? The division automaton, the DFA for the (n-1)th symbol from the RHS is 0. We will investigate the question, whether,in particular, is a magic number? More optimistically … are there any magic numbers at all?

Fooling Set for language L Fooling set (pair of strings) satisfies the following 2 conditions 1. For all k, 2.For all different i, j, at least one of the followings are satisfied (cross-over terms). Example: for a fooling set is

Minimality of NFA Lemma: If L is a regular language, them the # of states in a NFA accepting L is Proof outline: All the intermediate states reached after reading the first string (of the pair) in the fooling set are different. Prove using contradiction. Corollary: To prove that a given NFA for L with n states is minimal, we can demonstrate a fooling set of cardinality n.

A skeleton NFA The NFA M has n states and have only 2 restrictions on it’s transition for all i=1,2, …,n-1 All the other transitions for the rest of the alphabet (except 1) are arbitrary. is the only start state, is the only accepting state.

An useful theorem Theorem: For any NFA M satisfying 1 and 2, the following 2 facts hold good … 1. M is minimal among the NFA s accepting L(M). 2. The DFA consisting of the reachable states after the subset construction is minimal, too. Proof outline: (1) Show a fooling set of cardinality n. (2) The string leads a state of the DFA (obtained by subset construction) with as an element to a final state and another state without as an element to the non-final state. Therefore, there are no 2 equivalent states in the power set of Q which are reachable from the start state.

The bound is tight! It is a variation of the “skeleton NFA” we considered in the last slide, having {0,1} as the alphabet, and the transitions on 0 defined as in the figure. Please note the back arrow, forward arrow labeled 0 from each state. What demands them to be present? …

But why ? denotes the # of states in the minimal DFA equivalent to minimal NFA M with n states. Proof outline: To show that all the states in P(Q) are reachable in the subset construction, use induction on the cardinality of the set concerned. Basis: Cardinality 0,1: All k+1 such states are reachable. Hypothesis: All states with cardinality <= l-1 are reachable. Induction: To show that all the states with cardinality l are reachable, note that

Proof outline: Use the previous result … be careful to prove that no other state is reachable. Minimality follows from our good old lemma. Another family,

Yet another family! Trick: Take your alphabet to be big enough, consisting of letter, including 0,1. Construction: start with Add transitions from the accepting state on letters (none 0,1) to the states where each such state is of the form except the Proof outline: It is easy to see all the newly added j states are reachable, but we have to be careful to show that no other state is reachable.

Magic Number is a Myth! The case, α = n is trivial Else α satisfies In case when α is the left limit, consider Else consider If α is 2 power n, consider

Wait a minute … what happens in small alphabet ? In the paper, Galina Jiraskova was able to give the proof of no magic number using 2n sized alphabet (unlike we did here for exponential order). But, it is not a construction, but an existence. In case of {0,1}, the same author proved that there is no magic number of But the question whether there are some magic numbers of is still open. In case of {1}, Chrobak proved that no minimal NFA with n states needs states in the minimal equivalent DFA. The question whether there exist some magic # less than that is still open …

Any practical implications ? Yes, these bounds are necessary to analyze the algorithms involving the finite automata There is a field called the state complexity theory, which gives lower bound for minimum number of states needed to recognize certain regular languages, and other regular languages obtained by applying various operations like Reversal, Shuffle, Quotient, Prefix etc. on those regular languages.

References 0. Galina Jiraskova: Note on Minimal Finite Automata. Mathematical Institute, Slovak academy of sciences. Slovakia. 1. M. Chrobak: Finite automata and unary languages. Theoretical Computer Science 47(1986), J. Hromkoviˇc: Communication Complexity and Parallel Computing. Springer 1997 K. Iwama. A. Matsuura and M. Paterson: A family of NFA’s which need 2n − α deterministic states. Proc. MFCS’00, Lecture Notes in Computer Science 1893, Springer-Verlag 2000, pp F. Moore: On the bounds for state-set size in proofs of equivalence between deterministic, nondeterministic and two-way finite automata. IEEE Trans. Comput. C-20, pp , 1971

Thank you! Questions