# Nondeterministic Finite Automata

Save this PDF as:

Size: px
Start display at page:

## Transcription

1 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 alphabet (in this case {, }). However, it has important differences when compared with the DFA model we have seen.,, q q q q p Figure : Nondeterministic automaton N State q has two outgoing transitions labeled. States q, and q have missing transitions. q has no transition labeled, while q has no transition labeled. State q has a transition that is labeled not by an input symbol in {, } but by. This is an example of what is called a nondeterministic finite automaton (NFA). Intuitvely, such a machine could have many possible computations on a given input. For example, on an input of the form uv, it is possible for the machine to reach the accepting state q p by transitioning from q to q after reading u. Similarly, it is possible for the machine to reach q p also on the input uv for this to happen, the machine stays in q as it reads u, transitions to q on reading after u, transitions to q without reading an input symbol by following the transition labeled, goes to q p on reading, and stays in q p while reading v. On the other hand, the machine also have other possible computations on both uv and uv it may stay in q and never transition out of it; or it may transition to q on reading u by following the -transition from q and die attempting to take a transition labeled (that doesn t exist) out of q. The fact that the machines behavior is not determined by the input string, is the reason these machines are called nondeterministic.. Nondeterministic Finite Automata (NFA) NFAs differ from DFAs in that (a) on an input symbol a, a given state may of,, or more than transition labeled a, and (b) they can take transitions without reading any symbol from the input; these are the -transitions. These features are captured in the following formal definition of an NFA. Definition. A nondeterministic finite automaton (NFA) is a M = (Q, Σ, δ, s, A) where Q is a finite set whose elements are called states, Beware: -transitions are not transitions taken on the symbol. is not a symbol! They are transitions that are taken without reading any symbol from the input.

3 q q q q q p X q q p q q q q p q q q X q Figure 2: Computation of NFA in Figure on. X denotes a thread dying because of the absence of any transtions. The input is accepted because there is an active thread (namely the leftmost one) that is in the accepting state q p. for each i, r i+ δ(r i, x i+ ), r k = q, and w = x x 2 x 3 x k Thus, a computation from p to q on input w is a sequence of states r,... r k and transition labels x... x k such that the first state r is p (condition ), the last state r k is q (condition 3), r i is that state reached after i steps, while x i is the label of the ith transition taken in this computation. Some of the steps in the computation could be taken without reading any input symbol (i.e., x i maybe ) but the requirement is that if concatenate all the symbols read during the computation in order then it constitutes the input string w (condition 4). To see how this definition captures the intuition of an NFA computation, consider the example NFA shown in Figure. We can show that q N q p by taking r = q, r = q, r 2 = q, r 3 = q p, r 4 = q p, r 5 = q p, and x =, x 2 =, x 3 =, x 4 =, x 5 =. This choice of states (r i s) and transition labels (x i s) satisfies the 4 conditions of a computation; in particular x x 2 x 5 = =. We can also show that q N q by choosing r = r = r 2 = r 3 = r 4 = q, and x =, x 2 =, x 3 =, and x 4 = ; in this second computation we do not take any -transitions. w Though the definition of p M q for NFAs is remarkably similar to that for DFAs there are some differences. The number of steps taken by a DFA is equal to the length of w as in each step one symbol is read from the input. This is reflected in the fact that the sequence of states constituting the DFA computation is one more than the length of w. For NFAs, however, since there can be steps that don t read any input symbol, the length of the computation (k = number of transitions) is at least w (rather than equal to w ). Like in the case of DFAs, it will be useful to introduce the function δm (p, w) that captures the behavior of machine M on input string w when started in state p. It will informally be the states of all active threads (in the parallel view) of M after reading all symbols in w. More precisely, the definition looks very similar to that for DFAs. Definition 3. δm (p, w) = {q Q p w M q}. It is useful to contrast Definition 3 with the corresponding one for DFAs.. In a DFA, because computation was completely determined by the input, there is a unique state the machine could be in after an input. This is reflected in the fact that δm for DFA returns a single state. 3

