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

Slides:



Advertisements
Similar presentations
Complexity and Computability Theory I Lecture #4 Rina Zviel-Girshin Leah Epstein Winter
Advertisements

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.
Pushdown Automata Part II: PDAs and CFG Chapter 12.
Finite Automata and Non Determinism
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! 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 Lecture 13 FSA’s –Defining FSA’s –Computing with FSA’s Defining L(M) –Defining language class LFSA.
1 Lecture 20 Regular languages are a subset of LFSA –algorithm for converting any regular expression into an equivalent NFA –Builds on existing algorithms.
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.
Princeton University COS 226 Algorithms and Data Structures Spring Knuth-Morris-Pratt Reference: Chapter 19, Algorithms.
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,
1 Lecture 32 CFG --> PDA construction –Shows that for any CFL L, there exists a PDA M such that L(M) = L –The reverse is true as well, but we do not prove.
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.
CS 310 – Fall 2006 Pacific University CS310 Variants of Turing Machines Section 3.2 November 8, 2006.
Lecture 5UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 5.
Why the algorithm works! Converting an NFA into an FSA.
CS5371 Theory of Computation Lecture 12: Computability III (Decidable Languages relating to DFA, NFA, and CFG)
CSCI3130: Formal Languages and Automata Theory Tutorial 4 Tutor: William Chow.
1 Theory of Digital Computation Course material for undergraduate students on IT Department of Computer Science University of Veszprem Veszprem, Hungary.
4b 4b Lexical analysis Finite Automata. Finite Automata (FA) FA also called Finite State Machine (FSM) –Abstract model of a computing entity. –Decides.
Lexical Analysis III : NFA to DFA DFA Minimization Lecture 5 CS 4318/5331 Spring 2010 Apan Qasem Texas State University *some slides adopted from Cooper.
Prof. Busch - LSU1 NFAs accept the Regular Languages.
Suffix Trees ALGGEN: Algorithmics and genetics group Dep. Llenguatges i Sistemes Informàtics Universitat Politècnica de Catalunya Dr. Xavier Messeguer.
CSC3315 (Spring 2009)1 CSC 3315 Lexical and Syntax Analysis Hamid Harroud School of Science and Engineering, Akhawayn University
MA/CSSE 474 Theory of Computation Minimizing DFSMs.
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
Regular grammars Module 04.1 COP4020 – Programming Language Concepts Dr. Manuel E. Bermudez.
Language Recognition (12.4)
CSC 4170 Theory of Computation Nondeterminism Section 1.2.
Non-Deterministic Finite Automata
COSC 3340: Introduction to Theory of Computation
DFA Equivalence & Minimization
COP4620 – Programming Language Translators Dr. Manuel E. Bermudez
Regular Expression to NFA
Language Recognition (12.4)
CSC 4170 Theory of Computation Nondeterminism Section 1.2.
… NPDAs continued.
Chapter 1 Regular Language
Nondeterministic Finite State Automata (Dr. Torng)
Teori Bahasa dan Automata Lecture 6: Regular Expression
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, babaa) ({1}, babaa)

Second Configurations a b a,b b b aa (1, babaa) ({1}, babaa) (3, abaa) ({3}, abaa)

Third Configurations a b a,b b b aa (1, babaa) ({1}, babaa) (3, abaa) ({3}, abaa) (3, baa)(4, baa) ({3,4}, baa)

Fourth Configurations a b a,b b b aa (1, babaa) ({1}, babaa) (3, abaa) ({3}, abaa) (3, baa)(4, baa) ({3,4}, baa) (3, aa)(5, aa)({3,5}, aa)

Fifth Configurations a b a,b b b aa (1, babaa) ({1}, babaa) (3, abaa) ({3}, abaa) (3, baa)(4, baa) ({3,4}, baa) (3, aa)(5, aa)({3,5}, aa) (3, a)(4, a) ({3,4}, a)

Accepting Configurations a b a,b b b aa (1, babaa) ({1}, babaa) (3, abaa) ({3}, abaa) (3, baa)(4, baa) ({3,4}, baa) (3, aa)(5, aa)({3,5}, aa) (3, a)(4, a) ({3,4}, a) (3, )(4, ) (6, ) ({3,4,6}, )