Computational Models #1
|
|
- Griffin Brown
- 5 years ago
- Views:
Transcription
1 Computational Models #1 Handout Mode Nachum Dershowitz & Yishay Mansour March 13-15, 2017 Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
2 Lecture Outline I Motivation I Languages, words and alphabets I Finite automata and regular languages I Regular operations I Sipser, Chapter 1 Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
3 Time Magazine Put the right kind of software into a computer, and it will do whatever you want it to. There may be limits on what you can do with the machines themselves, but there are no limits on what you can do with software.
4 Chess Games: Positions: Positions: 20, 400, 5362, 71852, (?), (?),...
5
6 states initial terminal
7 Part I Languages, words and alphabets Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
8 Languages, words and alphabets Definition 1 An alphabet is a finite set of letters. I ={a, b, c,...,z} the English alphabet. I ={,,,..., } the Greek alphabet. I ={0, 1} the binary alphabet. I ={0, 1,...,9} the digital alphabet. Definition 2 A word (i.e., string) over, is a finite sequence of letters from. The collection of all strings over is denoted by. For {0, 1}, the binary alphabet, ", 1, 0, , are all members of. Definition 3 A language over is a (possibly infinite) subset of. Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
9 Language Examples I Modern English. I Ancient Greek. I All prime numbers, written using digits. I A = {w 2{0, 1} : w has at most seventeen 0 s}. I B = {0 n 1 n : n 0}. I C = {w 2{0, 1} : w has an equal number of 0 s and 1 s}. Make sure you understand what the above notions stand for... Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
10 Part II Finite Automata Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
11 Example: A One-Way Automatic Door front pad rear pad door I open when person approaches I hold open until person clears I don t open when someone standing behind door Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
12 The Automatic Door as DFA REAR BOTH NEITHER closed FRONT open FRONT REAR BOTH NEITHER I States: I OPEN I CLOSED I Sensor: I FRONT: someone on front pad I REAR: someone on rear pad I BOTH: someone(s) on both pads I NEITHER no one on either pad. Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
13 The Automatic Door as DFA A DFA is Deterministic Finite Automata REAR BOTH NEITHER closed FRONT open FRONT REAR BOTH NEITHER neither front rear both closed closed open closed closed open closed open open open Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
14 DFA: Informal definition The machine M 1 : q 1 q q 2 3 I States: q 1, q 2, and q 3. I Start state: q 1 (arrow from outside ). I Accept state: q 2 (double circle). I State transitions: arrows tagged with letters. 0,1 Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
15 DFA: Informal definition (cont.) q 1 q q 2 3 0,1 I On an input string I DFA begins in start state q1 I after reading each symbol, DFA makes state transition with matching label. I After reading last symbol, DFA produces" output: I accept if DFA is an accepting state. I reject otherwise. Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
16 DFA: Informal definition (cont..) q 1 q q 2 3 0,1 What happens on the following input strings: I 1101 I 0010 I I In general?! Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
17 DFA: Informal definition (cont...) q 1 q q 2 3 This DFA accepts I All input strings that end with a 1 I All input strings that contain at least one 1, and end with an even number of 0 s I No other strings Proof:? 0,1 Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
18 DFA - Formal Definition Definition 4 A deterministic finite automaton (DFA) is a 5-tuple (Q,,,q 0, F), where I Q is a finite set called the states I is a finite set called the alphabet I : Q! Q is the transition function I q 0 2 Q is the start state I F Q is the set of accept states Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
19 Back to M q 1 q q 2 3 0,1 M 1 =(Q,,,q 1, F) where I Q = {q 1, q 2, q 3 }, ={0, 1}, I the transition function I q 1 is the start state I F = {q 2 }. is 0 1 q 1 q 1 q 2 q 2 q 3 q 2 q 3 q 2 q 2 Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
20 Another Example a s b a q 1 r 1 b b a a b b q 2 r 2 a Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
21 Formal Model of Computation Definition 5 M =(Q,,,q 0, F) accepts w 2 if b M(q 0, w) 2 F. Definition 6 ( b ) b M : Q 7! Q is defined by b M (q, w) = ( b (q, w1,...,n 1 ), w n ), n = w 1 q, w = ".. I w 1,...,k stands for the word w 1,...,w k the k-letter prefix of w (w 1,...,0 = w ; = ") I Note that b M(q, )= (q, ) for 2. I We write b when M is clear from the context. Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
22 An equivalent definition Definition 7 (Equivalent definition) M =(Q,,,q 0, F) accepts w = w 1 w 2...w n, if 9r 0,...,r n 2 Q s.t., I r 0 = q 0. I (r i, w i+1 )=r i+1, for all 0 apple i < n. I r n 2 F. Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
23 The language of a DFA Definition 8 L(M), the language of a DFA M, is the set of strings that M accepts. We sometime say that M accepts the language L(M). I M may accept many strings I M accepts only one language. What language does M accept if it accepts no strings? Definition 9 A language is called regular, if some deterministic finite automaton accepts it. Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
24 Example: DFA M 2 I Q = {q 1, q 2 }, ={0, 1}, F = {q 2 }, =? I What is L(M 2 ):={w 2{0, 1} : b (q 1, w) =q 2 }? Theorem 10 L(M 2 )={w 2{0, 1} :# 1 (w) is odd}. w. I Proof by induction on the word length # 1 (w) number of ones in I What does it mean? The j th assumption: w 2{0, 1} j is in L(M) iff # 1 (w) is odd Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
25 Proving L(M 2 )=L 0 := {w 2 :# 1 (w) is odd} I Basis (length 0): " /2 L 0 and b (q 1, )=q 1 =) /2 L(M 2 ). I Step: assume hypothesis holds for words of length j 0. I Let x = y 2{0, 1} j+1 for 2{0, 1} (hence, y = j). I If # 1 (y) is even. By assumption b (q 1, y) =q 1. I = 1 =) 1. # 1 (x) is odd =) x 2L 0 2. b (q1, x) := ( b (q 1, y), )= (q 1, 1) =q 2 =) x 2L(M 2 ). I = 0 =) 1. # 1 (x) is even =) x /2 L 0 2. b (q1, x) := ( b (q 1, y), )= (q 1, 0) =q 1 =) x /2 L(M 2 ). I If # 1 (y) is odd... I We proved for x 2{0, 1} j+1 : x 2L(M 2 ) () x 2L 0 Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
26 The language of M q 1 q q 2 3 Theorem 11 L(M 1 )={w10 2k : k 0, w 2{0, 1} } 0,1 Proof: Claim 12 (implies the theorem) Let L 0 i = {x 2{0, 1} : b (q 1, x) =q i } and let I L 1 = {0 k : k 0} I L 2 = {w10 2k : k 0, w 2{0, 1} } I L 3 = {w10 2k+1 : k 0, w 2{0, 1} } Then, L 0 i = L i for every i 2{1, 2, 3} Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
27 Proving Claim?? We need to prove that 8i 2{1, 2, 3}: x 2L i () x 2L 0 i. Recall that x 2L 0 i () b (x) =q i I Proof by induction on word length. I Induction basis: Easy to see that hypothesis holds for. I Induction step: Assume hypothesis holds for words of length j 0. I Let x = y 2{0, 1} j+1 for 2{0, 1}. I We prove the hypothesis for x, separately for each i 2{1, 2, 3} Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
28 L 1 = {0 k : k 0} Recall x = y 2{0, 1} j+1 for 2{0, 1}. Proving: x 2L 1 =) b (q 1, x) =q 1 ( =) x 2L 0 1 ). I x = 0 j+1, y = 0 j and = 0. I Since y 2L 1, by i.h. b (q 1, y) =q 1 I Therefore, b (q 1, x) = ( b (q, y), )= (q 1, 0) =q 1. Proving: b (q 1, x) =q 1 =) x 2L 1. I Let q y = b (q 1, y) (hence, b (q 1, x) = (q y, )=q 1 ) I q y = q 1 and = 0. (?) I By i.h. y = 0 j. I Hence, x = y = 0 j 0 = 0 j+1 2L 1. Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
29 L 2 = {w10 2k : k 0, w 2{0, 1} } Recall x = y 2{0, 1} j+1 for 2{0, 1}. Proving x 2L 2 =) b (q 1, x) =q 2. I Assume = 1 I Since (q i, 1) =q 2 for any i =) b (q 1, x) =q 2. I Assume x = w10 2k for k > 0 ( =) y = w10 2k 1 and = 0) I Hence, y 2L3. I By i.h. b (q1, y) =q 3 I Thus, b (q1, x) = (q 3, 0) =q 2. Proving b (q 1, x) =q 2 =) x 2L 2. I Assume = 1 =) x 2L 2.(?) I Assume = 0 I q y := b (q 1, y) =q 3 I By i.h. y = w10 2k+1 for some k 0 I Therefore x = y = w10 2k+1 0 2L 2. Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
30 L 3 = {w10 2k+1 : k 0, w 2{0, 1} } Recall x = y 2{0, 1} j+1 for 2{0, 1}. Proving x 2L 3 =) b (q 1, x) =q 3. I x = w10 2k+1, y = w10 2k and = 0 I y 2L 2 I By i.h. b (q 1, y) =q 2. I Therefore, b (q 1, x) = (q 2, 0) =q 3. Proving b (q 1, x) =q 3 =) x 2L 3. I Let q y = b (q 1, y) I Hence, q y = q 2 and = 0 (?) I By i.h. y = w10 2k I Therefore, x = y = w10 2k 0 2L 3. Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
31 Part III Regular Operations Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
32 Additional examples of regular languages Let ={0, 1}. I {w 2{0, 1} :# 1 (w) 0 mod 7}. I Sequence of 0 followed by sequence of 1, i.e., {0 m 1 n : m, n 0}. I Any finite language. All the above languages are regular Is there a simple proof? Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
33 The regular operations Let A and B be languages. The union operation: A[B = {x : x 2A_x 2B} The concatenation operation: AkB = {xy : x 2A^y 2B} The star operation: A = {x 1 x 2...x k : k 0 and each x i 2A} Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
34 The regular operations Examples Let A= {good, bad} and B = {boy, girl}. Union Concatenation A[B= {good, bad, boy, girl} AkB = {goodboy, goodgirl, badboy, badgirl} Star A = {", good, bad, goodgood, goodbad, badbad, badgood,...} Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
35 Closure under union Theorem 13 If L 1 and L 2 are regular languages, then so is L 1 [L 2. Approach to Proof: I Some DFA M 1 accepts L 1 I Some DFA M 2 accepts L 2 I Construct DFA M that accepts L 1 [L 2. Attempted Proof Idea: I first emulate M 1, and I if M 1 doesn t accept, then emulate M 2. What s wrong with this? Fix: Emulate both machines simultaneously. Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
36 Closure Under Union: Correct Proof Suppose I M 1 =(Q 1,, 1, q 1, F 1 ) accepts L 1, I M 2 =(Q 2,, 2, q 2, F 2 ) accepts L 2. Define M as follows (M will accept L 1 [L 2 ): I Q = Q 1 Q 2. I is the same. I For each (r 1, r 2 ) 2 Q and a 2, ((r 1, r 2 ), a) =( 1 (r 1, a), 2(r 2, a)) I q 0 =(q 1, q 2 ) I F = {(r 1, r 2 ): r 1 2 F 1 or r 2 2 F 2 }. I Formal proof (next slide) (hey, why not choose F = F 1 F 2?) Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
37 Correctness of the construction Claim 14 L(M) =L(M 1 ) [L(M 2 ). Follows by the next claim. Claim 15 b M ((q 1, q 2 ), x) =( b 1(q 1, x), b 2(q 2, x)). Proof: By induction on word length. DIY... Proving Claim??: I x 2L(M 1 ) =) b 1(q 1, x) =r 1 2 F 1. (similar if x 2L(M 2 ).) I By Claim??, b M((q 1, q 2 ), x) =(r 1, ) 2 F =) x 2L(M). I x 2L(M) =) b M((q 1, q 2 ), x) =(r 1, r 2 ) 2 F. I By Claim??, (r 1, r 2 )=( b 1(q 1, x), b 2(q 2, x)). I Hence, either r 1 2 F 1 or r 2 2 F 2 =) x 2L(M 1 ) [L(M 2 ). Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
38 What about concatenation? Theorem 16 If L 1, L 2 are regular languages, then so is L 1 kl 2. Example: L 1 = {good, bad} and L 2 = {boy, girl}. L 1 kl 2 = {goodboy, goodgirl, badboy, badgirl} This is much harder to prove. Idea: Simulate M 1 for a while, then switch to M 2. Problem: But when do you switch? This leads us into non-determinism, wait for next class... Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
39 Part IV Non-deterministic Finite Automata Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
40 NFA non-deterministic Finite Automata 0,1 0,1 0 0 q q q q 4 I May have more than one transition labeled with the same symbol, I May have no transitions labeled with a certain symbol, I May have transitions labeled with ", the symbol of the empty string. Will deal with this latter Every DFA is also an NFA. Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
41 Non-deterministic computation 0,1 0,1 0 0 q q q q 4 What happens when more than one transition is possible? I The machine splits into multiple copies I Each branch follows one possibility I Together, branches follow all possibilities. I If the input doesn t appear, that branch dies. I Automaton accepts if some branch accepts. Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
42 Computation on ,1 0,1 0 0 q q 1 q q 4 symbol 1 q 1 0 q 1 0 q 1 q 2 1 q q q q 1 q 4 Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
43 Why non-determinism? Theorem 17 (Informal, to be proved soon) Deterministic and non-deterministic finite automata, accept exactly the same set of languages. Q.: So why do we need NFA s? Design a finite automaton for the language L all binary strings with a 1 in their third-to-the-last position? Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
44 NFA for L 0,1 1 0,1 q q 1 q 2 3 0,1 q 4 I Guesses which symbol is third from the last, and I checks that indeed it is a 1. I If guess is premature, that branch dies, and no harm occurs. Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
45 DFA for L I Have 8 states, encoding the last three observed letters. I A state for each string in {0, 1} 3. I Add transitions on modifying the suffix, give the new letter. I Mark as accepting, the strings q q 100 q 010 q q 001 q q q DFA has few bugs... Nachum Dershowitz & Yishay Mansour Computational Models #1 March 13-15, / 41
Computational Models - Lecture 1 1
Computational Models - Lecture 1 1 Handout Mode Ronitt Rubinfeld and Iftach Haitner. Tel Aviv University. February 29/ March 02, 2016 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames
More informationCritical CS Questions
Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. p. 1 Critical CS Questions What is a computer? And What is a Computation? real computers too complex for any
More informationComputational Models: Class 1
Computational Models: Class 1 Benny Chor School of Computer Science Tel Aviv University October 19, 2015 Based on slides by Maurice Herlihy, Brown University, and modifications by Iftach Haitner and Yishay
More informationTime Magazine (1984)
Time Magazine (1984) Put the right kind of software into a computer, and it will do whatever you want it to. There may be limits on what you can do with the machines themselves, but there are no limits
More informationNon-Deterministic Finite Automata
Slides modified Yishay Mansour on modification by Benny Chor, based on original slides by Maurice Herlihy, Brown University. p. 8 Non-Deterministic Finite Automata 0,1 0,1 0 0,ε q q 1 q 2 3 1 q 4 an NFA
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 informationCPS 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
More informationCHAPTER 1 Regular Languages. Contents
Finite Automata (FA or DFA) CHAPTER Regular Languages Contents definitions, examples, designing, regular operations Non-deterministic Finite Automata (NFA) definitions, euivalence of NFAs and DFAs, closure
More informationComputational Models Lecture 2 1
Computational Models Lecture 2 1 Handout Mode Ronitt Rubinfeld and Iftach Haitner. Tel Aviv University. March 16/18, 2015 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice
More informationComputational Models Lecture 2 1
Computational Models Lecture 2 1 Handout Mode Iftach Haitner. Tel Aviv University. October 30, 2017 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice Herlihy, Brown University.
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 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 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 informationIntroduction to Languages and Computation
Introduction to Languages and Computation George Voutsadakis 1 1 Mathematics and Computer Science Lake Superior State University LSSU Math 400 George Voutsadakis (LSSU) Languages and Computation July 2014
More informationCOM364 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 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 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 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 informationCISC 4090 Theory of Computation
9/2/28 Stereotypical computer CISC 49 Theory of Computation Finite state machines & Regular languages Professor Daniel Leeds dleeds@fordham.edu JMH 332 Central processing unit (CPU) performs all the instructions
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 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 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 informationCS 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 informationComputational Models Lecture 8 1
Computational Models Lecture 8 1 Handout Mode Nachum Dershowitz & Yishay Mansour. Tel Aviv University. May 17 22, 2017 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice
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 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 informationClosure under the Regular Operations
Closure under the Regular Operations 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
More informationClarifications 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 informationDeterministic 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 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 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 informationDeterministic Finite Automata (DFAs)
Algorithms & Models of Computation CS/ECE 374, Fall 27 Deterministic Finite Automata (DFAs) Lecture 3 Tuesday, September 5, 27 Sariel Har-Peled (UIUC) CS374 Fall 27 / 36 Part I DFA Introduction Sariel
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 311: Foundations of Computing. Lecture 23: Finite State Machine Minimization & NFAs
CSE : Foundations of Computing Lecture : Finite State Machine Minimization & NFAs State Minimization Many different FSMs (DFAs) for the same problem Take a given FSM and try to reduce its state set by
More informationTheory of Computation Lecture 1. Dr. Nahla Belal
Theory of Computation Lecture 1 Dr. Nahla Belal Book The primary textbook is: Introduction to the Theory of Computation by Michael Sipser. Grading 10%: Weekly Homework. 30%: Two quizzes and one exam. 20%:
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 informationfront pad rear pad door
front pad rear pad door REAR BOTH NEITHER closed FRONT open FRONT REAR BOTH NEITHER Think of this as a simple program that outputs one of two values (states) when provided with the current state and an
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 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 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 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 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 informationHomework. Staff. Happy and fruitful New Year. Welcome to CS105. (Happy New Year) שנה טובה. Meeting Times.
Welcome to CS5 and Happy and fruitful ew Year שנה טובה (Happy ew Year) Meeting Times Lectures: Tue Thu 3:3p -4:5p WLH ote: Thu Oct 9 Lecture is canceled there may be a make-up lecture by quarter s end.
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 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 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 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 informationPS2 - 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,
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 informationCSC173 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
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 informationCS 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
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 informationEquivalence of DFAs and NFAs
CS 172: Computability and Complexity Equivalence of DFAs and NFAs It s a tie! DFA NFA Sanjit A. Seshia EECS, UC Berkeley Acknowledgments: L.von Ahn, L. Blum, M. Blum What we ll do today Prove that DFAs
More informationFinite Automata Theory and Formal Languages TMV027/DIT321 LP4 2017
Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2017 Lecture 4 Ana Bove March 24th 2017 Structural induction; Concepts of automata theory. Overview of today s lecture: Recap: Formal Proofs
More informationGreat Theoretical Ideas in Computer Science. Lecture 4: Deterministic Finite Automaton (DFA), Part 2
5-25 Great Theoretical Ideas in Computer Science Lecture 4: Deterministic Finite Automaton (DFA), Part 2 January 26th, 27 Formal definition: DFA A deterministic finite automaton (DFA) M =(Q,,,q,F) M is
More informationComputational Models: Class 3
Computational Models: Class 3 Benny Chor School of Computer Science Tel Aviv University November 2, 2015 Based on slides by Maurice Herlihy, Brown University, and modifications by Iftach Haitner and Yishay
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 informationComputational Models: Class 5
Computational Models: Class 5 Benny Chor School of Computer Science Tel Aviv University March 27, 2019 Based on slides by Maurice Herlihy, Brown University, and modifications by Iftach Haitner and Yishay
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 informationIntro 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 informationUNIT-I. Strings, Alphabets, Language and Operations
UNIT-I Strings, Alphabets, Language and Operations Strings of characters are fundamental building blocks in computer science. Alphabet is defined as a non empty finite set or nonempty set of symbols. The
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 informationDeterministic Finite Automata (DFAs)
Algorithms & Models of Computation CS/ECE 374, Spring 29 Deterministic Finite Automata (DFAs) Lecture 3 Tuesday, January 22, 29 L A TEXed: December 27, 28 8:25 Chan, Har-Peled, Hassanieh (UIUC) CS374 Spring
More informationCMSC 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 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 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 informationComputational 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 informationDecision, Computation and Language
Decision, Computation and Language Non-Deterministic Finite Automata (NFA) Dr. Muhammad S Khan (mskhan@liv.ac.uk) Ashton Building, Room G22 http://www.csc.liv.ac.uk/~khan/comp218 Finite State Automata
More informationClosure 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 informationCMPSCI 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
More informationAutomata Theory for Presburger Arithmetic Logic
Automata Theory for Presburger Arithmetic Logic References from Introduction to Automata Theory, Languages & Computation and Constraints in Computational Logic Theory & Application Presented by Masood
More informationAutomata: 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
More informationCSE 105 Theory of Computation Professor Jeanne Ferrante
CSE 105 Theory of Computation http://www.jflap.org/jflaptmp/ Professor Jeanne Ferrante 1 Today s agenda NFA Review and Design NFA s Equivalence to DFA s Another Closure Property proof for Regular Languages
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 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 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 informationECS 120: Theory of Computation UC Davis Phillip Rogaway February 16, Midterm Exam
ECS 120: Theory of Computation Handout MT UC Davis Phillip Rogaway February 16, 2012 Midterm Exam Instructions: The exam has six pages, including this cover page, printed out two-sided (no more wasted
More informationFinite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018
Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Lecture 4 Ana Bove March 23rd 2018 Recap: Formal Proofs How formal should a proof be? Depends on its purpose...... but should be convincing......
More informationFORMAL 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 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 informationCS:4330 Theory of Computation Spring Regular Languages. Finite Automata and Regular Expressions. Haniel Barbosa
CS:4330 Theory of Computation Spring 2018 Regular Languages Finite Automata and Regular Expressions Haniel Barbosa Readings for this lecture Chapter 1 of [Sipser 1996], 3rd edition. Sections 1.1 and 1.3.
More informationExtended 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 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 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 informationChapter 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
More informationLanguages, regular languages, finite automata
Notes on Computer Theory Last updated: January, 2018 Languages, regular languages, finite automata Content largely taken from Richards [1] and Sipser [2] 1 Languages An alphabet is a finite set of characters,
More informationCMSC 330: Organization of Programming Languages
CMSC 330: Organization of Programming Languages Theory of Regular Expressions DFAs and NFAs Reminders Project 1 due Sep. 24 Homework 1 posted Exam 1 on Sep. 25 Exam topics list posted Practice homework
More informationCS 154 Introduction to Automata and Complexity Theory
CS 154 Introduction to Automata and Complexity Theory cs154.stanford.edu 1 INSTRUCTORS & TAs Ryan Williams Cody Murray Lera Nikolaenko Sunny Rajan 2 Textbook 3 Homework / Problem Sets Homework will be
More informationName: Student ID: Instructions:
Instructions: Name: CSE 322 Autumn 2001: Midterm Exam (closed book, closed notes except for 1-page summary) Total: 100 points, 5 questions, 20 points each. Time: 50 minutes 1. Write your name and student
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 informationLecture 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
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 informationFinite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018
Finite Automata Theory and Formal Languages TMV27/DIT32 LP4 28 Lecture 5 Ana Bove March 26th 28 Recap: Inductive sets, (terminating) recursive functions, structural induction To define an inductive set
More informationBü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 informationPushdown automata. Twan van Laarhoven. Institute for Computing and Information Sciences Intelligent Systems Radboud University Nijmegen
Pushdown automata Twan van Laarhoven Institute for Computing and Information Sciences Intelligent Systems Version: fall 2014 T. van Laarhoven Version: fall 2014 Formal Languages, Grammars and Automata
More informationApplied Computer Science II Chapter 1 : Regular Languages
Applied Computer Science II Chapter 1 : Regular Languages Prof. Dr. Luc De Raedt Institut für Informatik Albert-Ludwigs Universität Freiburg Germany Overview Deterministic finite automata Regular languages
More informationComputational 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 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 informationGEETANJALI 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