Finite Automata and Regular Languages (part II)
|
|
- Cecil Lucas
- 6 years ago
- Views:
Transcription
1 Finite Automata and Regular Languages (part II) Prof. Dan A. Simovici UMB 1 / 25
2 Outline 1 Nondeterministic Automata 2 / 25
3 Definition A nondeterministic finite automaton (ndfa) is a quintuple M = (A, Q, δ, q 0, F ), where A is the input alphaet of M, Q is a finite set of states, δ : Q A P(Q) is the transition function, q 0 Q is the initial state, and F Q is the set of final states of M. We assume A Q =. 3 / 25
4 Example Consider the ndfa M = ({a, }, {q 0, q 1, q 2, q 2, q 4 }, δ, q 0, {q 1, q 3 }), whose transition function is defined y the tale: State Input q 0 q 1 q 2 q 3 q 4 a {q 1, q 2 } {q 3 } {q 0 } {q 3 } {q 4 } Note the presence of pairs (q, a) such that δ(q, a) =. We refer to such pairs as locking situations of M. For instance, (q 1, a) is a locking situation of M. 4 / 25
5 Extending the transition function for an ndfa As in the case of the dfa, we can extend the ndfa s transition function δ, defined on single characters, to δ, defined on words. Starting from the transition function δ, we define the function δ : Q A P(Q) as follows: δ (q, λ) = {q} δ (q, xa) = q δ (q,x) δ(q, a) 5 / 25
6 Graphs of ndfas If M = (A, Q, δ, q 0, F ) is an ndfa, then the graph of M is the marked, directed multigraph G(M), whose set of vertices is the set of states Q. The set of edges of G(M) consists of all pairs (q, q ) such that q δ(q, a) for some a A; an edge (q, q ) is laeled y the input symol a, where q δ(q, a). The initial state q 0 is denoted y an incoming arrow with no source, and the final states are circled. If q δ (q, x), then there is a path in the graph G(M) laeled y x that leads from q to q. 6 / 25
7 q 1 q 3 a a q 0 a q 2 q 4 7 / 25
8 Comparing dfas and ndfas In the graph of a dfa M = (A, Q, δ, q 0, F ) you must have exactly one edge emerging from every state q and for every input symol a A. a q 37 c d In the graph of an ndfa M = (A, Q, δ, q 0, F ) you may have states where no arrow emerges, or states where several arrow laeled with the same symol emerge. Also, not every symol needs to appear as a lael of an emerging edge. q No arrow emerges from q a q 7 3 a 8 / 25
9 Definition The language accepted y the ndfa M = (A, Q, δ, q 0, F ) is L(M) = {x A δ (q 0, x) F }. In other words, x L(M) if there exists a path in the graph of M laeled y x that leads from the initial state into one of the final states. Note that it is not necessary that all paths laeled y x lead to a final state; the existence of one such path suffices to put x into the language L(M). 9 / 25
10 Example q 1 q 3 a a q 0 a q 2 q 4 Note that a L(M) ecause of the existence of the path (q 0, q 1, q 3 ) laeled y this word and the fact that q 3 is a final state. On the other hand, (q 0, q 2, q 4 ) is another path laeled y x ut q 4 F. 10 / 25
11 Example (cont d) This ndfa is simple enough to allow an easy identification of all types of words in L(M): 1 The final state q 1 can e reached y applying an aritrary numer of s followed y an a. 2 The final state q 3 can e reached y a path of the form (q 0,..., q 0, q 1, q 3 ), that is y a word of the form k a for k N. 3 The same final state q 3 can e reached via q 2. Input words that allow this transition have the form k aa for k N. Thus, we have L(M) = {} a {} a {} aa = {} {a, a, aa}. 11 / 25
12 Example Consider an alphaet A = {a 0,..., a n 1 } and a inary relation ρ A A. The language L ρ = {a i0 a ip p N, (a ij, a ij+1 ) ρ for 0 j p 1} is accepted y the ndfa M ρ = (A, Q, δ, q, F ), where Q = {q, q 0,..., q n 1 }, F = {q 0,..., q n 1 }, and δ is given y δ(q, a i ) = {q i } for 0 i n 1; for every i, j such that 0 i, j n 1, δ(q i, a j ) = {q j Q (a i, a j ) ρ}. 12 / 25
13 Example (cont d) Note that if (a i, a j ) ρ, then (q i, a j ) is a locking situation. The existence of these locking situations is precisely what makes this device a nondeterministic automaton. q 0 a 0. q i a i a j. a j q q j a n 1. q n 1 13 / 25
14 We show that L ρ = L(M ρ ). Let x = a i0 a ip e a word in L ρ with p 0. We prove y induction on p = x 1 that x L(M ρ ) and that δ (q, x) = {q ip }. The ase case, p = 0, is immediate, since the condition (a ij, a ij+1 ) ρ for 0 j p 1 is vacuous. Suppose that the statement holds for words in L ρ of length at most p and let x = a i0 a ip e a word in L ρ of length p + 1. It is clear that the word y = a i0 a ip 1 elongs to L ρ. By the inductive hypothesis, y L(M ρ ) and δ (q, y) = {q ip 1 }. Since (a ip 1, a ip ) ρ (y the definition of L ρ ), we have δ(q ip 1, a ip ) = {q ip }, so q ip Therefore, x L(M ρ ). q δ(q,y) δ(q, a ip ) = δ (q, ya ip ) = δ (q, x). 14 / 25
15 To prove the converse inclusion L(M ρ ) L ρ we use an argument y induction on x 1, where x is a word from L(M ρ ), to show that if x = a i0 a ip L(M ρ ), then δ (q, x) = {q ip } and x L ρ. Again, the ase case is immediate. Suppose that the statement holds for words in L(M ρ ) of length less than p + 1 that elong to L ρ, and let x = a i0 a ip e a word in L(M ρ ) of length p + 1. If y = a i0... a ip 1, it is easy to see that y L(M ρ ) ecause no locking situation may arise in M ρ while the symols of y are read. Therefore, y the inductive hypothesis, y L ρ and δ (q, y) = {q ip 1 }. Further, since δ(q ip 1, a ip ), it follows that (a ip 1, a ip ) ρ, so x L ρ, and δ (q, x) = q ip. Thus, L ρ is accepted y the ndfa M ρ. 15 / 25
16 Let M = (A, Q, δ, q 0, F ) e a nondeterministic automaton, and let : P(Q) A P(Q) e defined y (S, a) = q S δ(q, a) (1) for every S Q and a A. Starting from, we define : P(Q) A P(Q) in the manner used for the transition functions of deterministic automata. Namely, we define for every S Q and a A. (S, λ) = S (2) (S, xa) = ( (S, x), a) (3) 16 / 25
17 Lemma The functions and defined aove satisfy the following properties: 1 For every family of sets {S 0,..., S n 1 } and every a A, we have: 0 i n 1 S i, a = 2 For every set S Q and x A we have (S, x) = q S 0 i n 1 δ (q, x). (S i, a). 17 / 25
18 Proof The first part of the lemma is immediate, ecause ( 0 i n 1 S i, a) = {δ(q, a) q 0 i n 1 S i} = 0 i n 1 {δ(q, a) q S i} = 0 i n 1 (S i, a). 18 / 25
19 The argument for the second part of the lemma is y induction on x. For the asis step, we have x = 0, so x = λ, and (S, λ) = S, q S δ (q, λ) = q S {q} = S. Suppose that the argument holds for words of length n, and let x = za e a word of length n + 1. We have (S, x) = (S, za) = ( (S, z), a) = ( q S δ (q, z), a)(y ind. hyp.) = (δ (q, z), a) q S = δ(r, a) = δ (q, za) = δ (q, x). q S r δ (q,z) q S q S 19 / 25
20 Nondeterministic automata can e regarded as generalizations of deterministic automata in the following sense. If M = (A, Q, δ, q 0, F ) is a deterministic automaton, consider a nondeterministic automaton M = (A, Q, δ, q 0, F ), where δ (q, a) = {δ(q, a)}. It is easy to verify that for every q Q and x A we have δ (q, x) = {δ (q, x)}. Therefore, L(M ) = {x A δ (q0, x) F } = {x A {δ (q 0, x)} F } = {x A δ (q 0, x) F } = L(M). In other words, for every deterministic finite automaton there exists a nondeterministic one that recognizes the same language. 20 / 25
21 Theorem For every nondeterministic automaton, there exists a deterministic automaton that accepts the same language. 21 / 25
22 Proof Let M = (A, Q, δ, q 0, F ) e a nondeterministic automaton. Define the function as in the equality (S, a) = q S δ(q, a), and consider the deterministic automaton M = (A, P(Q),, {q 0 }, {S S Q and S F }). For every x A we have the following equivalent statements: 1 x L(M); 2 δ (q 0, x) F ; 3 ({q 0 }, x) F ; 4 x L(M ). This proves that L(M) = L(M ). 22 / 25
23 Example Consider the nondeterministic finite automaton whose graph is given elow. M = ({a, }, {q 0, q 1, q 2 }, δ, q 0, {q 2 }) a q 0 q 1 q 2 a 23 / 25
24 It is easy to see that the language accepted y this automaton is A A, that is the language that consists of all words that contain two consecutive symols. The graph of the nondeterministic automaton is simpler than the graph of the previous deterministic automaton; this simplification is made possile y the nondeterminism. 24 / 25
25 Graph of the Equivalent ndfa a a {q 0 } {q 0, q 1 } a a {q 1 } {q 1, q 2 } {q 0, q 1, q 2 } a a {q 2 } {q 0, q 2 } a a 25 / 25
Finite Automata and Regular Languages (part III)
Finite Automata and Regular Languages (part III) Prof. Dan A. Simovici UMB 1 / 1 Outline 2 / 1 Nondeterministic finite automata can be further generalized by allowing transitions between states without
More informationCS 4120 Lecture 3 Automating lexical analysis 29 August 2011 Lecturer: Andrew Myers. 1 DFAs
CS 42 Lecture 3 Automating lexical analysis 29 August 2 Lecturer: Andrew Myers A lexer generator converts a lexical specification consisting of a list of regular expressions and corresponding actions into
More informationLanguages. A language is a set of strings. String: A sequence of letters. Examples: cat, dog, house, Defined over an alphabet:
Languages 1 Languages A language is a set of strings String: A sequence of letters Examples: cat, dog, house, Defined over an alphaet: a,, c,, z 2 Alphaets and Strings We will use small alphaets: Strings
More informationTheory of Computation (I) Yijia Chen Fudan University
Theory of Computation (I) Yijia Chen Fudan University Instructor Yijia Chen Homepage: http://basics.sjtu.edu.cn/~chen Email: yijiachen@fudan.edu.cn Textbook Introduction to the Theory of Computation Michael
More informationM = (Q,Σ,δ,q 0,F) Σ is the alphabet over which the transitions are defined.
LECTURE 23 10.1 Formal Definition of a DFA Definition 10.1 A Deterministic Finite Automaton (DFA) M, is a five-tuple: where M = (Q,Σ,δ, 0,F) Q is a finite set of states. It is important that the set of
More informationAutomata and Formal Languages - CM0081 Non-Deterministic Finite Automata
Automata and Formal Languages - CM81 Non-Deterministic Finite Automata Andrés Sicard-Ramírez Universidad EAFIT Semester 217-2 Non-Deterministic Finite Automata (NFA) Introduction q i a a q j a q k The
More informationNondeterminism and Epsilon Transitions
Nondeterminism and Epsilon Transitions Mridul Aanjaneya Stanford University June 28, 22 Mridul Aanjaneya Automata Theory / 3 Challenge Problem Question Prove that any square with side length a power of
More informationcse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska
cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska LECTURE 6 CHAPTER 2 FINITE AUTOMATA 2. Nondeterministic Finite Automata NFA 3. Finite Automata and Regular Expressions 4. Languages
More informationNondeterministic Finite Automata
Nondeterministic Finite Automata Not A DFA Does not have exactly one transition from every state on every symbol: Two transitions from q 0 on a No transition from q 1 (on either a or b) Though not a DFA,
More informationChapter Five: Nondeterministic Finite Automata
Chapter Five: Nondeterministic Finite Automata From DFA to NFA A DFA has exactly one transition from every state on every symbol in the alphabet. By relaxing this requirement we get a related but more
More informationCSE 135: Introduction to Theory of Computation Nondeterministic Finite Automata (cont )
CSE 135: Introduction to Theory of Computation Nondeterministic Finite Automata (cont ) Sungjin Im University of California, Merced 2-3-214 Example II A ɛ B ɛ D F C E Example II A ɛ B ɛ D F C E NFA accepting
More informationNondeterministic Finite Automata
Nondeterministic Finite Automata Lecture 6 Section 2.2 Robb T. Koether Hampden-Sydney College Mon, Sep 5, 2016 Robb T. Koether (Hampden-Sydney College) Nondeterministic Finite Automata Mon, Sep 5, 2016
More informationFinite Automata. BİL405 - Automata Theory and Formal Languages 1
Finite Automata BİL405 - Automata Theory and Formal Languages 1 Deterministic Finite Automata (DFA) A Deterministic Finite Automata (DFA) is a quintuple A = (Q,,, q 0, F) 1. Q is a finite set of states
More informationTheory of Languages and Automata
Theory of Languages and Automata Chapter 1- Regular Languages & Finite State Automaton Sharif University of Technology Finite State Automaton We begin with the simplest model of Computation, called finite
More informationCISC 4090: Theory of Computation Chapter 1 Regular Languages. Section 1.1: Finite Automata. What is a computer? Finite automata
CISC 4090: Theory of Computation Chapter Regular Languages Xiaolan Zhang, adapted from slides by Prof. Werschulz Section.: Finite Automata Fordham University Department of Computer and Information Sciences
More informationComputer Sciences Department
1 Reference Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER 3 objectives Finite automaton Infinite automaton Formal definition State diagram Regular and Non-regular
More information1.3 Regular Expressions
51 1.3 Regular Expressions These have an important role in descriing patterns in searching for strings in many applications (e.g. awk, grep, Perl,...) All regular expressions of alphaet are 1.Øand are
More informationcse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska
cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska LECTURE 5 CHAPTER 2 FINITE AUTOMATA 1. Deterministic Finite Automata DFA 2. Nondeterministic Finite Automata NDFA 3. Finite Automata
More informationFinite Automata and Regular languages
Finite Automata and Regular languages Huan Long Shanghai Jiao Tong University Acknowledgements Part of the slides comes from a similar course in Fudan University given by Prof. Yijia Chen. http://basics.sjtu.edu.cn/
More informationCS 154. Finite Automata, Nondeterminism, Regular Expressions
CS 54 Finite Automata, Nondeterminism, Regular Expressions Read string left to right The DFA accepts a string if the process ends in a double circle A DFA is a 5-tuple M = (Q, Σ, δ, q, F) Q is the set
More informationLecture 3: Nondeterministic Finite Automata
Lecture 3: Nondeterministic Finite Automata September 5, 206 CS 00 Theory of Computation As a recap of last lecture, recall that a deterministic finite automaton (DFA) consists of (Q, Σ, δ, q 0, F ) where
More informationCS 154, Lecture 2: Finite Automata, Closure Properties Nondeterminism,
CS 54, Lecture 2: Finite Automata, Closure Properties Nondeterminism, Why so Many Models? Streaming Algorithms 0 42 Deterministic Finite Automata Anatomy of Deterministic Finite Automata transition: for
More informationSeptember 11, Second Part of Regular Expressions Equivalence with Finite Aut
Second Part of Regular Expressions Equivalence with Finite Automata September 11, 2013 Lemma 1.60 If a language is regular then it is specified by a regular expression Proof idea: For a given regular language
More informationFinite Automata. Finite Automata
Finite Automata Finite Automata Formal Specification of Languages Generators Grammars Context-free Regular Regular Expressions Recognizers Parsers, Push-down Automata Context Free Grammar Finite State
More informationRecitation 2 - Non Deterministic Finite Automata (NFA) and Regular OctoberExpressions
Recitation 2 - Non Deterministic Finite Automata (NFA) and Regular Expressions Orit Moskovich Gal Rotem Tel Aviv University October 28, 2015 Recitation 2 - Non Deterministic Finite Automata (NFA) and Regular
More informationFORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
5-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY NON-DETERMINISM and REGULAR OPERATIONS THURSDAY JAN 6 UNION THEOREM The union of two regular languages is also a regular language Regular Languages Are
More informationFinite Automata. Seungjin Choi
Finite Automata Seungjin Choi Department of Computer Science and Engineering Pohang University of Science and Technology 77 Cheongam-ro, Nam-gu, Pohang 37673, Korea seungjin@postech.ac.kr 1 / 28 Outline
More informationTheory of Computation (II) Yijia Chen Fudan University
Theory of Computation (II) Yijia Chen Fudan University Review A language L is a subset of strings over an alphabet Σ. Our goal is to identify those languages that can be recognized by one of the simplest
More informationPseudo-automata for generalized regular expressions
Pseudo-automata for generalized regular expressions B. F. Melnikov A. A. Melnikova Astract In this paper we introduce a new formalism which is intended for representing a special extensions of finite automata.
More informationCS243, Logic and Computation Nondeterministic finite automata
CS243, Prof. Alvarez NONDETERMINISTIC FINITE AUTOMATA (NFA) Prof. Sergio A. Alvarez http://www.cs.bc.edu/ alvarez/ Maloney Hall, room 569 alvarez@cs.bc.edu Computer Science Department voice: (67) 552-4333
More informationChapter 2: Finite Automata
Chapter 2: Finite Automata 2.1 States, State Diagrams, and Transitions Finite automaton is the simplest acceptor or recognizer for language specification. It is also the simplest model of a computer. A
More informationIntroduction to Formal Languages, Automata and Computability p.1/51
Introduction to Formal Languages, Automata and Computability Finite State Automata K. Krithivasan and R. Rama Introduction to Formal Languages, Automata and Computability p.1/51 Introduction As another
More informationNondeterministic Finite Automata
Nondeterministic Finite Automata Mahesh Viswanathan Introducing Nondeterminism Consider the machine shown in Figure. Like a DFA it has finitely many states and transitions labeled by symbols from an input
More informationAutomata and Languages
Automata and Languages Prof. Mohamed Hamada Software Engineering Lab. The University of Aizu Japan Nondeterministic Finite Automata with empty moves (-NFA) Definition A nondeterministic finite automaton
More informationUNIT-III REGULAR LANGUAGES
Syllabus R9 Regulation REGULAR EXPRESSIONS UNIT-III REGULAR LANGUAGES Regular expressions are useful for representing certain sets of strings in an algebraic fashion. In arithmetic we can use the operations
More informationComputational Theory
Computational Theory Finite Automata and Regular Languages Curtis Larsen Dixie State University Computing and Design Fall 2018 Adapted from notes by Russ Ross Adapted from notes by Harry Lewis Curtis Larsen
More informationAutomata, Logic and Games: Theory and Application
Automata, Logic and Games: Theory and Application 2 Parity Games, Tree Automata, and S2S Luke Ong University of Oxford TACL Summer School University of Salerno, 14-19 June 2015 Luke Ong S2S 14-19 June
More informationCS 455/555: Finite automata
CS 455/555: Finite automata Stefan D. Bruda Winter 2019 AUTOMATA (FINITE OR NOT) Generally any automaton Has a finite-state control Scans the input one symbol at a time Takes an action based on the currently
More informationPlan for Today and Beginning Next week (Lexical Analysis)
Plan for Today and Beginning Next week (Lexical Analysis) Regular Expressions Finite State Machines DFAs: Deterministic Finite Automata Complications NFAs: Non Deterministic Finite State Automata From
More informationChap. 1.2 NonDeterministic Finite Automata (NFA)
Chap. 1.2 NonDeterministic Finite Automata (NFA) DFAs: exactly 1 new state for any state & next char NFA: machine may not work same each time More than 1 transition rule for same state & input Any one
More informationGrammars (part II) Prof. Dan A. Simovici UMB
rammars (part II) Prof. Dan A. Simovici UMB 1 / 1 Outline 2 / 1 Length-Increasing vs. Context-Sensitive rammars Theorem The class L 1 equals the class of length-increasing languages. 3 / 1 Length-Increasing
More informationCSE 135: Introduction to Theory of Computation Nondeterministic Finite Automata
CSE 135: Introduction to Theory of Computation Nondeterministic Finite Automata Sungjin Im University of California, Merced 1-27-215 Nondeterminism Michael Rabin and Dana Scott (1959) Michael Rabin Dana
More informationT (s, xa) = T (T (s, x), a). The language recognized by M, denoted L(M), is the set of strings accepted by M. That is,
Recall A deterministic finite automaton is a five-tuple where S is a finite set of states, M = (S, Σ, T, s 0, F ) Σ is an alphabet the input alphabet, T : S Σ S is the transition function, s 0 S is the
More informationReversal of regular languages and state complexity
Reversal of regular languages and state complexity Juraj Šeej Institute of Computer Science, Faculty of Science, P. J. Šafárik University Jesenná 5, 04001 Košice, Slovakia juraj.seej@gmail.com Astract.
More informationInf2A: Converting from NFAs to DFAs and Closure Properties
1/43 Inf2A: Converting from NFAs to DFAs and Stuart Anderson School of Informatics University of Edinburgh October 13, 2009 Starter Questions 2/43 1 Can you devise a way of testing for any FSM M whether
More informationChapter 2: Finite Automata
Chapter 2: Finite Automata Peter Cappello Department of Computer Science University of California, Santa Barbara Santa Barbara, CA 93106 cappello@cs.ucsb.edu Please read the corresponding chapter before
More informationNondeterministic finite automata
Lecture 3 Nondeterministic finite automata This lecture is focused on the nondeterministic finite automata (NFA) model and its relationship to the DFA model. Nondeterminism is an important concept in the
More informationNondeterministic Finite Automata. Nondeterminism Subset Construction
Nondeterministic Finite Automata Nondeterminism Subset Construction 1 Nondeterminism A nondeterministic finite automaton has the ability to be in several states at once. Transitions from a state on an
More informationOutline. Nondetermistic Finite Automata. Transition diagrams. A finite automaton is a 5-tuple (Q, Σ,δ,q 0,F)
Outline Nondeterminism Regular expressions Elementary reductions http://www.cs.caltech.edu/~cs20/a October 8, 2002 1 Determistic Finite Automata A finite automaton is a 5-tuple (Q, Σ,δ,q 0,F) Q is a finite
More informationFinite Automata. Dr. Neil T. Dantam. Fall CSCI-561, Colorado School of Mines. Dantam (Mines CSCI-561) Finite Automata Fall / 35
Finite Automata Dr. Neil T. Dantam CSCI-561, Colorado School of Mines Fall 2017 Dantam (Mines CSCI-561) Finite Automata Fall 2017 1 / 35 Outline Dantam (Mines CSCI-561) Finite Automata Fall 2017 2 / 35
More informationcse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska
cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska LECTURE 6a REVIEW for Q2 Q2 covers Lecture 5 and Lecture 6 Chapter 2 - Deterministic Finite Automata DFA Chapter 2 - Nondeterministic
More informationLecture 1: Finite State Automaton
Lecture 1: Finite State Automaton Instructor: Ketan Mulmuley Scriber: Yuan Li January 6, 2015 1 Deterministic Finite Automaton Informally, a deterministic finite automaton (DFA) has finite number of s-
More informationFinite Automata. Mahesh Viswanathan
Finite Automata Mahesh Viswanathan In this lecture, we will consider different models of finite state machines and study their relative power. These notes assume that the reader is familiar with DFAs,
More informationLanguages. Non deterministic finite automata with ε transitions. First there was the DFA. Finite Automata. Non-Deterministic Finite Automata (NFA)
Languages Non deterministic finite automata with ε transitions Recall What is a language? What is a class of languages? Finite Automata Consists of A set of states (Q) A start state (q o ) A set of accepting
More informationUNIT-II. NONDETERMINISTIC FINITE AUTOMATA WITH ε TRANSITIONS: SIGNIFICANCE. Use of ε-transitions. s t a r t. ε r. e g u l a r
Syllabus R9 Regulation UNIT-II NONDETERMINISTIC FINITE AUTOMATA WITH ε TRANSITIONS: In the automata theory, a nondeterministic finite automaton (NFA) or nondeterministic finite state machine is a finite
More informationExamples of Regular Expressions. Finite Automata vs. Regular Expressions. Example of Using flex. Application
Examples of Regular Expressions 1. 0 10, L(0 10 ) = {w w contains exactly a single 1} 2. Σ 1Σ, L(Σ 1Σ ) = {w w contains at least one 1} 3. Σ 001Σ, L(Σ 001Σ ) = {w w contains the string 001 as a substring}
More informationUnit 6. Non Regular Languages The Pumping Lemma. Reading: Sipser, chapter 1
Unit 6 Non Regular Languages The Pumping Lemma Reading: Sipser, chapter 1 1 Are all languages regular? No! Most of the languages are not regular! Why? A finite automaton has limited memory. How can we
More informationSeptember 7, Formal Definition of a Nondeterministic Finite Automaton
Formal Definition of a Nondeterministic Finite Automaton September 7, 2014 A comment first The formal definition of an NFA is similar to that of a DFA. Both have states, an alphabet, transition function,
More informationFinite Automata and Regular Languages
Finite Automata and Regular Languages Topics to be covered in Chapters 1-4 include: deterministic vs. nondeterministic FA, regular expressions, one-way vs. two-way FA, minimization, pumping lemma for regular
More informationCOMP-330 Theory of Computation. Fall Prof. Claude Crépeau. Lec. 9 : Myhill-Nerode Theorem and applications
COMP-33 Theory of Computation Fall 217 -- Prof. Claude Crépeau Lec. 9 : Myhill-Nerode Theorem and applications COMP 33 Fall 212: Lectures Schedule 1-2. Introduction 1.5. Some basic mathematics 2-3. Deterministic
More informationNondeterminism. September 7, Nondeterminism
September 7, 204 Introduction is a useful concept that has a great impact on the theory of computation Introduction is a useful concept that has a great impact on the theory of computation So far in our
More informationC2.1 Regular Grammars
Theory of Computer Science March 22, 27 C2. Regular Languages: Finite Automata Theory of Computer Science C2. Regular Languages: Finite Automata Malte Helmert University of Basel March 22, 27 C2. Regular
More informationAutomata Theory, Computability and Complexity
Automata Theory, Computability and Complexity Mridul Aanjaneya Stanford University June 26, 22 Mridul Aanjaneya Automata Theory / 64 Course Staff Instructor: Mridul Aanjaneya Office Hours: 2:PM - 4:PM,
More informationLecture 4 Nondeterministic Finite Accepters
Lecture 4 Nondeterministic Finite Accepters COT 4420 Theory of Computation Section 2.2, 2.3 Nondeterminism A nondeterministic finite automaton can go to several states at once. Transitions from one state
More informationC2.1 Regular Grammars
Theory of Computer Science March 6, 26 C2. Regular Languages: Finite Automata Theory of Computer Science C2. Regular Languages: Finite Automata Malte Helmert University of Basel March 6, 26 C2. Regular
More informationFinite Automata. Dr. Neil T. Dantam. Fall CSCI-561, Colorado School of Mines. Dantam (Mines CSCI-561) Finite Automata Fall / 43
Finite Automata Dr. Neil T. Dantam CSCI-561, Colorado School of Mines Fall 2018 Dantam (Mines CSCI-561) Finite Automata Fall 2018 1 / 43 Outline Languages Review Traffic Light Example Deterministic Finite
More informationIntroduction to the Theory of Computation. Automata 1VO + 1PS. Lecturer: Dr. Ana Sokolova.
Introduction to the Theory of Computation Automata 1VO + 1PS Lecturer: Dr. Ana Sokolova http://cs.uni-salzburg.at/~anas/ Setup and Dates Lectures and Instructions 23.10. 3.11. 17.11. 24.11. 1.12. 11.12.
More informationClosure under the Regular Operations
September 7, 2013 Application of NFA Now we use the NFA to show that collection of regular languages is closed under regular operations union, concatenation, and star Earlier we have shown this closure
More informationGrammars (part I) Prof. Dan A. Simovici UMB
rammars (part I) Prof. Dan A. Simovici UMB 1 / 36 Outline 1 rammars and Chomsky s Hierachy 2 Productions and Derivations in rammars 3 Chomsky s Hierachy 4 Equivalent rammars 2 / 36 Outline Language classes
More informationChapter 6: NFA Applications
Chapter 6: NFA Applications Implementing NFAs The problem with implementing NFAs is that, being nondeterministic, they define a more complex computational procedure for testing language membership. To
More informationAutomata Theory. Lecture on Discussion Course of CS120. Runzhe SJTU ACM CLASS
Automata Theory Lecture on Discussion Course of CS2 This Lecture is about Mathematical Models of Computation. Why Should I Care? - Ways of thinking. - Theory can drive practice. - Don t be an Instrumentalist.
More informationIntroduction to the Theory of Computation. Automata 1VO + 1PS. Lecturer: Dr. Ana Sokolova.
Introduction to the Theory of Computation Automata 1VO + 1PS Lecturer: Dr. Ana Sokolova http://cs.uni-salzburg.at/~anas/ Setup and Dates Lectures Tuesday 10:45 pm - 12:15 pm Instructions Tuesday 12:30
More informationDeterministic Finite Automata. Non deterministic finite automata. Non-Deterministic Finite Automata (NFA) Non-Deterministic Finite Automata (NFA)
Deterministic Finite Automata Non deterministic finite automata Automata we ve been dealing with have been deterministic For every state and every alphabet symbol there is exactly one move that the machine
More informationarxiv: v1 [cs.fl] 4 Feb 2013
Incomplete Transition Complexity of Basic Operations on Finite Languages Eva Maia, Nelma Moreira, Rogério Reis arxiv:1302.0750v1 [cs.fl] 4 Fe 2013 CMUP & DCC, Faculdade de Ciências da Universidade do Porto
More information2017/08/29 Chapter 1.2 in Sipser Ø Announcement:
Nondeterministic Human-aware Finite Robo.cs Automata 2017/08/29 Chapter 1.2 in Sipser Ø Announcement: q Piazza registration: http://piazza.com/asu/fall2017/cse355 q First poll will be posted on Piazza
More informationTheory of Computation
Thomas Zeugmann Hokkaido University Laboratory for Algorithmics http://www-alg.ist.hokudai.ac.jp/ thomas/toc/ Lecture 3: Finite State Automata Motivation In the previous lecture we learned how to formalize
More information(Refer Slide Time: 0:21)
Theory of Computation Prof. Somenath Biswas Department of Computer Science and Engineering Indian Institute of Technology Kanpur Lecture 7 A generalisation of pumping lemma, Non-deterministic finite automata
More informationLet us first give some intuitive idea about a state of a system and state transitions before describing finite automata.
Finite Automata Automata (singular: automation) are a particularly simple, but useful, model of computation. They were initially proposed as a simple model for the behavior of neurons. The concept of a
More informationWhat we have done so far
What we have done so far DFAs and regular languages NFAs and their equivalence to DFAs Regular expressions. Regular expressions capture exactly regular languages: Construct a NFA from a regular expression.
More informationacs-04: Regular Languages Regular Languages Andreas Karwath & Malte Helmert Informatik Theorie II (A) WS2009/10
Regular Languages Andreas Karwath & Malte Helmert 1 Overview Deterministic finite automata Regular languages Nondeterministic finite automata Closure operations Regular expressions Nonregular languages
More informationCSE 105 Homework 1 Due: Monday October 9, Instructions. should be on each page of the submission.
CSE 5 Homework Due: Monday October 9, 7 Instructions Upload a single file to Gradescope for each group. should be on each page of the submission. All group members names and PIDs Your assignments in this
More informationPushdown Automata. We have seen examples of context-free languages that are not regular, and hence can not be recognized by finite automata.
Pushdown Automata We have seen examples of context-free languages that are not regular, and hence can not be recognized by finite automata. Next we consider a more powerful computation model, called a
More informationProofs, Strings, and Finite Automata. CS154 Chris Pollett Feb 5, 2007.
Proofs, Strings, and Finite Automata CS154 Chris Pollett Feb 5, 2007. Outline Proofs and Proof Strategies Strings Finding proofs Example: For every graph G, the sum of the degrees of all the nodes in G
More informationChapter Two: Finite Automata
Chapter Two: Finite Automata In theoretical computer science, automata theory is the study of abstract machines (or more appropriately, abstract 'mathematical' machines or systems) and the computational
More informationRecap DFA,NFA, DTM. Slides by Prof. Debasis Mitra, FIT.
Recap DFA,NFA, DTM Slides by Prof. Debasis Mitra, FIT. 1 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
More informationLecture 2: Regular Expression
Lecture 2: Regular Expression Instructor: Ketan Mulmuley Scriber: Yuan Li January 8, 2015 In the last lecture, we proved that DFA, NFA, and NFA with ϵ-moves are equivalent. Recall that a language L Σ is
More informationCourse 4 Finite Automata/Finite State Machines
Course 4 Finite Automata/Finite State Machines The structure and the content of the lecture is based on (1) http://www.eecs.wsu.edu/~ananth/cpts317/lectures/index.htm, (2) W. Schreiner Computability and
More informationClasses and conversions
Classes and conversions Regular expressions Syntax: r = ε a r r r + r r Semantics: The language L r of a regular expression r is inductively defined as follows: L =, L ε = {ε}, L a = a L r r = L r L r
More informationCSC236 Week 10. Larry Zhang
CSC236 Week 10 Larry Zhang 1 Today s Topic Deterministic Finite Automata (DFA) 2 Recap of last week We learned a lot of terminologies alphabet string length of string union concatenation Kleene star language
More informationCS 530: Theory of Computation Based on Sipser (second edition): Notes on regular languages(version 1.1)
CS 530: Theory of Computation Based on Sipser (second edition): Notes on regular languages(version 1.1) Definition 1 (Alphabet) A alphabet is a finite set of objects called symbols. Definition 2 (String)
More informationSri vidya college of engineering and technology
Unit I FINITE AUTOMATA 1. Define hypothesis. The formal proof can be using deductive proof and inductive proof. The deductive proof consists of sequence of statements given with logical reasoning in order
More informationHKN CS/ECE 374 Midterm 1 Review. Nathan Bleier and Mahir Morshed
HKN CS/ECE 374 Midterm 1 Review Nathan Bleier and Mahir Morshed For the most part, all about strings! String induction (to some extent) Regular languages Regular expressions (regexps) Deterministic finite
More informationComputational Models - Lecture 5 1
Computational Models - Lecture 5 1 Handout Mode Iftach Haitner and Yishay Mansour. Tel Aviv University. April 10/22, 2013 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice
More informationTheory of computation: initial remarks (Chapter 11)
Theory of computation: initial remarks (Chapter 11) For many purposes, computation is elegantly modeled with simple mathematical objects: Turing machines, finite automata, pushdown automata, and such.
More informationHarvard CS 121 and CSCI E-207 Lecture 4: NFAs vs. DFAs, Closure Properties
Harvard CS 121 and CSCI E-207 Lecture 4: NFAs vs. DFAs, Closure Properties Salil Vadhan September 13, 2012 Reading: Sipser, 1.2. How to simulate NFAs? NFA accepts w if there is at least one accepting computational
More informationNon Determinism of Finite Automata
Non Determinism of Finite Automata Akshit Chauhan 1, Deepak Kumar 2, Deepak Chandel 3, 1,2,3 CSE Department DCE Gurgaon Abstract: The basic finite automata model has been extended over the years with different
More informationCS 420, Spring 2018 Homework 4 Solutions. 1. Use the Pumping Lemma to show that the following languages are not regular: (a) {0 2n 10 n n 0};
CS 420, Spring 2018 Homework 4 Solutions 1. Use the Pumping Lemma to show that the following languages are not regular: (a) {0 2n 10 n n 0}; Solution: Given p 1, choose s = 0 2p 10 p. Then, s is in the
More informationSubset construction. We have defined for a DFA L(A) = {x Σ ˆδ(q 0, x) F } and for A NFA. For any NFA A we can build a DFA A D such that L(A) = L(A D )
Search algorithm Clever algorithm even for a single word Example: find abac in abaababac See Knuth-Morris-Pratt and String searching algorithm on wikipedia 2 Subset construction We have defined for a DFA
More informationOctober 6, Equivalence of Pushdown Automata with Context-Free Gramm
Equivalence of Pushdown Automata with Context-Free Grammar October 6, 2013 Motivation Motivation CFG and PDA are equivalent in power: a CFG generates a context-free language and a PDA recognizes a context-free
More informationNon-deterministic Finite Automata (NFAs)
Algorithms & Models of Computation CS/ECE 374, Fall 27 Non-deterministic Finite Automata (NFAs) Part I NFA Introduction Lecture 4 Thursday, September 7, 27 Sariel Har-Peled (UIUC) CS374 Fall 27 / 39 Sariel
More information