1 Introduction to Computability Theory Lecture2: Non Deterministic Finite Automata (cont.) Prof. Amos Israeli.

Slides:



Advertisements
Similar presentations
CSE 311 Foundations of Computing I
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
Nondeterministic Finite Automata CS 130: Theory of Computation HMU textbook, Chapter 2 (Sec 2.3 & 2.5)
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 3 School of Innovation, Design and Engineering Mälardalen University 2012.
1 Introduction to Computability Theory Discussion3: Uses of the Pumping Lemma Prof. Amos Israeli.
Introduction to Computability Theory
1 Introduction to Computability Theory Lecture3: Regular Expressions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Reductions 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.
1 Introduction to Computability Theory Lecture11: Variants of Turing Machines Prof. Amos Israeli.
Introduction to Computability Theory
1 Introduction to Computability Theory Lecture7: PushDown Automata (Part 1) Prof. Amos Israeli.
Introduction to Computability Theory
1 Introduction to Computability Theory Discussion1: Non-Deterministic Finite Automatons Prof. Amos Israeli.
Lecture 3UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 3.
Finite Automata and Non Determinism
Courtesy Costas Busch - RPI1 Non Deterministic Automata.
CS 310 – Fall 2006 Pacific University CS310 Converting NFA to DFA Sections:1.2 Page 54 September 15, 2006.
1 Regular Expressions. 2 Regular expressions describe regular languages Example: describes the language.
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.
Introduction to the Theory of Computation John Paxton Montana State University Summer 2003.
1 Introduction to Computability Theory Lecture4: Non Regular Languages Prof. Amos Israeli.
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.
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.
1 Regular Languages Finite Automata eg. Supermarket automatic door: exit or entrance.
Introduction to Finite Automata Adapted from the slides of Stanford CS154.
Fall 2004COMP 3351 Another NFA Example. Fall 2004COMP 3352 Language accepted (redundant state)
Costas Busch - LSU1 Non-Deterministic Finite Automata.
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.
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.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
REGULAR LANGUAGES.
Theory of Languages and Automata
Theory of Computation, Feodor F. Dragan, Kent State University 1 Regular expressions: definition An algebraic equivalent to finite automata. We can build.
Lecture 05: Theory of Automata:08 Kleene’s Theorem and NFA.
CSCI 2670 Introduction to Theory of Computing August 26, 2004.
Prof. Busch - LSU1 NFAs accept the Regular Languages.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 3 Mälardalen University 2010.
CSCI 2670 Introduction to Theory of Computing September 1, 2005.
CHAPTER 1 Regular Languages
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
INHERENT LIMITATIONS OF COMPUTER PROGAMS CSci 4011.
Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1 Chapter 1 Regular Languages Some slides are in courtesy.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
1 Language Recognition (11.4) Longin Jan Latecki Temple University Based on slides by Costas Busch from the courseCostas Busch
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
CSCI 2670 Introduction to Theory of Computing September 11, 2007.
Regular Languages Chapter 1 Giorgi Japaridze Theory of Computability.
Complexity and Computability Theory I Lecture #5 Rina Zviel-Girshin Leah Epstein Winter
Lecture #5 Advanced Computation Theory Finite Automata.
1/29/02CSE460 - MSU1 Nondeterminism-NFA Section 4.1 of Martin Textbook CSE460 – Computability & Formal Language Theory Comp. Science & Engineering Michigan.
Chapter 2 FINITE AUTOMATA.
Non-Deterministic Finite Automata
COSC 3340: Introduction to Theory of Computation
Non Deterministic Automata
Chapter 1 Regular Language
CSCI 2670 Introduction to Theory of Computing
CHAPTER 1 Regular Languages
CHAPTER 1 Regular Languages
Presentation transcript:

1 Introduction to Computability Theory Lecture2: Non Deterministic Finite Automata (cont.) Prof. Amos Israeli

Roadmap for Lecture In this lecture we: Prove that NFA-s and DFA-s are equivalent. Present the three regular operations. Prove that each of the regular operations preserves regularity. 2

Equivalence Between DFAs and NFAs Every DFA is (A special case of) an NFA, hence, but. Nevertheless, these classes are Equivalent. This means that for any NFA N there exists a DFA D satisfying:. 3

Equivalence Between DFAs and NFAs Thus, to prove equivalence of the classes we prove: Theorem: For every NFA N there exists a DFA D satisfying : Proof Idea: The proof is Constructive: We assume that we know, and construct a simulating DFA, D. 4

Proof Let recognizing some language A. The state set of the simulating DFA D, should reflect the fact that at each step of the computation, N may occupy several sates. Thus we define the state set of D as the power-set of the state set of N. 5

Proof (cont.) Let recognizing some language A. First we assume that N has no - transitions. Define where. 6

Proof (cont.) Our next task is to define D ’s transition function, : For any and define If R is a state of M, then it is a set of states of N. When M in state R processes an input symbol a, M goes to the set of states to which N will go in any of the branches of its computation. 7

Proof (cont.) An alternative way to write the definition of M ’s transition function, is: For any and define And the explanation is just the same. Note: if than Which is OK since. 8

Proof (cont.) The initial state of M is:. Finally, the final state of M is: Since D accepts if N reaches at least one accepting state. The reader can verify for her/him self that D indeed simulates N. 9

Proof (cont.) It remains to consider - transitions. For any state of D define to be the collection of states of R unified with the states reachable from R by - transitions. The old definition of is: And the new definition is: 10

Proof (end) In addition, we have to change the definition of, the initial state of. The previous definition,, is replaced with. Once again the reader can verify that the new definition of D satisfies all requirements. 11

Corollary A language L is regular if and only if there exists an NFA recognizing L. 12

Let and be 2 regular languages above the same alphabet,. We define the 3 Regular Operations: Union:. Concatenation:. Star:. The Regular Operations 13

Elaboration Union is straight forward. Concatenation is the operation in which each word in A is concatenated with every word in B. Star is a unary operation in which each word in A is concatenated with every other word in A and this happens any finite number of times. 14

. The Regular Operations - Examples 15

Motivation for Nondeterminism We want to use the regular operations for a systematic construction of all regular expressions. Given a two DFA-s, their product DFA can recognizes their union, but we do not know how to construct a DFA recognizing either concatenation or star. This can be proved by using NFA-s. 16

The class of Regular languages is closed under the all three regular operations.. Theorem 17

If and are regular, each has its own recognizing automaton and, respectively. In order to prove that the language is regular we have to construct an FA that accepts exactly the words in. Proof for union Using NFA-s 18

A Pictorial proof 19 F

Let recognizing A 1, and recognizing A 2. Construct to recognize, Where,, Proof for union Using NFA-s 20

The class of Regular languages is closed under the concatenation operation.. Theorem 21

Given an input word to be checked whether it belongs to, we may want to run until it reaches an accepting state and then to move to. Proof idea 22

The problem: Whenever an accepting state is reached, we cannot be sure whether the word of is finished yet. The idea: Use non-determinism to choose the right point in which the word of is finished and the word of starts. Proof idea 23

A Pictorial proof 24 F

Let recognizing A 1, and recognizing A 2. Construct to recognize, Where,, Proof using NFAs 25

The class of Regular languages is closed under the star operation.. Theorem 26

A Pictorial proof 27 F

Let recognizing A 1. Construct to recognize Where,, and Proof using NFAs 28

Wrap Up In this lecture we: Proved equivalence between DFA-s and NFA-s. Motivated and defined the three Regular Operations. Proved that the regular operations preserve regularity. 29