2. Elements of the Theory of Computation, Lewis and Papadimitrou,

Size: px
Start display at page:

Download "2. Elements of the Theory of Computation, Lewis and Papadimitrou,"

Transcription

1 Introduction Finite Automata DFA, regular languages Nondeterminism, NFA, subset construction Regular Epressions Synta, Semantics Relationship to regular languages Properties of regular languages Pumping lemma Minimizing DFA, Myhill-Nerode theorem Machines Modeling hardware in terms of machines Semantics of interaction, compleity issues References:. Introduction to Automaton Theory, Languages, and Computation, Hopcroft and Ullman, 979, Chapters 2,3 2. Elements of the Theory of Computation, Lewis and Papadimitrou, 98, Chapters,2

2 Finite Automaton Arise in various contets: Tet Editors, Neuron modelling, Hardware Notation: Given an alphabet Σ, Σ is the set of all finite strings on Σ, a language is any L Σ, a b denotes the concatenation of string a with b, ɛ is the empty string Deterministic Finite Automaton : characterised by a 5-tuple (Q, Σ, δ, q 0, F ). Q - finite set of states 2. Σ - finite input alphabet 3. δ - transition function, maps Q Σ Q (can assume total) 4. q 0 - initial state 5. F - subset of S, the set of final states Eample $q_0$ q 0 q$q_ $q_ $q_3$ q 3 q 2

3 Behavior of DFA on input strings: Etend δ to ˆδ : Q Σ Q in natural way. ˆδ(q, ɛ) = q 2. ˆδ(q, wa) = δ(ˆδ(q, w), a) Language of DFA A : L(A) = { Σ ˆδ(q 0, ) F } Language L is said to be regular if DFA M such that L = L(M) EE290H 8/24/93 AA

4 Nondeterminism Less obvious, useful for theoretical analysis, modelling initial stages of hardware designs, can be more compact Nondeterministic Finite Automaton : characterised a 5-tuple (Q, Σ,, q 0, F ). Q - finite set of states 2. Σ - finite input alphabet 3. - transition function, maps Q Σ 2 Q (variously Q Σ Q) 4. q 0 - initial state 5. F - subset of S, the set of final states Eample,0 0 0,0 q$q_0$ 0 q$q_$ q$q 2 q$q_3$ 3 q$q_4$ 4,0

5 Behavior of NFA on input strings: Etend to ˆ : Q Σ 2 Q in natural way. ˆ (q, ɛ) = {q} 2. ˆ (q, wa) = {p r ˆ (q, w), p (r, a)} Language of NFA A : L(A) = { Σ ˆ (q 0, ) F φ} EE290H 8/24/93 AA

6 Nondeterminism - II Obvious fact : Class of languages accepted by NFA Class of languages accepted by DFA ; Less obvious fact : Equality holds Proof : by the subset construction Intuition : Nondeterminism leads to parallel paths simulate NFA to determinize Eample NFA DFA 0 0, {q 0 } $\{q_0\}$ 0 0 $\{q 0, q } q$q_0$ 0 q$q_$ Subset Construction $\{q_ } Remark: Potential blowup; generate subsets incrementally; Average case increase? EE290H 8/24/93 AA

7 Regular Epressions Idea: Formulae that define certain subsets of Σ not commonly used to describe systems; describe properties eg 3 REQs never occur consecutively Notation: Let L, L, L 2 Σ. Concatenation of L and L 2 = { y L y L 2 } 2. Define L 0 = {ɛ} and L i = L L i for i Kleene closure L positive closure L + = i=0 L i = i= L i Eample: Σ - finite alphabet L = { has 3 consecutive 0 s } L 2 = {y y has 2 consecutive s } L L 2 = {z z has 3 consecutive 0 s and 2 consecutive s which follow the 3 0 s } L = { has an even number of s } L = L EE290H 8/24/93 AA

