1 Module 18 NFA’s –nondeterministic transition functions computations are trees, not paths –L(M) and LNFA LFSA subset of LNFA –Comparing computational.

Slides:



Advertisements
Similar presentations
Lecture 6 Nondeterministic Finite Automata (NFA)
Advertisements

Complexity and Computability Theory I Lecture #4 Rina Zviel-Girshin Leah Epstein Winter
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 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.
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 Module 32 Pushdown Automata (PDA’s) –definition –Example We define configurations and computations of PDA’s We define L(M) for PDA’s.
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 Lecture 21 Regular languages review –Several ways to define regular languages –Two main types of proofs/algorithms Relative power of two computational.
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.
1 Module 16 Distinguishability –Definition –Help in designing/debugging FSA’s.
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.
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.
Homework #2 Solutions.
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)
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,
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.
1 Lecture 15 Distinguishability –Definition –Help in designing/debugging FSA’s NFA’s –nondeterministic transition functions computations are trees, not.
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.
CS5371 Theory of Computation Lecture 4: Automata Theory II (DFA = NFA, Regular Language)
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.
Converting an NFA into an FSA Proving LNFA is a subset of LFSA.
1 Module 11 Proving more specific problems are not solvable Input transformation technique –Use subroutine theme to show that if one problem is unsolvable,
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.
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,
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.
Athasit Surarerks THEORY OF COMPUTATION 07 NON-DETERMINISTIC FINITE AUTOMATA 1.
1 Module 14 Regular languages –Inductive definitions –Regular expressions syntax semantics.
1 FSA’s –Defining FSA’s –Computing with FSA’s Defining L(M) –Defining language class LFSA –Comparing LFSA to set of solvable languages (REC)
INHERENT LIMITATIONS OF COMPUTER PROGAMS CSci 4011.
Brian K. Strickland a ba Λ a aa b Λ -NFA for Regular Expression (aab)*(a + aba)*
1 Module 12 Computation and Configurations –Formal Definition –Examples.
CS 154 Formal Languages and Computability February 9 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron.
1 Module 17 Closure Properties of Language class LFSA –Remember ideas used in solvable languages unit –Set complement –Set intersection, union, difference,
Nondeterministic Finite Automata (NFAs). Reminder: Deterministic Finite Automata (DFA) q For every state q in Q and every character  in , one and only.
Algorithms for hard problems Automata and tree automata Juris Viksna, 2015.
1 Module 12 Computation and Configurations –Formal Definition –Examples.
1 Lexical Analysis Uses formalism of Regular Languages Uses formalism of Regular Languages Regular Expressions Regular Expressions Deterministic Finite.
1 Finite Automata. 2 Introductory Example An automaton that accepts all legal Pascal identifiers: Letter Digit Letter or Digit "yes" "no" 2.
WELCOME TO A JOURNEY TO CS419 Dr. Hussien Sharaf Dr. Mohammad Nassef Department of Computer Science, Faculty of Computers and Information, Cairo University.
Chapter 2 Finite Automata
Chapter 2 FINITE AUTOMATA.
CSC 4170 Theory of Computation Nondeterminism Section 1.2.
CSE322 Finite Automata Lecture #2.
Non-Determinism 12CS45 Finite Automata.
COSC 3340: Introduction to Theory of Computation
Non-Deterministic Finite Automata
NFAs and Transition Graphs
Instructor: Aaron Roth
CSC 4170 Theory of Computation Nondeterminism Section 1.2.
Chapter 1 Regular Language
Nondeterministic Finite State Automata (Dr. Torng)
NFAs and Transition Graphs
More About Nondeterminism
Non Deterministic Automata
Part Two : Nondeterministic Finite Automata
Presentation transcript:

1 Module 18 NFA’s –nondeterministic transition functions computations are trees, not paths –L(M) and LNFA LFSA subset of LNFA –Comparing computational models

2 Nondeterministic Finite State Automata NFA’s

3 Change:  is a relation For an FSA M,  (q,a) results in one and only one state for all states q and characters a. –That is,  is a function For an NFA M,  (q,a) can result in a set of states –That is,  is now a relation –Next step is not determined (nondeterministic)

4 Example NFA aaab a,b Why is this only an NFA and not an FSA? Identify as many reasons as you can.

5 Computing with NFA’s Configurations: same as they are for FSA’s Computations are different –Initial configuration is identical –However, there may be several next configurations or there may be none. Computation is no longer a “path” but is now a “graph” (often a tree) rooted at the initial configuration –Definition of halting, accepting, and rejecting configurations is identical –Definition of acceptance must be modified

6 Computation Graph (Tree) aaab a,b Input string aaaaba (1, aaaaba) (1, aaaba)(2, aaaba) (1, aaba)(2, aaba)(3, aaba)(1, aba)(2, aba)(3, aba)crash(1, ba)(2, ba)(3, ba) (1, a)(4, a) (1, )(2, )(5, )

7 Definition of |- unchanged * aaab a,b Input string aaaaba (1, aaaaba) |- (1, aaaba) (1, aaaaba) |- (2, aaaba) (1, aaaaba) |- 3 (1, aba) (1, aaaaba) |- 3 (3, aba) (1, aaaaba) |- * (2, aba) (1, aaaaba) |- * (3, aba) (1, aaaaba) |- * (1, ) (1, aaaaba) |- * (5, ) (1, aaaaba) (1, aaaba)(2, aaaba) (1, aaba)(2, aaba)(3, aaba) (1, aba)(2, aba)(3, aba)crash (1, ba)(2, ba)(3, ba) (1, a)(4, a) (1, )(2, )(5, )

8 Acceptance and Rejection * aaab a,b Input string aaaaba M accepts string x if one of the configurations reached is an accepting configuration (q 0, x) |- * (f, ),f in A M rejects string x if all configurations reached are either not halting configurations or are rejecting configurations (1, aaaaba) (1, aaaba)(2, aaaba) (1, aaba)(2, aaba)(3, aaba) (1, aba)(2, aba)(3, aba)crash (1, ba)(2, ba)(3, ba) (1, a)(4, a) (1, )(2, )(5, )

9 Comparison aaa a,b b b b b a FSA aaab a,b NFA

10 Defining L(M) and LNFA M accepts string x if one of the configurations reached is an accepting configuration –(q 0, x) |- * (f, ),f in A M rejects string x if all configurations reached are either not halting configurations or are rejecting configurations L(M) (or Y(M)) –The set of strings accepted by M N(M) –The set of strings rejected by M LNFA –Language L is in language class LNFA iff there exists an NFA M such that L(M) = L

11 Comparing language classes LFSA subset of LNFA

12 LFSA subset LNFA Let L be an arbitrary language in LFSA Let M be the FSA such that L(M) = L –M exists by definition of L in LFSA Construct an NFA M’ such that L(M’) = L Argue L(M’) = L There exists an NFA M’ such that L(M’) = L L is in LNFA –By definition of L in LNFA

13 Visualization LFSA LNFA FSA’s NFA’s L L M M’ Let L be an arbitrary language in LFSA Let M be an FSA such that L(M) = L M exists by definition of L in LFSA Construct NFA M’ from FSA M Argue L(M’) = L There exists an NFA M’ such that L(M’) = L L is in LNFA

14 Construction We need to make M into an NFA M’ such that L(M’) = L(M) How do we accomplish this?