5 ,, 2 q # q,, 2,, 2 q s q # q q f 2,, 2 2 q 2 # q 2 Figure 3: NFA recognizing {w#c c occurs in w}. Read symbols of w Guess at some point that the string u is going to be seen Check that u is indeed read After reading u, read the rest of w To do this, the automaton will remember in its state what prefix of u it has seen so far; the initial state will assume that it has not seen any of u, and the final state is one where all the symbols of u have been observed. Formally, we can define this automaton as follows. Let u = a a 2 a n. The NFA M u = (Q, Σ, δ, s, A) where Q = {, a, a a 2, a a 2 a 3,..., a a 2 a n = u}. Thus, every prefix of u is a state of NFA M u. s =, A = {u}, And δ is given as follows {} if q =, a a {, a } if q =, a = a δ(q, a) = {a a 2 a i+ } if q = a a i ( i < n), a = a i+ {u} if q = u otherwise Example 3. Recall that for a string w {, }, lastk(w) denotes the last k symbols in w. That is, { w if w < k lastk(w) = v if w = uv where u Σ and v Σ k Recall the language L k is the set of all binary strings that have a k-positions from the end. That is, An NFA for L k will work as follows. L k = {w {, } lastk(w) = u where u {, } k } 5

7 active thread in a particular state. Thus, to simulate the NFA, the DFA only needs to maintain the current set of states of the NFA. The formal construction based on the above idea is as follows. Consider an NFA N = (Q, Σ, δ, s, A). Define the DFA det(n) = (Q, Σ, δ, s, A ) as follows. Q = P(Q) s = δn (s, ) A = {X Q X A } δ ({q, q 2,... q k }, a) = δn (q, a) δn (q 2, a) δn (q k, a) or more concisely, δ (X, a) = δn (q, a) An example NFA is shown in Figure 4 along with the DFA det(n) in Figure 5. q X,, {q } {},, q q, {q } {q, q } Figure 4: NFA N Figure 5: DFA det(n) equivalent to N We will now prove that the DFA defined above is correct. That is Lemma 4. L(N) = L(det(N)) Proof. Need to show w Σ. det(n) accepts w iff N accepts w w Σ. δdet(n) (s, w) A iff δn (s, w) A w Σ. δdet(n) (s, w) A iff δn (s, w) A Again for the induction proof to go through we need to strengthen the claim as follows. w Σ. δ det(n) (s, w) = δ N(s, w) In other words, this says that the state of the DFA after reading some string is exactly the set of states the NFA could be in after reading the same string. The proof of the strengthened statement is by induction on w. Base Case If w = then w =. Now δdet(n) (s, ) = s = δn(s, ) by the defn. of δdet(n) and defn. of s 7

8 Induction Hypothesis Assume inductively that the statement holds w. w < n. Induction Step Let w be such that w = n (for n > ). Without loss of generality w is of the form ua with u = n and a Σ. δdet(n) (s, ua) = δdet(n) (δ det(n) (s, u), a) property of δ of DFAs = δ (δdet(n) (s, u), a) property of δ of DFAs = q δ det(n) (s,u) δ N (q, a) definition of δ = q δn (s,u) δ N (q, a) induction hypothesis on u = δn (s, ua) Proposition 3. Relevant States The formal definition of the DFA has many states, several of which are unreachable from the initial state (see Figure 5). To make the algorithm simpler for a human to implement (and for the resulting DFA to be readable), one can include only the reachable states. To do this,. Start by drawing the initial state of the DFA. 2. While there are states with missing transitions, draw the missing transitions creating any new states that maybe needed. 3. Step 2 is repeated until transitions from every state has been drawn. 4. Figure out which states are final, and mark them appropriately. The method of adding only relevant states is shown in Figures 6 and 7.,, {q 3 } {} q, q q 2 q 3 {q, q } {q 2, q 3 } Figure 6: NFA N Figure 7: DFA det(n ) with only relevant states 8

### CSE 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

### CSE 135: Introduction to Theory of Computation Equivalence of DFA and NFA

CSE 135: Introduction to Theory of Computation Equivalence of DFA and NFA Sungjin Im University of California, Merced 02-03-2015 Expressive Power of NFAs and DFAs Is there a language that is recognized

### Lecture 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

### Nondeterministic 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

### CS243, 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

### FORMAL 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

### Lecture 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-

### Chapter 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