8 Regular Epressions - II Synta and Semantics. φ is a regular epression, denotes the empty set 2. ɛ is a regular epression, denotes the set {ɛ} 3. a Σ, a is a regular epression, denotes the set {a} 4. let r, s be regular epressions denoting the languages R and S, then (r + s), (r s), (r) are regular epressions denoting R S, R S, and R respectively Eample: 0 + (0 0 0 ) Remark: Can etend above definition to include other operators such as - intersection, - complement, () 2 - squaring, () i - eponentiation wjere i is encoded in binary. The resultant epressions do not define any new languages, but can be eponentially more succint. Interesting fact : deciding universality of regular epressions drawn from +,,, () i is EXP-space complete. EE290H 8/24/93 AA

9 Equivalence of FA and Regular Epressions Theorem: Given any regular epression r, there eists an FA accepting L(r) Proof: by construction, use ɛ transitions Theorem: [Kleene, 956] Given a regular language L, there is a regular epression r such that L = L(r). Proof: Let L be a regular set. There is a DFA which acepts L. Let the DFA be M = ({q,..., q n }, Σ, δ, q, F ) We will inductively construct regular epressions that drive the DFA from one state to another. Let R k ij denote all strings such that δ(q, ) = q j and if δ(q i, y) = q l for some y which is a prefi of, other than or ɛ, then l k. Clearly : R 0 ij R k ij = {a δ(q, ) = q j }if i j = {a δ(q, ) = q j } {ɛ} if i = j = Rij k Rik k (Rkk k ) Rkj k, k

10 Claim: i, j, k R k ij is defined by a regular epression r k ij Proof: By induction on k Base case: R 0 ij is a finite set r 0 ij = (a +... a p )ifi ) = (a +... a p + ɛ)ifi = j Induction: r k ij = r k ij r k ik (rkk k ) rkj k, k Conclusion: L(M) = q j FR n ij r L = r n ij + + r n ij p where F = {q j,..., q ip } EE290H 8/24/93 AA

11 Equivalence of FA and Regular Epressions Theorem: Given any regular epression r, there eists an FA accepting L(r) Proof: by construction, use ɛ transitions Theorem: [Kleene, 956] Given a regular language L, there is a regular epression r such that L = L(r). Proof: Let L be a set accepted by the DFA M = ({q,..., q n }, Σ, δ, q, F ) Let R k ij denote all strings such that δ(q, ) = q j and if δ(q i, y) = q l for some y which is a prefi of, other than or ɛ, then l k. Clearly : R 0 ij R k ij = {a δ(q, ) = q j }if i j = {a δ(q, ) = q j } {ɛ} if i = j = Rij k Rik k (Rkk k ) Rkj k, k Lemma: i, j, k Rij k is defined by a regular epression rij k Proof: By induction on k Base case: Rij 0 is a finite set rij 0 = (a +... a p ) or = (a +... a p + ɛ)ifi = j Induction: rij k = rij k, k Conclusion: r k kj r k ik (r k kk ) L(M) = q j FR n ij r L = r n ij + + r n ij p where F = {q j,..., q ip } EE290H 8/24/93 AA

12 Equivalence of FA and Regular Epressions - II Eample: 0 0 $q_$ $q q q 2 Step r 0 = ɛ + 0, r 0 22 = ɛ + 0, r 0 2 = r 0 2 = φ Step 2 r = 0, r 22 = 0 + 0, r 2 = r 2 = Step 3 r 2 = 0 + (0 + 0 ) Remark: Associating formula with states is a common theme in verification, eg can charcterize states in a Kripke structure upto bisimulation using a CTL formula EE290H 8/24/93 AA

13 Regular Language Properties - The Pumping Lemma Let L be a regular language defined by DFA M = (Q, Σ, δ, q 0, F ) Consider an input of n or more symbols a, a 2,..., a m for i =, 2,..., m let δ(q 0, a,..., a i ) = q i Observe: Cant have q 0, q,..., q n all distinct j, k 0 j < k n q j = q k Eample $q_j = q_k$ q $q_0$ q j = q k 0 q m m n $q_m a... a j $a_ \ldots a_j$ a k... a m $a_k \ldots a_m$ a j+... a k $a_{j+} \ldots a_k$ a m F iff a a 2... a m L(M) so is the string a... a j a k+... a m in fact can loop around as many times as desired: a... a j (a j+... a k ) i a k+... a m L(M) i 0 If FA accepts arbitrarily long strings must have a string s with the property a substring of s that can be repeated

