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.

Slides:



Advertisements
Similar presentations
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.
Advertisements

CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
Complexity and Computability Theory I Lecture #4 Rina Zviel-Girshin Leah Epstein Winter
8/27/2009 Sofya Raskhodnikova Intro to Theory of Computation L ECTURE 2 Theory of Computation Finite Automata Operations on languages Nondeterminism L2.1.
1 Languages. 2 A language is a set of strings String: A sequence of letters Examples: “cat”, “dog”, “house”, … Defined over an alphabet: Languages.
Regular operations Sipser 1.2 (pages 47-63). First… a sample proof Latex files on ella.
Introduction to Computability Theory
NFAs Sipser 1.2 (pages 47–54). CS 311 Fall Recall… Last time we showed that the class of regular languages is closed under: –Complement –Union.
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.
Intro to DFAs Readings: Sipser 1.1 (pages 31-44) With basic background from Sipser 0.
NFAs Sipser 1.2 (pages 47–54). CS 311 Mount Holyoke College 2 Recall… Last time we showed that the class of regular languages is closed under: –Complement.
Introduction to Computability Theory
Regular operations Sipser 1.2 (pages 47-63). First… a sample proof
Intro to DFAs Readings: Sipser 1.1 (pages 31-44) With basic background from Sipser 0.
Lecture 3UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 3.
CS 310 – Fall 2006 Pacific University CS310 Finite Automata Sections:1.1 page 44 September 8, 2006.
Courtesy Costas Busch - RPI1 Non Deterministic Automata.
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.
Fall 2006Costas Busch - RPI1 Deterministic Finite Automata And Regular Languages.
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.
1 Finite Automata. 2 Finite Automaton Input “Accept” or “Reject” String Finite Automaton Output.
1 Languages and Finite Automata or how to talk to machines...
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Nondeterminism.
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.Defs. a)Finite Automaton: A Finite Automaton ( FA ) has finite set of ‘states’ ( Q={q 0, q 1, q 2, ….. ) and its ‘control’ moves from state to state.
Finite Automata Costas Busch - RPI.
Costas Busch - LSU1 Non-Deterministic Finite Automata.
Lecture 4UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 4.
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 Non-Deterministic Finite Automata. 2 Alphabet = Nondeterministic Finite Automaton (NFA)
Regular Languages A language is regular over  if it can be built from ;, {  }, and { a } for every a 2 , using operators union ( [ ), concatenation.
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,
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.
Introduction to CS Theory Lecture 3 – Regular Languages Piotr Faliszewski
Athasit Surarerks THEORY OF COMPUTATION 07 NON-DETERMINISTIC FINITE AUTOMATA 1.
CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
CHAPTER 1 Regular Languages
Lecture # 12. Nondeterministic Finite Automaton (NFA) Definition: An NFA is a TG with a unique start state and a property of having single letter as label.
INHERENT LIMITATIONS OF COMPUTER PROGAMS CSci 4011.
Chapter 3 Regular Expressions, Nondeterminism, and Kleene’s Theorem Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction.
Lecture Notes 
Recap: Transformation NFA  DFA  s s1s1... snsn p1p1 p2p2... pmpm >...  p1p1  p2p2  pipi s e s1s1 e s2s2 e sisi >
Formal Languages Finite Automata Dr.Hamed Alrjoub 1FA1.
Nondeterministic Finite Automata (NFAs). Reminder: Deterministic Finite Automata (DFA) q For every state q in Q and every character  in , one and only.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
Finite Automata A simple model of computation. 2 Finite Automata2 Outline Deterministic finite automata (DFA) –How a DFA works.
NFA’s with  Transitions We extend the class of NFAs by allowing instantaneous transitions: 1.The automaton may be allowed to change its state without.
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.
Pushdown Automata - like NFA-  but also has a stack - transition takes the current state, the current input symbol, and the top-of-the-stack symbol (which.
Costas Busch - LSU1 Deterministic Finite Automata And Regular Languages.
Fall 2004COMP 3351 Finite Automata. Fall 2004COMP 3352 Finite Automaton Input String Output String Finite Automaton.
Languages.
Lecture2 Regular Language
CSC 4170 Theory of Computation Nondeterminism Section 1.2.
Deterministic Finite Automata And Regular Languages Prof. Busch - LSU.
Non-Deterministic Finite Automata
COSC 3340: Introduction to Theory of Computation
Non-Deterministic Finite Automata
CSE322 Definition and description of finite Automata
Non Deterministic Automata
CSC 4170 Theory of Computation Nondeterminism Section 1.2.
Chapter 1 Regular Language
Non Deterministic Automata
Presentation transcript:

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 when we drop this requirement ? L = { w 2 {a,b} * | w contains abba as a substring } Transition diagram (of this new type) : [Section 4.1]

Formal definition of an NFA [Section 4.1] A nondeterministic finite automaton (NFA) is a 5-tuple (Q, ,q 0,A,  ) where - Q is a finite set of states -  is a finite alphabet (input symbols) - q o 2 Q is the initial state - A µ Q is a set of accepting states -  : Q £   ___ is the transition function Give a formal definition of the NFA from the previous slide.

Defining the computation of an NFA M=(Q, ,q 0,A,  ). Extended transition function  * : Q £  *  ____ : 1) For every q 2 Q, let  * (q,  ) = 2) For every q 2 Q, y 2  *, and  2 , let  * (q,y  ) = We say that a string x 2  * is accepted by M if ________. A string which is not accepted by M is rejected by M. The language accepted by M, denoted by L(M) is the set of all strings accepted by M. Formal definition of an NFA [Section 4.1]

Is the following statement true ? For every FA M = (Q, ,q 0,A,  ) there exists an NFA M 1 = (Q 1, ,q 1,A 1,  1 ) such that L(M) = L(M 1 ). NFA’s vs. FA’s [Section 4.1]

Is the following statement true ? For every NFA M = (Q, ,q 0,A,  ) there exists an FA M 1 = (Q 1, ,q 1,A 1,  1 ) such that L(M) = L(M 1 ). Example : NFA’s vs. FA’s [Section 4.1] a a,b b b b a

Thm : For every NFA M = (Q, ,q 0,A,  ) there exists an FA M 1 = (Q 1, ,q 1,A 1,  1 ) such that L(M) = L(M 1 ). Construction of M 1 : Proof that L(M) = L(M 1 ) : NFA’s vs. FA’s [Section 4.1]

Example : NFA accepting a * b * c *. NFA’s with  [Section 4.2]

Formal definition of an NFA-  [Section 4.2] A nondeterministic finite automaton with  -transitions (NFA-  ) is a 5-tuple (Q, ,q 0,A,  ) where - Q is a finite set of states -  is a finite alphabet (input symbols) - q o 2 Q is the initial state - A µ Q is a set of accepting states -  :  is the transition function Give a formal definition of the NFA-  from the previous slide.

Defining the computation of an NFA-  M=(Q, ,q 0,A,  ). Extended transition function  * : ____  ____ : 1) For every q 2 Q, let  * (q,  ) = 2) For every q 2 Q, y 2  *, and  2 , let  * (q,y  ) = Formal definition of an NFA-  [Section 4.2]

