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.

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.
Pushdown Automata Section 2.2 CSC 4170 Theory of Computation.
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 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 2 Mälardalen University 2005.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 3 School of Innovation, Design and Engineering Mälardalen University 2012.
1 Module 20 NFA’s with -transitions –NFA- ’s Formal definition Simplifies construction –LNFA- –Showing LNFA  is a subset of LNFA (extra credit) and therefore.
Introduction to Computability Theory
1 Introduction to Computability Theory Lecture2: Non Deterministic Finite Automata 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.
Courtesy Costas Busch - RPI1 Non Deterministic Automata.
1 Introduction to Computability Theory Lecture2: Non Deterministic Finite Automata (cont.) Prof. Amos Israeli.
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.
Lecture 18 NFA’s with -transitions –NFA- ’s Formal definition Simplifies construction –LNFA- –Showing LNFA  is a subset of LNFA and therefore a subset.
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.
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.
Introduction to Finite Automata Adapted from the slides of Stanford CS154.
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.
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 Non-Deterministic Finite Automata. 2 Alphabet = Nondeterministic Finite Automaton (NFA)
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.
NFA Closure Properties. NFAs also have closure properties We have given constructions for showing that DFAs are closed under 1.Complement 2.Intersection.
NFA Closure Properties Sipser pages pages NFAs also have closure properties We have given constructions for showing that DFAs are closed under.
Nondeterministic Finite Automata CS 130: Theory of Computation HMU textbook, Chapter 2 (Sec 2.3 & 2.5)
REGULAR LANGUAGES.
1 Unit 1: Automata Theory and Formal Languages Readings 1, 2.2, 2.3.
Theory of Computation, Feodor F. Dragan, Kent State University 1 Regular expressions: definition An algebraic equivalent to finite automata. We can build.
1 Chapter 2 Finite Automata (part b) Windmills in Holland.
Athasit Surarerks THEORY OF COMPUTATION 07 NON-DETERMINISTIC FINITE AUTOMATA 1.
Prof. Busch - LSU1 NFAs accept the Regular Languages.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 3 Mälardalen University 2010.
CHAPTER 1 Regular Languages
CS 3813: Introduction to Formal Languages and Automata Chapter 2 Deterministic finite automata These class notes are based on material from our textbook,
CMSC 330: Organization of Programming Languages Theory of Regular Expressions Finite Automata.
NFA defined. NFA A Non-deterministic Finite-state Automata (NFA) is a language recognizing system similar to a DFA. It supports a level of non-determinism.
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.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 3 Mälardalen University 2007.
Lecture Notes 
Regular Expressions Section 1.3 (also 1.1, 1.2) CSC 4170 Theory of Computation.
Algorithms for hard problems Automata and tree automata Juris Viksna, 2015.
Chapter 5 Finite Automata Finite State Automata n Capable of recognizing numerous symbol patterns, the class of regular languages n Suitable for.
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.
Finite Automata A simple model of computation. 2 Finite Automata2 Outline Deterministic finite automata (DFA) –How a DFA works.
What do we know? DFA = NFA =  -NFA We have seen algorithms to transform DFA to NFA (trival) NFA to  NFA (trivial) NFA to DFA (subset construction)
Deterministic Finite Automata Nondeterministic Finite Automata.
1 Finite Automata. 2 Introductory Example An automaton that accepts all legal Pascal identifiers: Letter Digit Letter or Digit "yes" "no" 2.
Acceptance by DFA. Defining DFAs For each description let’s draw a DFA that recognizes the language it describes { aa,ab,ac} {  a, abb, abbbb, …,ab.
CIS Automata and Formal Languages – Pei Wang
Chapter 2 FINITE AUTOMATA.
CSC 4170 Theory of Computation Nondeterminism Section 1.2.
COSC 3340: Introduction to Theory of Computation
Nondeterministic Finite Automata
Non Deterministic Automata
Finite Automata.
Deterministic Finite Automaton (DFA)
CSC 4170 Theory of Computation Nondeterminism Section 1.2.
Finite-State Machines with No Output
Presentation transcript:

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 reading the input symbol. 2.In diagrams, such transitions are depicted by labeling the appropriate arcs with . 3.Note that this does not mean that  has become an input symbol. On the contrary, we assume that the symbol  does not belong to any alphabet.

example { a n | n is even or divisible by 3 } p q r r’’ r’ q’   a a a a a

Definition A  -NFA is a quintuple A=(Q, ,s,F,  ), where – Q is a set of states –  is the alphabet of input symbols – s is an element of Q --- the initial state – F is a subset of Q ---the set of final states –  Q  (  Q is the transition function Note  is never a member of 

 -NFA  -NFAs add a convenient feature but (in a sense) they bring us nothing new: they do not extend the class of languages that can be represented. Both NFAs and  -NFAs recognize exactly the same languages.  -transitions are a convenient feature: try to design an NFA for the even or divisible by 3 language that does not use them! – Hint, you need to use something like the product construction from union-closure of DFAs

 -Closure  -closure of a state The  -closure of the state q, denoted ECLOSE(q), is the set that contains q, together with all states that can be reached starting at q by following only  -transitions. In the above example: ECLOSE(p) ={p,q,r} ECLOSE(x)={x} for any of the remaining five states, x. p q r r’’ r’ q’   a a a a a

Elimination of  -Transitions Given an  -NFA N, this construction produces an NFA N' such that L(N')=L(N). The construction of N' begins with N as input, and takes 3 steps: 1.Make p an accepting state of N' iff ECLOSE(p) contains an accepting state of N. 2.Add an arc from p to q labeled a iff there is an arc labeled a in N from some state in ECLOSE(p) to q. 3.Delete all arcs labeled .

Illustration We illustrate the procedure on the following  -NFA N, accepting the strings over {a,b,c} of the form a i b j c k ( i,j,k  0 )   ab c

1) Make p an accepting state iff ECLOSE(p) contains an accepting state of N   ab c 2) Add an arc from p to q labeled a iff there is an arc labeled a from some state in ECLOSE(p) to q 3) Delete all arcs labeled  L1 L2 L3   ab c b c c ab c b c c

Why does it work? The language accepted by the automaton is being preserved during the three steps of the construction: L(N)=L(N 1 )=L(N 2 )=L(N 3 ) Each step here requires a proof. A Good exercise for you to do!