### CS 154, Lecture 3: DFA NFA, Regular Expressions

CS 154, Lecture 3: DFA NFA, Regular Expressions Homework 1 is coming out Deterministic Finite Automata Computation with finite memory Non-Deterministic Finite Automata Computation with finite memory and

### Deterministic 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

### CMPSCI 250: Introduction to Computation. Lecture #22: From λ-nfa s to NFA s to DFA s David Mix Barrington 22 April 2013

CMPSCI 250: Introduction to Computation Lecture #22: From λ-nfa s to NFA s to DFA s David Mix Barrington 22 April 2013 λ-nfa s to NFA s to DFA s Reviewing the Three Models and Kleene s Theorem The Subset

### Extended transition function of a DFA

Extended transition function of a DFA The next two pages describe the extended transition function of a DFA in a more detailed way than Handout 3.. p./43 Formal approach to accepted strings We define the

### September 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,

### cse303 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

### Chapter 5. Finite Automata

Chapter 5 Finite Automata 5.1 Finite State Automata Capable of recognizing numerous symbol patterns, the class of regular languages Suitable for pattern-recognition type applications, such as the lexical

### Lecture 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

### September 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

### October 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

### Further discussion of Turing machines

Further discussion of Turing machines In this lecture we will discuss various aspects of decidable and Turing-recognizable languages that were not mentioned in previous lectures. In particular, we will

### Finite 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/

### Non-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

### Theory 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.

### UNIT-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

### FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

15-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY REVIEW for MIDTERM 1 THURSDAY Feb 6 Midterm 1 will cover everything we have seen so far The PROBLEMS will be from Sipser, Chapters 1, 2, 3 It will be

### Lecture 17: Language Recognition

Lecture 17: Language Recognition Finite State Automata Deterministic and Non-Deterministic Finite Automata Regular Expressions Push-Down Automata Turing Machines Modeling Computation When attempting to

### Formal Definition of Computation. August 28, 2013

August 28, 2013 Computation model The model of computation considered so far is the work performed by a finite automaton Finite automata were described informally, using state diagrams, and formally, as

### UNIT-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

### Automata 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

### CSC236 Week 11. Larry Zhang

CSC236 Week 11 Larry Zhang 1 Announcements Next week s lecture: Final exam review This week s tutorial: Exercises with DFAs PS9 will be out later this week s. 2 Recap Last week we learned about Deterministic

### Introduction to Turing Machines. Reading: Chapters 8 & 9

Introduction to Turing Machines Reading: Chapters 8 & 9 1 Turing Machines (TM) Generalize the class of CFLs: Recursively Enumerable Languages Recursive Languages Context-Free Languages Regular Languages

### Theory 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

### Chapter 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

### Let 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

### Outline. 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

### Fooling Sets and. Lecture 5