Defining the computation of an NFA-  M=(Q, ,q 0,A,  ). Extended transition function  * : Q £  *  2 Q : 1) For every q 2 Q, let  * (q,  ) = { q } 2) For every q 2 Q, y 2  *, and  2 , let  * (q,y  ) = Formal definition of an NFA-  [Section 4.2]  -closure of a set S µ Q, denoted  (S), is the set of all states reachable from S by a sequence of  -transitions. Define  (S) :

Defining the computation of an NFA-  M=(Q, ,q 0,A,  ). Extended transition function  * : Q £  *  2 Q : 1) For every q 2 Q, let  * (q,  ) = { q } 2) For every q 2 Q, y 2  *, and  2 , let  * (q,y  ) = [ p 2  *(q,y)  (  (p,  )) We say that a string x 2  * is accepted by M if ________. A string which is not accepted by M is rejected by M. The language accepted by M, denoted by L(M) is the set of all strings accepted by M. Formal definition of an NFA-  [Section 4.2]

Is the following statement true ? For every NFA M = (Q, ,q 0,A,  ) there exists an NFA-  M 1 = (Q 1, ,q 1,A 1,  1 ) such that L(M) = L(M 1 ). NFA-  ’s vs. NFA’s [Section 4.2]

Is the following statement true ? For every NFA-  M = (Q, ,q 0,A,  ) there exists an NFA M 1 = (Q 1, ,q 1,A 1,  1 ) such that L(M) = L(M 1 ). NFA-  ’s vs. NFA’s [Section 4.2]

Proof of Kleene’s Thm [Section 4.3] Kleene’s Thm: A language L over  is regular iff there exists a finite automaton that accepts L. Part 1 : For every regular language there exists an NFA-  accepting it.

Proof of Kleene’s Thm [Section 4.3] Part 2 : Any language accepted by an FA is regular. Let M=({1,2,3,…,k}, ,q 0,A,  ) be an FA. We will show that for every p,q,r 2 Q, the following language is regular : L(p,q,r) = { x 2  * |  * (p,x)=q and for every prefix y of x other than  and x we have  * (p,y) · r } Can we then conclude that L(M) is regular ?

Proof of Kleene’s Thm [Section 4.3] Claim : Let M=({1,2,3,…,k}, ,q 0,A,  ) be an FA. For every p,q,r 2 Q, the following language is regular : L(p,q,r) = { x 2  * |  * (p,x)=q and for every prefix y of x other than  and x we have  * (p,y) · r }