14 Pumping Lemma: Let L be a regular set. Then there eists a constant n such that if z L and z n, can write z = u v w in such a way that u v n, v and i 0 u v i w L. Also n # number of states in smallest DFA for L EE290H 8/24/93 AA

15 Regular Language Poperties - Closure, Minimization Closure Closure under union, concatenation, and Kleene closure : follows from equivalence of regular epression and FA Closure under complementation, intersection : trivial to complement DFA Deciding Emptiness, Universality, Equivalence of DFA Deciding Emptiness, Universality, Equivalence of NFA Minimizing DFA The Myhill-Nerode theorem : Given a regular language L, there is a unique minimium state DFA accepting the language. Proof based on partitioning Σ, under the equivalence relation R L y iff z z L y z L Simple Algorithm : Merge states in a DFA if there is no input string that can differentiate them EE290H 8/24/93 AA

16 Hardware Scenario: Two processors, single disk drive Only one processor should be allowed to access the drive at any time Design arbiter to decide which processor gets access Processors and arbiter communicate through Σ P = {Idle, Req, Busy}, Σ P 2 = {Idle2, Req2, Busy2}, Σ Arbit = {Stop, Go, Go2} Block Diagram Proc Proc 2 Arbiter ${Output}_{Proc} \{Idle, Request, Busy2 \}$ P roc = Request, Busy} ${Output}_{Proc2} =\{ Request2, Busy2\}$ P roc2 = {Idle2, Request2, Busy2} ${Output}_{Arbiter} \{Stop, Go, Go2\}$ Arbiter = Go, Go2}

17 Controller State Diagram Observe: Nondeterminism in the controller Inputs, Outputs, States : Symbolic Transition Conditions ( Predicates ) are described by formulae Outputs on state : Moore machine Properties: Safety : Never give both processors access to drive at same time Liveness : Processor makes request eventually gets access Relationship to Regular Languages: View behavor of arbiter as map from (Σ P Σ P 2 ) to (Σ Arbit ). Can naturally associate a regular language with the behavior. EE290H 8/24/93 AA

18 Interacting Machines Game of Life Single cellular organisms, atmost one on each square of a chess board. Only two states: { Dead, Live }, simple transition rule Eample: Petri Dish Transition rule: LIVE DEAD

19 Definition: The product machine M = M M 2... M n is the machine on state space S = S S 2... S n and output space O = O... O n characterized by Output relation Transition relation T (, y) = ( i)[ n Θ(, o) = i= n i= Θ i ( i, o i ) T i ( i, i, y i ) Θ i ( i, o i ) (i = [o... o n ])] where the present state variable s = [s s 2... s n ], and the net state variable t = [t t 2... t n ]. Compleity : The computational compleity of verifying systems of interacting machines is very high; for eample the following problem is P-space complete: Reached State Analysis: Given a system of interacting machines, and two states s and p, is a s reachable from p? EE290H 8/24/93 AA

20 Modeling Hardware Recall can go from netlist to FSM w2 0/0 0/,/ 00 0 /0 0/0,/0 0/,/ w L L2 0 Problem is output behavior of N at state s 0 equal to output behavior of N 2 at state s? Problem 2 is N a safe replacement for N 2? EE382m

21 Language Containment Suggests another verification paradigm Language Containment System FA Property FA/RE Check S contained in P What properties can we epress in this paradigm? D s0 0/a /a s s2 0/b,/b 0/b,/b D2 t0 0/a,/a 0/b t /b 0/c,/c s3 s4 0/d,/d 0/c,/c t3 t4 0/d,/d EE382m

22 ω Automata Accept infinite sequences rather than finite sequences!!! Contrast with Finite Automata (FA) Motivation: Would like to be able to epress properties like AG (REQ= (AF ACK= )) Intuitively, such a property is a function of input/output behavior of design, but can not be captured using Finite Automata. Would like to capture designs which have fairness constraints How to describe processor with fairness constraint which ensures REQ= infinite often? Terminology. Recall ω = {0,, 2,...}; an ω sequence f over a set Σ is a function from ω to Σ. f(0), f(), f(2),..., 2. Given set Σ (alphabet), Σ ω is set of all infinite sequences over Σ. 3. Subsets of Σ ω are referred to as ω-languages. How to build automata accepting ω-sequences???

