Nondeterministic Finite State Automata (Dr. Torng)

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.
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 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)
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
1 Module 18 NFA’s –nondeterministic transition functions computations are trees, not paths –L(M) and LNFA LFSA subset of LNFA –Comparing computational.
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,
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 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,
1 Regular Expressions/Languages Regular languages –Inductive definitions –Regular expressions syntax semantics Not covered in lecture.
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.
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.
1 Module 17 Closure Properties of Language class LFSA –Remember ideas used in solvable languages unit –Set complement –Set intersection, union, difference,
1 Module 12 Computation and Configurations –Formal Definition –Examples.
WELCOME TO A JOURNEY TO CS419 Dr. Hussien Sharaf Dr. Mohammad Nassef Department of Computer Science, Faculty of Computers and Information, Cairo University.
Theory of Languages and Automata By: Mojtaba Khezrian.
Recap: Nondeterministic Finite Automaton (NFA) A deterministic finite automaton (NFA) is a 5-tuple (Q, , ,s,F) where: Q is a finite set of elements called.
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
Pushdown Automata.
Chapter 2 FINITE AUTOMATA.
CSC 4170 Theory of Computation Nondeterminism Section 1.2.
Hierarchy of languages
CSE322 Finite Automata Lecture #2.
Non-Determinism 12CS45 Finite Automata.
Principles of Computing – UFCFA3-30-1
COSC 3340: Introduction to Theory of Computation
Non-Deterministic Finite Automata
NFAs and Transition Graphs
Finite Automata Reading: Chapter 2.
Instructor: Aaron Roth
Instructor: Aaron Roth
CSC 4170 Theory of Computation Nondeterminism Section 1.2.
CSC312 Automata Theory Transition Graphs Lecture # 9
Chapter 1 Regular Language
NFAs and Transition Graphs
More About Nondeterminism
Non Deterministic Automata
Lexical Analysis Uses formalism of Regular Languages
Part Two : Nondeterministic Finite Automata
Presentation transcript:

Nondeterministic Finite State Automata (Dr. Torng) NFA’s

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

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

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

Computation Graph (Tree) b a,b Computation Graph (Tree) 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, l) (2, l) (5, l)

Definition of ├ unchanged * b a,b Definition of ├ unchanged * 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, l) (2, l) (5, l) (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, l) (1, aaaaba)├* (5, l)

Acceptance and Rejection b a,b Acceptance and Rejection Input string aaaaba M accepts string x if one of the configurations reached is an accepting configuration (q0, x) ├* (f, l),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, l) (2, l) (5, l)

Comparison b a a,b a a b a b b FSA a b a,b NFA

Defining L(M) and LNFA M accepts string x if one of the configurations reached is an accepting configuration (q0, x) |-* (f, l),f in A M rejects string x if all configurations reached are either not halting configurations or are rejecting configurations L(M) N(M) LNFA Language L is in language class LNFA iff

Comparing language classes LFSA subset of LNFA

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

Visualization L L LFSA LNFA M M’ FSA’s NFA’s 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 M LFSA LNFA FSA’s NFA’s M’

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