Why the algorithm works! Converting an NFA into an FSA.

Slides:



Advertisements
Similar presentations
THIS IS AN EXAMPLE POWERPOINT PRESENTATION. THIS IS THE FIRST SLIDE Here is some text I have added to the slide. This is a key concept As if this Finally.
Advertisements

Lexical Analysis IV : NFA to DFA DFA Minimization
Complexity and Computability Theory I Lecture #4 Rina Zviel-Girshin Leah Epstein Winter
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.
Al-Karma Language School Computer Department Prep. 3.
Lecture 3UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 3.
1 Module 15 FSA’s –Defining FSA’s –Computing with FSA’s Defining L(M) –Defining language class LFSA –Comparing LFSA to set of solvable languages (REC)
1 Lecture 14 Language class LFSA –Study limits of what can be done with FSA’s –Closure Properties –Comparing to other language classes.
1 Module 19 LNFA subset of LFSA –Theorem 4.1 on page 131 of Martin textbook –Compare with set closure proofs Main idea –A state in FSA represents a set.
1 Module 21 Closure Properties for LFSA using NFA’s –From now on, when I say NFA, I mean any NFA including an NFA- unless I add a specific restriction.
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.
Why the algorithm works! Converting an NFA into an FSA.
Why the algorithm works! Simulating 2 FSA’s with 1 FSA.
Simulating 2 FSA’s with 1 FSA. Purpose This presentation presents an example execution of the algorithm which takes as input two FSA’s and produces as.
1 The scanning process Goal: automate the process Idea: –Start with an RE –Build a DFA How? –We can build a non-deterministic finite automaton (Thompson's.
1 Lecture 13 FSA’s –Defining FSA’s –Computing with FSA’s Defining L(M) –Defining language class LFSA.
1 Lecture 26 Decision problems about regular languages –Basic problems are solvable halting, accepting, and emptiness problems –Solvability of other problems.
Why the algorithm works! Simulating 2 FSA’s with 1 FSA.
1 Lecture 16 FSA’s –Defining FSA’s –Computing with FSA’s Defining L(M) –Defining language class LFSA –Comparing LFSA to set of solvable languages (REC)
1 Module 18 NFA’s –nondeterministic transition functions computations are trees, not paths –L(M) and LNFA LFSA subset of LNFA –Comparing computational.
Regular Expression to NFA-  (a+ba) * a. First Parsing Step concatenate (a+ba) * a.
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 Lecture 16 FSA’s –Defining FSA’s –Computing with FSA’s Defining L(M) –Defining language class LFSA –Comparing LFSA to set of solvable languages (REC)
1 Lecture 18 Closure Properties of Language class LFSA –Remember ideas used in solvable languages unit –Set complement –Set intersection, union, difference,
CS5371 Theory of Computation Lecture 6: Automata Theory IV (Regular Expression = NFA = DFA)
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 Lecture 36 Attempt to prove that CFL’s are closed under intersection –Review previous constructions –Translate previous constructions to current setting.
1 Lecture 16 NFA’s –nondeterministic transition functions computations are trees, not paths –L(M) and LNFA LFSA subset of LNFA –Comparing computational.
1 Lecture 23 Decision problems about regular languages –Programs can be inputs to other programs FSA’s, NFA’s, regular expressions –Basic problems are.
1 Module 25 Decision problems about regular languages –Basic problems are solvable halting, accepting, and emptiness problems –Solvability of other problems.
1 Lecture 19 Closure Properties for LFSA using NFA’s –union second proof –concatenation –Kleene closure.
1 Lecture 20 LNFA subset of LFSA –Theorem 4.1 on page 105 of Martin textbook –Compare with set closure proofs Main idea –A state in FSA represents a set.
NFA- to NFA conversion. Purpose This presentation presents an example execution of the algorithm which takes as input an NFA with -transitions and produces.
Converting an NFA into an FSA Proving LNFA is a subset of LFSA.
Lecture 5UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 5.
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.
Lexical Analysis Constructing a Scanner from Regular Expressions.
4b 4b Lexical analysis Finite Automata. Finite Automata (FA) FA also called Finite State Machine (FSM) –Abstract model of a computing entity. –Decides.
Prof. Busch - LSU1 NFAs accept the Regular Languages.
Brian K. Strickland a ba Λ a aa b Λ -NFA for Regular Expression (aab)*(a + aba)*
Regular Grammars Reading: 3.3. What we know so far…  FSA = Regular Language  Regular Expression describes a Regular Language  Every Regular Language.
1 Module 17 Closure Properties of Language class LFSA –Remember ideas used in solvable languages unit –Set complement –Set intersection, union, difference,
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.
Conversions Regular Expression to FA FA to Regular Expression.
Complexity and Computability Theory I Lecture #5 Rina Zviel-Girshin Leah Epstein Winter
NFAε - NFA - DFA equivalence
Bin Packing First fit algorithm
Recognizer for a Language
Language Recognition (12.4)
CSE 105 theory of computation
CSC 4170 Theory of Computation Nondeterminism Section 1.2.
Hierarchy of languages
Non-Deterministic Finite Automata
COSC 3340: Introduction to Theory of Computation
Lesson Action Guide COURSE LOGO Lesson Title This
DFA Equivalence & Minimization
4b Lexical analysis Finite Automata
4b Lexical analysis Finite Automata
Language Recognition (12.4)
CSC 4170 Theory of Computation Nondeterminism Section 1.2.
… NPDAs continued.
Bin Packing First fit algorithm
Nondeterministic Finite State Automata (Dr. Torng)
Non Deterministic Automata
Part Two : Nondeterministic Finite Automata
COSC 3340: Introduction to Theory of Computation
COSC 3340: Introduction to Theory of Computation
Presentation transcript:

Why the algorithm works! Converting an NFA into an FSA

Purpose This presentation attempts to give the reader some intuition as to why the algorithm which takes as input an NFA without -transitions and produces as output an equivalent FSA works correctly. We use the example from the previous presentation to illustrate this intuition.

Why the Construction Works a b a,b b b aa NFAEquivalent FSA Input String babaa

Key Idea a b a,b b b aa NFAEquivalent FSA We will illustrate the computation of both the NFA and the FSA on the input string babaa. In all configurations, the set of states the NFA is in will be identical to the state the FSA is in.

Initial Configurations a b a,b b b aa (1,[1,babaa]) ({1},[1,babaa])

Second Configurations a b a,b b b aa (1,[1,babaa]) ({1},[1,babaa]) (3,[2,babaa])({3},[2,babaa])

Third Configurations a b a,b b b aa (1,[1,babaa]) ({1},[1,babaa]) (3,[2,babaa])({3},[2,babaa]) (3,[3,babaa])(4,[3,babaa])({3,4}, [3,babaa])

Fourth Configurations a b a,b b b aa (1,[1,babaa]) ({1},[1,babaa]) (3,[2,babaa])({3},[2,babaa]) (3,[3,babaa])(4,[3,babaa])({3,4}, [3,babaa]) (3,[4,babaa]) (5,[4,babaa]) ({3,5}, [4,babaa])

Fifth Configurations a b a,b b b aa (1,[1,babaa]) ({1},[1,babaa]) (3,[2,babaa])({3},[2,babaa]) (3,[3,babaa])(4,[3,babaa])({3,4}, [3,babaa]) (3,[4,babaa]) (5,[4,babaa]) ({3,5}, [4,babaa]) (3,[5,babaa])(4,[5,babaa]) ({3,4}, [5,babaa])

Final Configurations a b a,b b b aa (1,[1,babaa]) ({1},[1,babaa]) (3,[2,babaa])({3},[2,babaa]) (3,[3,babaa])(4,[3,babaa])({3,4}, [3,babaa]) (3,[4,babaa]) (5,[4,babaa]) ({3,5}, [4,babaa]) (3,[5,babaa])(4,[5,babaa]) ({3,4}, [5,babaa]) (3,[6,babaa])(4,[6,babaa])(6,[6,babaa]) ({3,4,6}, [6,babaa])