23 Defn. Büchi automata synta and semantics Syntactically identical to Finite Automata Same dichotomy between deterministic and nondeterminitic Semantics Accept infinite input sequence eactly when there is a resulting path on which an accepting state occurs infinitely often. A (0,0),(,0),(0,) (,0),(0,),(,) A2 a,b a,b c s s2 (,) (0,0) s3 T u u2 u3 c T u4 c a,b Σ = {(0,0),(0,),(,0),(,)} Σ 2 = {a,b,c} A3 0 A4 0, 0 t 0 t2 t 0 t2 Σ = {0,} 3 Σ 4 = {0,} t3 0, Defn. An ω-language L is said to be ω-regular if it is accepted (variously defined, recognized) by some Büchi automaton.

24 Closure Properties of ω-regular languages. Closed under union could do eactly as for FA Alternate approach product construction. Let L and L 2 be ω-regular languages over alphabet Σ. ω-regular must be accepted by BA. Let (S, α, T, Σ, F ) and (S 2, α, T 2, Σ, F 2 ) be BA for L and L 2. Consider the following BA: States = S S 2 Initial state = (α, β) Transition Relation T = {((s, s 2 ), a, (t, t 2 )) (s, a, t ) T (s 2, a, t 2 ) T 2 } Alphabet = Σ Accepting States = F S 2 S F 2 Why does this work?

25 2. Closed under intersection for FA, could use complementation, union, and DeMorgans s laws. Can we do directly? First try: build product automata (a) Accepting States = F F 2 Q. Does this catch everything? o.w. Product Transition Structure o.w. F F2 T Figure : Monitor for Intersection 3. Closure under projection eraser construction, eactly as before (May go from deterministic to nondeterministic.)

26 Closure of ω-regular languages under Complement How did we achieve this for -regular languages?. L is -regular has an NFA N L. 2. From N L built DFA D L for L through subset construction. 3. Complementing D L trivial. First attempt for ω-regular languages mimic above.. Problem: how to complement D L? 2. Not possible in general!!! Consider L = { {0, } ω 0 occurs a.a. in } Fundamental result: [Büchi 969] ω-regular languages are closed under complement Idea: go from NBA to deterministic Müller automaton which are easy to complement; then go back to NBA

27 General Knowledge Other types of ω-automata: states, transtion structure remains the same. Differ in acceptance condition. Let σ be a path, inf(σ) set of states occurring infinitely often in σ.. Müller automata: F = set of subset of state set. σ is accepted iff inf(σ) is a member of F 2. Streett automata: F = set of pairs of subsets of state space. σ is accepted iff for every pair (A i, B i ) in F, A i inf(σ) = or B i inf(σ) in the path 3. Rabin automata: F = set of pairs of subsets of state space. σ is accepted iff for some pair (A i, B i ) in F, A i inf(σ) or B i inf(σ) in the path All these accept eactly the class of ω-regular languages (even in the deterministic case). Differ in terms of succintness refer to Safra FOCS 988. Language containment paradigm for ω-automata basis for COSPAN.

28 Relationship to Temporal Logic Generally can t convert CTL formula to Automata ( or ω). For the logic PLTL, can automatically build Büchi automata To analyse CTL (and other branching time logics) from automata point of view, need automata which accept trees. Similar issues complementation, epressiveness, etc. Strong analogy to language containment