Fooling Sets and Introduction to Nondeterministic Finite Automata Lecture 5 Proving that a language is not regular Given a language, we saw how to prove it is regular (union, intersection, concatenation,

### Notes on State Minimization

U.C. Berkeley CS172: Automata, Computability and Complexity Handout 1 Professor Luca Trevisan 2/3/2015 Notes on State Minimization These notes present a technique to prove a lower bound on the number of

### Lecture 23 : Nondeterministic Finite Automata DRAFT Connection between Regular Expressions and Finite Automata

CS/Math 24: Introduction to Discrete Mathematics 4/2/2 Lecture 23 : Nondeterministic Finite Automata Instructor: Dieter van Melkebeek Scribe: Dalibor Zelený DRAFT Last time we designed finite state automata

### Uses of finite automata

Chapter 2 :Finite Automata 2.1 Finite Automata Automata are computational devices to solve language recognition problems. Language recognition problem is to determine whether a word belongs to a language.

### Theory 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

### PS2 - Comments. University of Virginia - cs3102: Theory of Computation Spring 2010

University of Virginia - cs3102: Theory of Computation Spring 2010 PS2 - Comments Average: 77.4 (full credit for each question is 100 points) Distribution (of 54 submissions): 90, 12; 80 89, 11; 70-79,

### Finite Automata Part Two

Finite Automata Part Two DFAs A DFA is a Deterministic Finite Automaton A DFA is defined relative to some alphabet Σ. For each state in the DFA, there must be exactly one transition defined for each symbol

### Deterministic (DFA) There is a fixed number of states and we can only be in one state at a time

CS35 - Finite utomata This handout will describe finite automata, a mechanism that can be used to construct regular languages. We ll describe regular languages in an upcoming set of lecture notes. We will

### CS 322 D: Formal languages and automata theory

CS 322 D: Formal languages and automata theory Tutorial NFA DFA Regular Expression T. Najla Arfawi 2 nd Term - 26 Finite Automata Finite Automata. Q - States 2. S - Alphabets 3. d - Transitions 4. q -

### arxiv: v2 [cs.fl] 29 Nov 2013

A Survey of Multi-Tape Automata Carlo A. Furia May 2012 arxiv:1205.0178v2 [cs.fl] 29 Nov 2013 Abstract This paper summarizes the fundamental expressiveness, closure, and decidability properties of various

### Nondeterminism 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

### Theory 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.

### Finite 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

### Recitation 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

### Chapter 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

### Finite Automata Part Two

Finite Automata Part Two Recap from Last Time Old MacDonald Had a Symbol, Σ-eye-ε-ey, Oh! You may have noticed that we have several letter- E-ish symbols in CS103, which can get confusing! Here s a quick

### Clarifications from last time. This Lecture. Last Lecture. CMSC 330: Organization of Programming Languages. Finite Automata.

CMSC 330: Organization of Programming Languages Last Lecture Languages Sets of strings Operations on languages Finite Automata Regular expressions Constants Operators Precedence CMSC 330 2 Clarifications

### Theory of Computation

Theory of Computation COMP363/COMP6363 Prerequisites: COMP4 and COMP 6 (Foundations of Computing) Textbook: Introduction to Automata Theory, Languages and Computation John E. Hopcroft, Rajeev Motwani,

### 1 More finite deterministic automata

CS 125 Section #6 Finite automata October 18, 2016 1 More finite deterministic automata Exercise. Consider the following game with two players: Repeatedly flip a coin. On heads, player 1 gets a point.

### CONCATENATION AND KLEENE STAR ON DETERMINISTIC FINITE AUTOMATA

1 CONCATENATION AND KLEENE STAR ON DETERMINISTIC FINITE AUTOMATA GUO-QIANG ZHANG, XIANGNAN ZHOU, ROBERT FRASER, LICONG CUI Department of Electrical Engineering and Computer Science, Case Western Reserve

### 3515ICT: Theory of Computation. Regular languages

3515ICT: Theory of Computation Regular languages Notation and concepts concerning alphabets, strings and languages, and identification of languages with problems (H, 1.5). Regular expressions (H, 3.1,

### Introduction to Theory of Computing

CSCI 2670, Fall 2012 Introduction to Theory of Computing Department of Computer Science University of Georgia Athens, GA 30602 Instructor: Liming Cai www.cs.uga.edu/ cai 0 Lecture Note 3 Context-Free Languages

### Languages. 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

### Automata & languages. A primer on the Theory of Computation. Laurent Vanbever. ETH Zürich (D-ITET) September,

Automata & languages A primer on the Theory of Computation Laurent Vanbever www.vanbever.eu ETH Zürich (D-ITET) September, 24 2015 Last week was all about Deterministic Finite Automaton We saw three main

### Lecture Notes: The Halting Problem; Reductions

Lecture Notes: The Halting Problem; Reductions COMS W3261 Columbia University 20 Mar 2012 1 Review Key point. Turing machines can be encoded as strings, and other Turing machines can read those strings

### Theory of Computation p.1/?? Theory of Computation p.2/?? Unknown: Implicitly a Boolean variable: true if a word is

Abstraction of Problems Data: abstracted as a word in a given alphabet. Σ: alphabet, a finite, non-empty set of symbols. Σ : all the words of finite length built up using Σ: Conditions: abstracted as a

### Automata and Computability. Solutions to Exercises

Automata and Computability Solutions to Exercises Spring 27 Alexis Maciel Department of Computer Science Clarkson University Copyright c 27 Alexis Maciel ii Contents Preface vii Introduction 2 Finite Automata

### Reversal of Regular Languages and State Complexity

Reversal of Regular Languages and State Complexity Juraj Šebej Institute of Computer Science, Faculty of Science, P. J. Šafárik University, Jesenná 5, 04001 Košice, Slovakia juraj.sebej@gmail.com Abstract.

### CpSc 421 Homework 1 Solutions

CpSc 421 Homework 1 Solutions 1. (15 points) Let Σ = {a, b, c}. Figure 7 depicts two finite state machines that read Let L a and L b denote the languages recognized by DFA (a) and DFA (b) respectively.

### CS 301. Lecture 18 Decidable languages. Stephen Checkoway. April 2, 2018

CS 301 Lecture 18 Decidable languages Stephen Checkoway April 2, 2018 1 / 26 Decidable language Recall, a language A is decidable if there is some TM M that 1 recognizes A (i.e., L(M) = A), and 2 halts

### Introduction 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.

### Before we show how languages can be proven not regular, first, how would we show a language is regular?

CS35 Proving Languages not to be Regular Before we show how languages can be proven not regular, first, how would we show a language is regular? Although regular languages and automata are quite powerful

### CPS 220 Theory of Computation REGULAR LANGUAGES

CPS 22 Theory of Computation REGULAR LANGUAGES Introduction Model (def) a miniature representation of a thing; sometimes a facsimile Iraq village mockup for the Marines Scientific modelling - the process

### Computer 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

### Automata: a short introduction

ILIAS, University of Luxembourg Discrete Mathematics II May 2012 What is a computer? Real computers are complicated; We abstract up to an essential model of computation; We begin with the simplest possible

### Introduction 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

### Turing Machines Part II

Turing Machines Part II Problem Set Set Five Five due due in in the the box box up up front front using using a late late day. day. Hello Hello Condensed Slide Slide Readers! Readers! This This lecture

### Finite Automata and Regular Languages (part II)

Finite Automata and Regular Languages (part II) Prof. Dan A. Simovici UMB 1 / 25 Outline 1 Nondeterministic Automata 2 / 25 Definition A nondeterministic finite automaton (ndfa) is a quintuple M = (A,

### CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION "Winter" 2018 http://cseweb.ucsd.edu/classes/wi18/cse105-ab/ Today's learning goals Sipser Ch 4.2 Trace high-level descriptions of algorithms for computational problems. Use

### Kolmogorov structure functions for automatic complexity

Kolmogorov structure functions for automatic complexity Bjørn Kjos-Hanssen June 16, 2015 Varieties of Algorithmic Information, University of Heidelberg Internationales Wissenschaftssentrum History 1936:

### Incorrect reasoning about RL. Equivalence of NFA, DFA. Epsilon Closure. Proving equivalence. One direction is easy:

Incorrect reasoning about RL Since L 1 = {w w=a n, n N}, L 2 = {w w = b n, n N} are regular, therefore L 1 L 2 = {w w=a n b n, n N} is regular If L 1 is a regular language, then L 2 = {w R w L 1 } is regular,

### Lecture 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

### Turing machines Finite automaton no storage Pushdown automaton storage is a stack What if we give the automaton a more flexible storage?

Turing machines Finite automaton no storage Pushdown automaton storage is a stack What if we give the automaton a more flexible storage? What is the most powerful of automata? In this lecture we will introduce

### Formal Definition of a Finite Automaton. August 26, 2013

August 26, 2013 Why a formal definition? A formal definition is precise: - It resolves any uncertainties about what is allowed in a finite automaton such as the number of accept states and number of transitions

### Properties of Regular Languages. BBM Automata Theory and Formal Languages 1

Properties of Regular Languages BBM 401 - Automata Theory and Formal Languages 1 Properties of Regular Languages Pumping Lemma: Every regular language satisfies the pumping lemma. A non-regular language

### Harvard 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

### Final Exam Comments. UVa - cs302: Theory of Computation Spring < Total

UVa - cs302: Theory of Computation Spring 2008 Final Exam Comments < 50 50 59 60 69 70 79 80 89 90 94 95-102 Total 2 6 8 22 16 16 12 Problem 1: Short Answers. (20) For each question, provide a correct,

### Nondeterministic Finite Automata

Nondeterministic Finite Automata COMP2600 Formal Methods for Software Engineering Katya Lebedeva Australian National University Semester 2, 206 Slides by Katya Lebedeva. COMP 2600 Nondeterministic Finite

### Deterministic Finite Automaton (DFA)

1 Lecture Overview Deterministic Finite Automata (DFA) o accepting a string o defining a language Nondeterministic Finite Automata (NFA) o converting to DFA (subset construction) o constructed from a regular

### CS21 Decidability and Tractability

CS21 Decidability and Tractability Lecture 3 January 9, 2017 January 9, 2017 CS21 Lecture 3 1 Outline NFA, FA equivalence Regular Expressions FA and Regular Expressions January 9, 2017 CS21 Lecture 3 2

### Turing Machines Part III

Turing Machines Part III Announcements Problem Set 6 due now. Problem Set 7 out, due Monday, March 4. Play around with Turing machines, their powers, and their limits. Some problems require Wednesday's

### acs-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

### Theory of Computation

Theory of Computation Dr. Sarmad Abbasi Dr. Sarmad Abbasi () Theory of Computation / Lecture 3: Overview Decidability of Logical Theories Presburger arithmetic Decidability of Presburger Arithmetic Dr.

### ECS 120 Lesson 15 Turing Machines, Pt. 1

ECS 120 Lesson 15 Turing Machines, Pt. 1 Oliver Kreylos Wednesday, May 2nd, 2001 Before we can start investigating the really interesting problems in theoretical computer science, we have to introduce

### CS 154. Finite Automata vs Regular Expressions, Non-Regular Languages

CS 154 Finite Automata vs Regular Expressions, Non-Regular Languages Deterministic Finite Automata Computation with finite memory Non-Deterministic Finite Automata Computation with finite memory and guessing

### CSC173 Workshop: 13 Sept. Notes

CSC173 Workshop: 13 Sept. Notes Frank Ferraro Department of Computer Science University of Rochester September 14, 2010 1 Regular Languages and Equivalent Forms A language can be thought of a set L of

### UNIT-VI PUSHDOWN AUTOMATA

Syllabus R09 Regulation UNIT-VI PUSHDOWN AUTOMATA The context free languages have a type of automaton that defined them. This automaton, called a pushdown automaton, is an extension of the nondeterministic

### CSE 211. Pushdown Automata. CSE 211 (Theory of Computation) Atif Hasan Rahman

CSE 211 Pushdown Automata CSE 211 (Theory of Computation) Atif Hasan Rahman Lecturer Department of Computer Science and Engineering Bangladesh University of Engineering & Technology Adapted from slides

### CISC4090: Theory of Computation

CISC4090: Theory of Computation Chapter 2 Context-Free Languages Courtesy of Prof. Arthur G. Werschulz Fordham University Department of Computer and Information Sciences Spring, 2014 Overview In Chapter

### FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

15-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY Chomsky Normal Form and TURING MACHINES TUESDAY Feb 4 CHOMSKY NORMAL FORM A context-free grammar is in Chomsky normal form if every rule is of the form:

### (pp ) PDAs and CFGs (Sec. 2.2)

(pp. 117-124) PDAs and CFGs (Sec. 2.2) A language is context free iff all strings in L can be generated by some context free grammar Theorem 2.20: L is Context Free iff a PDA accepts it I.e. if L is context

### Finite Automata (contd)

Finite Automata (contd) CS 2800: Discrete Structures, Fall 2014 Sid Chaudhuri Recap: Deterministic Finite Automaton A DFA is a 5-tuple M = (Q, Σ, δ, q 0, F) Q is a fnite set of states Σ is a fnite input

### Regular Languages and Finite Automata

Regular Languages and Finite Automata Theorem: Every regular language is accepted by some finite automaton. Proof: We proceed by induction on the (length of/structure of) the description of the regular

### DM17. Beregnelighed. Jacob Aae Mikkelsen

DM17 Beregnelighed Jacob Aae Mikkelsen January 12, 2007 CONTENTS Contents 1 Introduction 2 1.1 Operations with languages...................... 2 2 Finite Automata 3 2.1 Regular expressions/languages....................