More Properties of Regular Languages
|
|
- Neal Strickland
- 5 years ago
- Views:
Transcription
1 More Properties of Regular anguages 1
2 We have proven Regular languages are closed under: Union Concatenation Star operation Reverse 2
3 Namely, for regular languages 1 and 2 : Union 1 2 Concatenation Star operation Reverse R 1 Regular anguages 3
4 We will prove Regular languages are closed under: Complement Intersection 4
5 Namely, for regular languages 1 and 2 : Complement Intersection Regular anguages 5
6 Complement Theorem: For regular language the complement is regular Proof: Take DFA that accepts and make nonfinal states final final states nonfinal Resulting DFA accepts 6
7 Example: a ( a* b) a,b b a, b q0 q1 q2 ( a * a * b( a b)( a b)*) a a,b b a, b q0 q1 q2 7
8 Intersection Theorem: For regular languages the intersection and 2 is regular Proof: Apply DeMorgan s aw:
9 1, 2 regular 1, 2 regular 1 2 regular 1 2 regular 1 2 regular 9
10 Standard Representations of Regular anguages 10
11 Standard Representations of Regular anguages Regular anguages DFAs Regular Grammars NFAs Regular Expressions 11
12 When we say: We are given a Regular anguage We mean: anguage representation is in a standard We may assume a regular language can be represented as a DFA, an NFA, a regular expression, or a regular grammar, whatever we find convenient. 12
13 Elementary Questions about Regular anguages 13
14 Membership Question Question: Given regular language and string w how can we check if? w Answer: Take the DFA that accepts and check if w is accepted 14
15 DFA w w DFA w w 15
16 Question: Given regular language how can we check if is empty:? ( ) Answer: Take the DFA that accepts Check if there is a path from the initial state to a final state 16
17 DFA DFA 17
18 Question: Given regular language how can we check if is finite? Answer: Take the DFA that accepts Check if there is a walk with cycle from the initial state to a final state 18
19 DFA is infinite DFA is finite 19
20 Question: Given regular languages 1 and 2 how can we check if 1 2? Answer: Find if ( ) ( 1 ) 20
21 ( ) ( 1 ) 1 2 and
22 ( ) ( 1 ) 1 2 or
23 Non-regular languages 23
24 Non-regular languages { a n b n : n 0} { ww R : w { a, b}*} Regular languages a *b b* c a b c( a b)* etc... 24
25 How can we prove that a language is not regular? Prove that there is no DFA that accepts Problem: this is not easy to prove Solution: the Pumping emma!!! 25
26 The Pigeonhole Principle 26
27 4 pigeons 3 pigeonholes 27
28 A pigeonhole must contain at least two pigeons 28
29 n pigeons... m pigeonholes n m... 29
30 The Pigeonhole Principle n m pigeons pigeonholes n m There is a pigeonhole with at least 2 pigeons... 30
31 The Pigeonhole Principle and DFAs 31
32 DFA with 4 states b b b a q1 q b 2 q3 a b a q 4 32
33 In walks of strings: a aa aab no state is repeated b b b a a q1 q2 q3 b q 4 a a 33
34 In walks of strings: aabb bbaa abbabb a state is repeated abbbabbabb... b b b a a q1 q2 q3 b q 4 a a 34
35 In walks of strings: aabb bbaa abbabb a state is repeated abbbabbabb... b b b a a q1 q2 q3 b q 4 a a 35
36 w w 4 If string has length : Then the transitions of string Thus, a state must be repeated w are more than the states of the DFA b b b a a q1 q2 q3 b q 4 a a 36
37 In general, for any DFA: String has length number of states w A state q must be repeated in the walk of w walk of w... q... Repeated state 37
38 w In other words for a string : a transitions are pigeons q states are pigeonholes walk of w... q... Repeated state 38
39 The Pumping emma 39
40 Take an infinite regular language DFA that accepts m states 40
41 Take string w with w There is a walk with label w :... walk w 41
42 If string w has length w m number of states of DFA then, from the pigeonhole principle: a state q is repeated in the walk w... q... walk w 42
43 et q be the first state repeated... q... walk w 43
44 Write w x y z y... q... x z 44
45 Observations: length x y m number of states length y 1 of DFA y... q... x z 45
46 Observation: The string x z is accepted y... q... x z 46
47 Observation: The string x y y z is accepted y... q... x z 47
48 Observation: The string x y y y z is accepted y... q... x z 48
49 In General: The string x y i z is accepted i 0,1, 2,... y... q... x z 49
50 In General: x y i z i 0,1, 2,... The original language y... q... x z 50
51 In other words, we described: The Pumping emma!!! 51
52 The Pumping emma: Given a infinite regular language there exists an integer m for any string w with length w m we can write w x y z with x y m y 1 and such that: x y i z i 0,1, 2,... 52
53 Applications of the Pumping emma 53
54 Theorem: The language { a b : n 0} n n is not regular Proof: Use the Pumping emma 54
55 n n { a b : n 0} Assume for contradiction that is a regular language Since is infinite we can apply the Pumping emma 55
56 n n { a b : n 0} et m be the integer in the Pumping emma Pick a string w such that: w length w m We pick m b m w a 56
57 Write: a m b m x y z From the Pumping emma it must be that length x y m, y 1 m m xyz a m b m a... aa... aa... ab... b x y z Thus: y a k, k 1 57
58 x y z m b m a y a k, k 1 From the Pumping emma: x y i z i 0,1, 2,... Thus: x y 2 z 58
59 m m x y z a b y a, k 1 k From the Pumping emma: x y 2 z m k m xy 2 z a... aa... aa... aa... ab... b x y y z Thus: a m k b m 59
60 a m k b m k 1 BUT: n n { a b : n 0} a m k b m CONTRADICTION!!! 60
61 Therefore: Our assumption that is a regular language is not true Conclusion: is not a regular language 61
62 Non-regular language { a b : n 0} n n Regular languages 62
Formal Languages, Automata and Models of Computation
CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 5 School of Innovation, Design and Engineering Mälardalen University 2011 1 Content - More Properties of Regular Languages (RL)
More informationFORMAL LANGUAGES, AUTOMATA AND COMPUTATION
FORMAL LANGUAGES, AUTOMATA AND COMPUTATION IDENTIFYING NONREGULAR LANGUAGES PUMPING LEMMA Carnegie Mellon University in Qatar (CARNEGIE MELLON UNIVERSITY IN QATAR) SLIDES FOR 15-453 LECTURE 5 SPRING 2011
More information2.1 Solution. E T F a. E E + T T + T F + T a + T a + F a + a
. Solution E T F a E E + T T + T F + T a + T a + F a + a E E + T E + T + T T + T + T F + T + T a + T + T a + F + T a + a + T a + a + F a + a + a E T F ( E) ( T ) ( F) (( E)) (( T )) (( F)) (( a)) . Solution
More informationThe Pumping Lemma and Closure Properties
The Pumping Lemma and Closure Properties Mridul Aanjaneya Stanford University July 5, 2012 Mridul Aanjaneya Automata Theory 1/ 27 Tentative Schedule HW #1: Out (07/03), Due (07/11) HW #2: Out (07/10),
More informationBefore 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 informationNon-regular languages
Non-regular languages (Pumping Lemma) Fall 2017 Costas Busch - RPI 1 Non-regular languages { a n n : n 0} { vv R : v{ a, }*} Regular languages a* * c a c( a )* etc... Fall 2017 Costas Busch - RPI 2 How
More informationProperties of Regular Languages. Wen-Guey Tzeng Department of Computer Science National Chiao Tung University
Properties of Regular Languages Wen-Guey Tzeng Department of Computer Science National Chiao Tung University Closure Properties Question: L is a regular language and op is an operator on strings. Is op(l)
More informationCSci 311, Models of Computation Chapter 4 Properties of Regular Languages
CSci 311, Models of Computation Chapter 4 Properties of Regular Languages H. Conrad Cunningham 29 December 2015 Contents Introduction................................. 1 4.1 Closure Properties of Regular
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 informationTDDD65 Introduction to the Theory of Computation
TDDD65 Introduction to the Theory of Computation Lecture 2 Gustav Nordh, IDA gustav.nordh@liu.se 2012-08-31 Outline - Lecture 2 Closure properties of regular languages Regular expressions Equivalence of
More informationTheory of Computation
Fall 2002 (YEN) Theory of Computation Midterm Exam. Name:... I.D.#:... 1. (30 pts) True or false (mark O for true ; X for false ). (Score=Max{0, Right- 1 2 Wrong}.) (1) X... If L 1 is regular and L 2 L
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 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 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 informationFinite Automata and Regular languages
Finite Automata and Regular languages Huan Long Shanghai Jiao Tong University Acknowledgements Part of the slides comes from a similar course in Fudan University given by Prof. Yijia Chen. http://basics.sjtu.edu.cn/
More informationClosure Properties of Context-Free Languages. Foundations of Computer Science Theory
Closure Properties of Context-Free Languages Foundations of Computer Science Theory Closure Properties of CFLs CFLs are closed under: Union Concatenation Kleene closure Reversal CFLs are not closed under
More informationLecture 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 informationFORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
15-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY THE PUMPING LEMMA FOR REGULAR LANGUAGES and REGULAR EXPRESSIONS TUESDAY Jan 21 WHICH OF THESE ARE REGULAR? B = {0 n 1 n n 0} C = { w w has equal number
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 informationProperties of Context-Free Languages. Closure Properties Decision Properties
Properties of Context-Free Languages Closure Properties Decision Properties 1 Closure Properties of CFL s CFL s are closed under union, concatenation, and Kleene closure. Also, under reversal, homomorphisms
More informationMore on Regular Languages and Non-Regular Languages
More on Regular Languages and Non-Regular Languages CSCE A35 Decision Properties of Regular Languages Given a (representation, e.g., RE, FA, of a) regular language L, what can we tell about L? Since there
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 informationCS5371 Theory of Computation. Lecture 5: Automata Theory III (Non-regular Language, Pumping Lemma, Regular Expression)
CS5371 Theory of Computation Lecture 5: Automata Theory III (Non-regular Language, Pumping Lemma, Regular Expression) Objectives Prove the Pumping Lemma, and use it to show that there are non-regular languages
More informationProperties of Regular Languages (2015/10/15)
Chapter 4 Properties of Regular Languages (25//5) Pasbag, Turkey Outline 4. Proving Languages Not to e Regular 4.2 Closure Properties of Regular Languages 4.3 Decision Properties of Regular Languages 4.4
More informationCSE 105 THEORY OF COMPUTATION
CSE 105 THEORY OF COMPUTATION Spring 2017 http://cseweb.ucsd.edu/classes/sp17/cse105-ab/ Today's learning goals Sipser Ch 1.4 Explain the limits of the class of regular languages Justify why the Pumping
More informationComment: The induction is always on some parameter, and the basis case is always an integer or set of integers.
1. For each of the following statements indicate whether it is true or false. For the false ones (if any), provide a counter example. For the true ones (if any) give a proof outline. (a) Union of two non-regular
More informationCSE 105 THEORY OF COMPUTATION
CSE 105 THEORY OF COMPUTATION "Winter" 2018 http://cseweb.ucsd.edu/classes/wi18/cse105-ab/ Today's learning goals Sipser Section 1.4 Explain the limits of the class of regular languages Justify why the
More informationContext-Free Languages (Pre Lecture)
Context-Free Languages (Pre Lecture) Dr. Neil T. Dantam CSCI-561, Colorado School of Mines Fall 2017 Dantam (Mines CSCI-561) Context-Free Languages (Pre Lecture) Fall 2017 1 / 34 Outline Pumping Lemma
More informationV Honors Theory of Computation
V22.0453-001 Honors Theory of Computation Problem Set 3 Solutions Problem 1 Solution: The class of languages recognized by these machines is the exactly the class of regular languages, thus this TM variant
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 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 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 informationLecture 7 Properties of regular languages
Lecture 7 Properties of regular languages COT 4420 Theory of Computation Section 4.1 Closure properties of regular languages If L 1 and L 2 are regular languages, then we prove that: Union: L 1 L 2 Concatenation:
More informationChapter 6. Properties of Regular Languages
Chapter 6 Properties of Regular Languages Regular Sets and Languages Claim(1). The family of languages accepted by FSAs consists of precisely the regular sets over a given alphabet. Every regular set is
More informationProperties of Context-Free Languages
Properties of Context-Free Languages 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
More informationComputational Theory
Computational Theory Finite Automata and Regular Languages Curtis Larsen Dixie State University Computing and Design Fall 2018 Adapted from notes by Russ Ross Adapted from notes by Harry Lewis Curtis Larsen
More informationComputational 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 informationBefore We Start. The Pumping Lemma. Languages. Context Free Languages. Plan for today. Now our picture looks like. Any questions?
Before We Start The Pumping Lemma Any questions? The Lemma & Decision/ Languages Future Exam Question What is a language? What is a class of languages? Context Free Languages Context Free Languages(CFL)
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 informationTheory of Computation (II) Yijia Chen Fudan University
Theory of Computation (II) Yijia Chen Fudan University Review A language L is a subset of strings over an alphabet Σ. Our goal is to identify those languages that can be recognized by one of the simplest
More 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 informationProving languages to be nonregular
Proving languages to be nonregular We already know that there exist languages A Σ that are nonregular, for any choice of an alphabet Σ. This is because there are uncountably many languages in total and
More informationExam 1 CSU 390 Theory of Computation Fall 2007
Exam 1 CSU 390 Theory of Computation Fall 2007 Solutions Problem 1 [10 points] Construct a state transition diagram for a DFA that recognizes the following language over the alphabet Σ = {a, b}: L 1 =
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 informationMA/CSSE 474 Theory of Computation
MA/CSSE 474 Theory of Computation Closure properties of Regular Languages Pumping Theorem Your Questions? Previous class days' material? Reading Assignments? HW 6 or 7 problems? Anything else? 1 To Show
More informationAutomata Theory Final Exam Solution 08:10-10:00 am Friday, June 13, 2008
Automata Theory Final Exam Solution 08:10-10:00 am Friday, June 13, 2008 Name: ID #: This is a Close Book examination. Only an A4 cheating sheet belonging to you is acceptable. You can write your answers
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 informationCSE 105 Theory of Computation Professor Jeanne Ferrante
CSE 105 Theory of Computation http://www.jflap.org/jflaptmp/ Professor Jeanne Ferrante 1 Announcement & Reminders HW 2: Grades not available yet, will be soon Solutions posted, read even if you did well
More informationOgden s Lemma for CFLs
Ogden s Lemma for CFLs Theorem If L is a context-free language, then there exists an integer l such that for any u L with at least l positions marked, u can be written as u = vwxyz such that 1 x and at
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 informationCSE 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 1.4 Give an example of a non-regular language Outline two strategies for proving
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 information10. The GNFA method is used to show that
CSE 355 Midterm Examination 27 February 27 Last Name Sample ASU ID First Name(s) Ima Exam # Sample Regrading of Midterms If you believe that your grade has not been recorded correctly, return the entire
More informationCSE 105 THEORY OF COMPUTATION
CSE 105 THEORY OF COMPUTATION Spring 2018 http://cseweb.ucsd.edu/classes/sp18/cse105-ab/ Today's learning goals Sipser Ch 4.1 Explain what it means for a problem to be decidable. Justify the use of encoding.
More informationRegular Expressions and Language Properties
Regular Expressions and Language Properties Mridul Aanjaneya Stanford University July 3, 2012 Mridul Aanjaneya Automata Theory 1/ 47 Tentative Schedule HW #1: Out (07/03), Due (07/11) HW #2: Out (07/10),
More informationCSE 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.1 Explain what it means for a problem to be decidable. Justify the use of encoding.
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 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 informationFooling 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,
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 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 informationFinite Automata and Regular Languages
Finite Automata and Regular Languages Topics to be covered in Chapters 1-4 include: deterministic vs. nondeterministic FA, regular expressions, one-way vs. two-way FA, minimization, pumping lemma for regular
More 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 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 informationTheory 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
More informationGrade 6 Math Circles October 20/21, Formalism and Languages: Beyond Regular Languages
Faculty of Mathematics Waterloo, Ontario N2L 3G1 Centre for Education in Mathematics and Computing Grade 6 Math Circles October 20/21, 2015 Formalism and Languages: Beyond Regular Languages Dr. Troy Vasiga
More informationUses 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} Some languages are Turing-decidable A Turing Machine will halt on all inputs (either accepting or rejecting). No infinite loops.
and their languages } Some languages are Turing-decidable A Turing Machine will halt on all inputs (either accepting or rejecting). No infinite loops. } Some languages are Turing-recognizable, but not
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 information3515ICT: 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 informationRegular Languages. Problem Characterize those Languages recognized by Finite Automata.
Regular Expressions Regular Languages Fundamental Question -- Cardinality Alphabet = Σ is finite Strings = Σ is countable Languages = P(Σ ) is uncountable # Finite Automata is countable -- Q Σ +1 transition
More informationCS375 Midterm Exam Solution Set (Fall 2017)
CS375 Midterm Exam Solution Set (Fall 2017) Closed book & closed notes October 17, 2017 Name sample 1. (10 points) (a) Put in the following blank the number of strings of length 5 over A={a, b, c} that
More informationTheory of Computation (Classroom Practice Booklet Solutions)
Theory of Computation (Classroom Practice Booklet Solutions) 1. Finite Automata & Regular Sets 01. Ans: (a) & (c) Sol: (a) The reversal of a regular set is regular as the reversal of a regular expression
More informationMA/CSSE 474 Theory of Computation. Your Questions? Previous class days' material Reading Assignments
MA/CSSE 474 Theory of Computation How many regular/non-regular languages are there? Closure properties of Regular Languages (if there is time) Pumping Theorem Your Questions? Previous class days' material
More informationPushdown Automata. We have seen examples of context-free languages that are not regular, and hence can not be recognized by finite automata.
Pushdown Automata We have seen examples of context-free languages that are not regular, and hence can not be recognized by finite automata. Next we consider a more powerful computation model, called a
More informationAnswers to the CSCE 551 Final Exam, April 30, 2008
Answers to the CSCE 55 Final Exam, April 3, 28. (5 points) Use the Pumping Lemma to show that the language L = {x {, } the number of s and s in x differ (in either direction) by at most 28} is not regular.
More informationProperties 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 informationHomework 5 - Solution
DCP3122 Introduction to Formal Languages, Spring 2015 Instructor: Prof. Wen-Guey Tzeng Homework 5 - Solution 5-May-2015 Due: 18-May-2015 1. Given Σ = {a, b, c}, find an NPDA that accepts L = {a n b n+m
More informationSample Midterm. Understanding the questions is part of the exam; you are not allowed to ask questions during the exam.
Sample Midterm Name: This exam consists of five questions. Each question is worth 10 points. The exam is worth 40 points. Your exam score is the sum of your four highest question scores. Calculators, cell
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 informationECS120 Fall Discussion Notes. October 25, The midterm is on Thursday, November 2nd during class. (That is next week!)
ECS120 Fall 2006 Discussion Notes October 25, 2006 Announcements The midterm is on Thursday, November 2nd during class. (That is next week!) Homework 4 Quick Hints Problem 1 Prove that the following languages
More informationAny Wizard of Oz fans? Discrete Math Basics. Outline. Sets. Set Operations. Sets. Dorothy: How does one get to the Emerald City?
Any Wizard of Oz fans? Discrete Math Basics Dorothy: How does one get to the Emerald City? Glynda: It is always best to start at the beginning Outline Sets Relations Proofs Sets A set is a collection of
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 informationCS5371 Theory of Computation. Lecture 9: Automata Theory VII (Pumping Lemma, Non-CFL)
CS5371 Theory of Computation Lecture 9: Automata Theory VII (Pumping Lemma, Non-CFL) Objectives Introduce Pumping Lemma for CFL Apply Pumping Lemma to show that some languages are non-cfl Pumping Lemma
More informationTheory Bridge Exam Example Questions
Theory Bridge Exam Example Questions Annotated version with some (sometimes rather sketchy) answers and notes. This is a collection of sample theory bridge exam questions. This is just to get some idea
More informationCSE 105 THEORY OF COMPUTATION. Spring 2018 review class
CSE 105 THEORY OF COMPUTATION Spring 2018 review class Today's learning goals Summarize key concepts, ideas, themes from CSE 105. Approach your final exam studying with confidence. Identify areas to focus
More informationNPDA, CFG equivalence
NPDA, CFG equivalence Theorem A language L is recognized by a NPDA iff L is described by a CFG. Must prove two directions: ( ) L is recognized by a NPDA implies L is described by a CFG. ( ) L is described
More informationFinite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018
Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Lecture 9 Ana Bove April 19th 2018 Recap: Regular Expressions Algebraic representation of (regular) languages; R, S ::= a R + S RS R......
More informationDecidability (intro.)
CHAPTER 4 Decidability Contents Decidable Languages decidable problems concerning regular languages decidable problems concerning context-free languages The Halting Problem The diagonalization method The
More informationFS Properties and FSTs
FS Properties and FSTs Chris Dyer Algorithms for NLP 11-711 Announcements HW1 has been posted; due in class in 2 weeks Goals of Today s Lecture Understand properties of regular languages Understand Brzozowski
More informationFalse. They are the same language.
CS 3100 Models of Computation Fall 2010 Notes 8, Posted online: September 16, 2010 These problems will be helpful for Midterm-1. More solutions will be worked out. The midterm exam itself won t be this
More informationAutomata & languages. A primer on the Theory of Computation. Laurent Vanbever. ETH Zürich (D-ITET) October,
Automata & languages A primer on the Theory of Computation Laurent Vanbever www.vanbever.eu ETH Zürich (D-ITET) October, 5 2017 Part 3 out of 5 Last week, we learned about closure and equivalence of regular
More informationPart 3 out of 5. Automata & languages. A primer on the Theory of Computation. Last week, we learned about closure and equivalence of regular languages
Automata & languages A primer on the Theory of Computation Laurent Vanbever www.vanbever.eu Part 3 out of 5 ETH Zürich (D-ITET) October, 5 2017 Last week, we learned about closure and equivalence of regular
More informationPushdown Automata. Notes on Automata and Theory of Computation. Chia-Ping Chen
Pushdown Automata Notes on Automata and Theory of Computation Chia-Ping Chen Department of Computer Science and Engineering National Sun Yat-Sen University Kaohsiung, Taiwan ROC Pushdown Automata p. 1
More informationComputability Theory
CS:4330 Theory of Computation Spring 2018 Computability Theory Decidable Problems of CFLs and beyond Haniel Barbosa Readings for this lecture Chapter 4 of [Sipser 1996], 3rd edition. Section 4.1. Decidable
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 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 informationCPSC 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 informationPlease give details of your calculation. A direct answer without explanation is not counted.
Please give details of your calculation. A direct answer without explanation is not counted. Your answers must be in English. Please carefully read problem statements. During the exam you are not allowed
More informationCS 455/555: Mathematical preliminaries
CS 455/555: Mathematical preliminaries Stefan D. Bruda Winter 2019 SETS AND RELATIONS Sets: Operations: intersection, union, difference, Cartesian product Big, powerset (2 A ) Partition (π 2 A, π, i j
More information