T (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,

T (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 information

Finite Automata. Mahesh Viswanathan

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

CS 455/555: Finite automata

CS 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 information

Lecture 1: Finite State Automaton

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-

More information

Equivalence of Regular Expressions and FSMs

Equivalence of Regular Expressions and FSMs Equivalence of Regular Expressions and FSMs Greg Plaxton Theory in Programming Practice, Spring 2005 Department of Computer Science University of Texas at Austin Regular Language Recall that a language

More information

Finite Automata and Regular Languages

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

Introduction to Formal Languages, Automata and Computability p.1/51

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

Finite Automata and Regular languages

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/

More information

COM364 Automata Theory Lecture Note 2 - Nondeterminism

COM364 Automata Theory Lecture Note 2 - Nondeterminism COM364 Automata Theory Lecture Note 2 - Nondeterminism Kurtuluş Küllü March 2018 The FA we saw until now were deterministic FA (DFA) in the sense that for each state and input symbol there was exactly

More information

CS243, Logic and Computation Nondeterministic finite automata

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

More information

Büchi Automata and their closure properties. - Ajith S and Ankit Kumar

Büchi Automata and their closure properties. - Ajith S and Ankit Kumar Büchi Automata and their closure properties - Ajith S and Ankit Kumar Motivation Conventional programs accept input, compute, output result, then terminate Reactive program : not expected to terminate

More information

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. 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 information

3515ICT: Theory of Computation. Regular languages

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,

More information

Inf2A: Converting from NFAs to DFAs and Closure Properties

Inf2A: 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 information

Deterministic Finite Automata. Non deterministic finite automata. Non-Deterministic Finite Automata (NFA) Non-Deterministic Finite Automata (NFA)

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

More information

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. 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 information

Computational Theory

Computational 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 information

CS 154, Lecture 2: Finite Automata, Closure Properties Nondeterminism,

CS 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 information

Closure Properties of Regular Languages. Union, Intersection, Difference, Concatenation, Kleene Closure, Reversal, Homomorphism, Inverse Homomorphism

Closure Properties of Regular Languages. Union, Intersection, Difference, Concatenation, Kleene Closure, Reversal, Homomorphism, Inverse Homomorphism Closure Properties of Regular Languages Union, Intersection, Difference, Concatenation, Kleene Closure, Reversal, Homomorphism, Inverse Homomorphism Closure Properties Recall a closure property is a statement

More information

What we have done so far

What 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 information

Formal Models in NLP

Formal Models in NLP Formal Models in NLP Finite-State Automata Nina Seemann Universität Stuttgart Institut für Maschinelle Sprachverarbeitung Pfaffenwaldring 5b 70569 Stuttgart May 15, 2012 Nina Seemann (IMS) Formal Models

More information

Sri vidya college of engineering and technology

Sri 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 information

Closure under the Regular Operations

Closure 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 information

Finite Automata and Languages

Finite Automata and Languages CS62, IIT BOMBAY Finite Automata and Languages Ashutosh Trivedi Department of Computer Science and Engineering, IIT Bombay CS62: New Trends in IT: Modeling and Verification of Cyber-Physical Systems (2

More information

Lecture 3: Nondeterministic Finite Automata

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

More information

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

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

More information

CS 154. Finite Automata, Nondeterminism, Regular Expressions

CS 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 information

CISC 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 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 information

Extended transition function of a DFA

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

More information

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

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

More information

COMP4141 Theory of Computation

COMP4141 Theory of Computation COMP4141 Theory of Computation Lecture 4 Regular Languages cont. Ron van der Meyden CSE, UNSW Revision: 2013/03/14 (Credits: David Dill, Thomas Wilke, Kai Engelhardt, Peter Höfner, Rob van Glabbeek) Regular

More information

September 11, Second Part of Regular Expressions Equivalence with Finite Aut

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

More information

CS 208: Automata Theory and Logic

CS 208: Automata Theory and Logic CS 28: Automata Theory and Logic b a a start A x(la(x) y(x < y) L b (y)) B b Department of Computer Science and Engineering, Indian Institute of Technology Bombay of 32 Nondeterminism Alternation 2 of

More information

Nondeterministic Finite Automata

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

Nondeterministic Finite Automata

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

Computational Models - Lecture 4

Computational Models - Lecture 4 Computational Models - Lecture 4 Regular languages: The Myhill-Nerode Theorem Context-free Grammars Chomsky Normal Form Pumping Lemma for context free languages Non context-free languages: Examples Push

More information

Automata and Formal Languages - CM0081 Finite Automata and Regular Expressions

Automata and Formal Languages - CM0081 Finite Automata and Regular Expressions Automata and Formal Languages - CM0081 Finite Automata and Regular Expressions Andrés Sicard-Ramírez Universidad EAFIT Semester 2018-2 Introduction Equivalences DFA NFA -NFA RE Finite Automata and Regular

More information

Definition of Büchi Automata

Definition of Büchi Automata Büchi Automata Definition of Büchi Automata Let Σ = {a,b,...} be a finite alphabet. By Σ ω we denote the set of all infinite words over Σ. A non-deterministic Büchi automaton (NBA) over Σ is a tuple A

More information

Büchi Automata and Their Determinization

Büchi Automata and Their Determinization Büchi Automata and Their Determinization Edinburgh, October 215 Plan of the Day 1. Büchi automata and their determinization 2. Infinite games 3. Rabin s Tree Theorem 4. Decidability of monadic theories

More information

Computability and Complexity

Computability and Complexity Computability and Complexity Non-determinism, Regular Expressions CAS 705 Ryszard Janicki Department of Computing and Software McMaster University Hamilton, Ontario, Canada janicki@mcmaster.ca Ryszard

More information

Uses of finite 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.

More information

Warshall s algorithm

Warshall s algorithm Regular Expressions [1] Warshall s algorithm See Floyd-Warshall algorithm on Wikipedia The Floyd-Warshall algorithm is a graph analysis algorithm for finding shortest paths in a weigthed, directed graph

More information

Lecture 17: Language Recognition

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

More information

ω-automata Automata that accept (or reject) words of infinite length. Languages of infinite words appear:

ω-automata Automata that accept (or reject) words of infinite length. Languages of infinite words appear: ω-automata ω-automata Automata that accept (or reject) words of infinite length. Languages of infinite words appear: in verification, as encodings of non-terminating executions of a program. in arithmetic,

More information

Let us first give some intuitive idea about a state of a system and state transitions before describing finite automata.

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

More information

UNIT-II. NONDETERMINISTIC FINITE AUTOMATA WITH ε TRANSITIONS: SIGNIFICANCE. Use of ε-transitions. s t a r t. ε r. e g u l a r

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

More information

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

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

More information

Recap DFA,NFA, DTM. Slides by Prof. Debasis Mitra, FIT.

Recap 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 information

Automata and Languages

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

More on Finite Automata and Regular Languages. (NTU EE) Regular Languages Fall / 41

More on Finite Automata and Regular Languages. (NTU EE) Regular Languages Fall / 41 More on Finite Automata and Regular Languages (NTU EE) Regular Languages Fall 2016 1 / 41 Pumping Lemma is not a Sufficient Condition Example 1 We know L = {b m c m m > 0} is not regular. Let us consider

More information

Outline. Nondetermistic Finite Automata. Transition diagrams. A finite automaton is a 5-tuple (Q, Σ,δ,q 0,F)

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

More information

Finite State Automata

Finite State Automata Trento 2005 p. 1/4 Finite State Automata Automata: Theory and Practice Paritosh K. Pandya (TIFR, Mumbai, India) Unversity of Trento 10-24 May 2005 Trento 2005 p. 2/4 Finite Word Langauges Alphabet Σ is

More information

Chapter 3: Linear temporal logic

Chapter 3: Linear temporal logic INFOF412 Formal verification of computer systems Chapter 3: Linear temporal logic Mickael Randour Formal Methods and Verification group Computer Science Department, ULB March 2017 1 LTL: a specification

More information

Theory of computation: initial remarks (Chapter 11)

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.

More information

Nondeterminism. September 7, Nondeterminism

Nondeterminism. 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 information

Non-deterministic Finite Automata (NFAs)

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

More information

Regular Expressions. Definitions Equivalence to Finite Automata

Regular Expressions. Definitions Equivalence to Finite Automata Regular Expressions Definitions Equivalence to Finite Automata 1 RE s: Introduction Regular expressions are an algebraic way to describe languages. They describe exactly the regular languages. If E is

More information

Introduction to Finite-State Automata

Introduction to Finite-State Automata Introduction to Finite-State Automata John McDonough Language Technologies Institute, Machine Learning for Signal Processing Group, Carnegie Mellon University March 26, 2012 Introduction In this lecture,

More information

Constructions on Finite Automata

Constructions on Finite Automata Constructions on Finite Automata Informatics 2A: Lecture 4 Mary Cryan School of Informatics University of Edinburgh mcryan@inf.ed.ac.uk 24 September 2018 1 / 33 Determinization The subset construction

More information

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

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

More information

arxiv: v2 [cs.fl] 29 Nov 2013

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

More information

UNIT II REGULAR LANGUAGES

UNIT II REGULAR LANGUAGES 1 UNIT II REGULAR LANGUAGES Introduction: A regular expression is a way of describing a regular language. The various operations are closure, union and concatenation. We can also find the equivalent regular

More information

Finite 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. 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 information

Lecture 2: Regular Expression

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

More information

Finite Automata. Seungjin Choi

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

More information

1 More finite deterministic automata

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.

More information

Finite Automata Part Two

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

More information

CS 121, Section 2. Week of September 16, 2013

CS 121, Section 2. Week of September 16, 2013 CS 121, Section 2 Week of September 16, 2013 1 Concept Review 1.1 Overview In the past weeks, we have examined the finite automaton, a simple computational model with limited memory. We proved that DFAs,

More information

CS 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) 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 information

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

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

More information

Alan Bundy. Automated Reasoning LTL Model Checking

Alan Bundy. Automated Reasoning LTL Model Checking Automated Reasoning LTL Model Checking Alan Bundy Lecture 9, page 1 Introduction So far we have looked at theorem proving Powerful, especially where good sets of rewrite rules or decision procedures have

More information

Theory of Computation (I) Yijia Chen Fudan University

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

DM17. Beregnelighed. Jacob Aae Mikkelsen

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

More information

Course 4 Finite Automata/Finite State Machines

Course 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 information

Automata, Logic and Games: Theory and Application

Automata, Logic and Games: Theory and Application Automata, Logic and Games: Theory and Application 1. Büchi Automata and S1S Luke Ong University of Oxford TACL Summer School University of Salerno, 14-19 June 2015 Luke Ong Büchi Automata & S1S 14-19 June

More information

NOTES ON AUTOMATA. Date: April 29,

NOTES ON AUTOMATA. Date: April 29, NOTES ON AUTOMATA 1. Monoids acting on sets We say that a monoid S with identity element ɛ acts on a set Q if q(st) = (qs)t and qɛ = q. As with groups, if we set s = t whenever qs = qt for all q Q, then

More information

Deterministic Finite Automaton (DFA)

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

More information

THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET

THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET Regular Languages and FA A language is a set of strings over a finite alphabet Σ. All languages are finite or countably infinite. The set of all languages

More information

Theory of Computation

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,

More information

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. 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 information

Finite Automata - Deterministic Finite Automata. Deterministic Finite Automaton (DFA) (or Finite State Machine)

Finite Automata - Deterministic Finite Automata. Deterministic Finite Automaton (DFA) (or Finite State Machine) Finite Automata - Deterministic Finite Automata Deterministic Finite Automaton (DFA) (or Finite State Machine) M = (K, Σ, δ, s, A), where K is a finite set of states Σ is an input alphabet s K is a distinguished

More information

Intro to Theory of Computation

Intro to Theory of Computation Intro to Theory of Computation 1/19/2016 LECTURE 3 Last time: DFAs and NFAs Operations on languages Today: Nondeterminism Equivalence of NFAs and DFAs Closure properties of regular languages Sofya Raskhodnikova

More information

CS 154, Lecture 3: DFA NFA, Regular Expressions

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

More information

CMSC 330: Organization of Programming Languages. Theory of Regular Expressions Finite Automata

CMSC 330: Organization of Programming Languages. Theory of Regular Expressions Finite Automata : Organization of Programming Languages Theory of Regular Expressions Finite Automata Previous Course Review {s s defined} means the set of string s such that s is chosen or defined as given s A means

More information

GEETANJALI INSTITUTE OF TECHNICAL STUDIES, UDAIPUR I

GEETANJALI INSTITUTE OF TECHNICAL STUDIES, UDAIPUR I GEETANJALI INSTITUTE OF TECHNICAL STUDIES, UDAIPUR I Internal Examination 2017-18 B.Tech III Year VI Semester Sub: Theory of Computation (6CS3A) Time: 1 Hour 30 min. Max Marks: 40 Note: Attempt all three

More information

Constructions on Finite Automata

Constructions on Finite Automata Constructions on Finite Automata Informatics 2A: Lecture 4 Alex Simpson School of Informatics University of Edinburgh als@inf.ed.ac.uk 23rd September, 2014 1 / 29 1 Closure properties of regular languages

More information

Computational Models - Lecture 3 1

Computational Models - Lecture 3 1 Computational Models - Lecture 3 1 Handout Mode Iftach Haitner and Yishay Mansour. Tel Aviv University. March 13/18, 2013 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice

More information

UNIT-III REGULAR LANGUAGES

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

More information

CPSC 421: Tutorial #1

CPSC 421: Tutorial #1 CPSC 421: Tutorial #1 October 14, 2016 Set Theory. 1. Let A be an arbitrary set, and let B = {x A : x / x}. That is, B contains all sets in A that do not contain themselves: For all y, ( ) y B if and only

More information

Logic and Automata I. Wolfgang Thomas. EATCS School, Telc, July 2014

Logic and Automata I. Wolfgang Thomas. EATCS School, Telc, July 2014 Logic and Automata I EATCS School, Telc, July 2014 The Plan We present automata theory as a tool to make logic effective. Four parts: 1. Some history 2. Automata on infinite words First step: MSO-logic

More information

Computational Models - Lecture 3 1

Computational Models - Lecture 3 1 Computational Models - Lecture 3 1 Handout Mode Iftach Haitner. Tel Aviv University. November 14, 2016 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice Herlihy, Brown University.

More information

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION CSE 105 THEORY OF COMPUTATION Spring 2016 http://cseweb.ucsd.edu/classes/sp16/cse105-ab/ Today's learning goals Sipser Ch 3.3, 4.1 State and use the Church-Turing thesis. Give examples of decidable problems.

More information

We define the multi-step transition function T : S Σ S as follows. 1. For any s S, T (s,λ) = s. 2. For any s S, x Σ and a Σ,

We define the multi-step transition function T : S Σ S as follows. 1. For any s S, T (s,λ) = s. 2. For any s S, x Σ and a Σ, Distinguishability Recall A deterministic finite automaton is a five-tuple M = (S,Σ,T,s 0,F) where S is a finite set of states, Σ is an alphabet the input alphabet, T : S Σ S is the transition function,

More information

Computational Models - Lecture 3

Computational Models - Lecture 3 Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. p. 1 Computational Models - Lecture 3 Equivalence of regular expressions and regular languages (lukewarm leftover

More information

CS256/Spring 2008 Lecture #11 Zohar Manna. Beyond Temporal Logics

CS256/Spring 2008 Lecture #11 Zohar Manna. Beyond Temporal Logics CS256/Spring 2008 Lecture #11 Zohar Manna Beyond Temporal Logics Temporal logic expresses properties of infinite sequences of states, but there are interesting properties that cannot be expressed, e.g.,

More information

Takeaway Notes: Finite State Automata

Takeaway Notes: Finite State Automata Takeaway Notes: Finite State Automata Contents 1 Introduction 1 2 Basics and Ground Rules 2 2.1 Building Blocks.............................. 2 2.2 The Name of the Game.......................... 2 3 Deterministic

More information

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

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

More information

Deterministic Finite Automata (DFAs)

Deterministic Finite Automata (DFAs) CS/ECE 374: Algorithms & Models of Computation, Fall 28 Deterministic Finite Automata (DFAs) Lecture 3 September 4, 28 Chandra Chekuri (UIUC) CS/ECE 374 Fall 28 / 33 Part I DFA Introduction Chandra Chekuri

More information

CS21 Decidability and Tractability

CS21 Decidability and Tractability CS21 Decidability and Tractability Lecture 2 January 5, 2018 January 5, 2018 CS21 Lecture 2 1 Outline Finite Automata Nondeterministic Finite Automata Closure under regular operations NFA, FA equivalence

More information

Lecture Notes On THEORY OF COMPUTATION MODULE -1 UNIT - 2

Lecture Notes On THEORY OF COMPUTATION MODULE -1 UNIT - 2 BIJU PATNAIK UNIVERSITY OF TECHNOLOGY, ODISHA Lecture Notes On THEORY OF COMPUTATION MODULE -1 UNIT - 2 Prepared by, Dr. Subhendu Kumar Rath, BPUT, Odisha. UNIT 2 Structure NON-DETERMINISTIC FINITE AUTOMATA

More information