Unit-5: ω-regular properties
|
|
- Cody McBride
- 6 years ago
- Views:
Transcription
1 1/14 Unit-5: ω-regular properties B. Srivathsan Chennai Mathematical Institute NPTEL-course July - November 2015
2 2/14 Module 2: ω-regular expressions
3 3/14 Languages over finite words Σ : finite alphabet Σ = set of all words over Σ Language: A set of finite words { ab, abab, ababab,...} finite words starting with an a finite words starting with a b { ε, b, bb, bbb,...} { ε, ab, abab, ababab,...} { ε, bbb, bbbbbb, (bbb) 3,...} words starting and ending with an a { ε, ab, aabb, aaabbb,a 4 b 4...}
4 4/14 Regular expressions Σ : finite alphabet Σ = set of all words over Σ Language: A set of finite words ab(ab) { ab, abab, ababab,...} aσ bσ finite words starting with an a finite words starting with a b b (ab) (bbb) { ε, b, bb, bbb,...} { ε, ab, abab, ababab,...} { ε, bbb, bbbbbb, (bbb) 3,...} aσ a words starting and ending with an a { ε, ab, aabb, aaabbb,a 4 b 4...}
5 5/14 Alphabet Σ = { a, b } Σ Σ = { a, b } { a, b } = { aa, ab, ba, bb } aba ε ε bbb w ε ε w = aba = bbb = w = w Σ 0 = { ε } (empty word, with length 0) Σ 1 = words of length 1 Σ 2 = words of length 2 Σ 3 = words of length 3. Σ k = words of length k. Σ = i 0 Σi = set of all finite length words
6 Regular expressions 6/14
7 6/14 Regular expressions ε
8 6/14 Regular expressions ε a b
9 6/14 Regular expressions ε a b r 1 r 2
10 6/14 Regular expressions ε a b r 1 r 2 r 1 + r 2
11 6/14 Regular expressions ε a b r 1 r 2 r 1 + r 2 r
12 6/14 Regular expressions ε a b r 1 r 2 r 1 + r 2 r where r 1,r 2,r are regular expressions themselves
13 6/14 Regular expressions ε a b r 1 r 2 r 1 + r 2 r where r 1,r 2,r are regular expressions themselves a + b ab + bb + baa (a + b) ab(ba + bb) (ab + bb).
14 7/14 Theorem 1. Every regular expression can be converted to an NFA accepting the language of the expression 2. Every NFA can be converted to a regular expression describing the language of the NFA
15 Coming next: Languages over infinite words 8/14
16 Σ = { a, b } 9/14
17 9/14 Σ = { a, b } Example 1: Infinite word consisting only of a { aaaaaaaaaaaaaaaa... }
18 9/14 Σ = { a, b } Example 1: Infinite word consisting only of a { aaaaaaaaaaaaaaaa... } Example 2: Infinite words containing only a or only b { aaaaaaaaaaaaaaa..., bbbbbbbbbbbb... }
19 9/14 Σ = { a, b } Example 1: Infinite word consisting only of a { aaaaaaaaaaaaaaaa... } Example 2: Infinite words containing only a or only b { aaaaaaaaaaaaaaa..., bbbbbbbbbbbb... } Example 3: a word in aaσ aa followed by only b-s { aaaabbbbbbb..., aababaabbbbbb..., aabbbbaabbbbbbb...,... }
20 9/14 Σ = { a, b } Example 1: Infinite word consisting only of a { aaaaaaaaaaaaaaaa... } Example 2: Infinite words containing only a or only b { aaaaaaaaaaaaaaa..., bbbbbbbbbbbb... } Example 3: a word in aaσ aa followed by only b-s { aaaabbbbbbb..., aababaabbbbbb..., aabbbbaabbbbbbb...,... } Example 4: Infinite words where b occurs only finitely often { aaaaaaaaaaaaaaaa..., baaaaaaaaaa..., babbaaaaaaaaaaaa...,... }
21 9/14 Σ = { a, b } Example 1: Infinite word consisting only of a { aaaaaaaaaaaaaaaa... } Example 2: Infinite words containing only a or only b { aaaaaaaaaaaaaaa..., bbbbbbbbbbbb... } Example 3: a word in aaσ aa followed by only b-s { aaaabbbbbbb..., aababaabbbbbb..., aabbbbaabbbbbbb...,... } Example 4: Infinite words where b occurs only finitely often { aaaaaaaaaaaaaaaa..., baaaaaaaaaa..., babbaaaaaaaaaaaa...,... } Example 5: Infinite words where b occurs infinitely often { abababababab..., bbbabbbabbbabbba..., bbbbbbbbbbbbb...,... }
22 9/14 Σ = { a, b } Example 1: Infinite word consisting only of a { aaaaaaaaaaaaaaaa... } a ω Example 2: Infinite words containing only a or only b { aaaaaaaaaaaaaaa..., bbbbbbbbbbbb... } Example 3: a word in aaσ aa followed by only b-s { aaaabbbbbbb..., aababaabbbbbb..., aabbbbaabbbbbbb...,... } Example 4: Infinite words where b occurs only finitely often { aaaaaaaaaaaaaaaa..., baaaaaaaaaa..., babbaaaaaaaaaaaa...,... } Example 5: Infinite words where b occurs infinitely often { abababababab..., bbbabbbabbbabbba..., bbbbbbbbbbbbb...,... }
23 9/14 Σ = { a, b } Example 1: Infinite word consisting only of a { aaaaaaaaaaaaaaaa... } a ω Example 2: Example 3: Infinite words containing only a or only b { aaaaaaaaaaaaaaa..., bbbbbbbbbbbb... } a word in aaσ aa followed by only b-s a ω + b ω { aaaabbbbbbb..., aababaabbbbbb..., aabbbbaabbbbbbb...,... } Example 4: Infinite words where b occurs only finitely often { aaaaaaaaaaaaaaaa..., baaaaaaaaaa..., babbaaaaaaaaaaaa...,... } Example 5: Infinite words where b occurs infinitely often { abababababab..., bbbabbbabbbabbba..., bbbbbbbbbbbbb...,... }
24 9/14 Σ = { a, b } Example 1: Infinite word consisting only of a { aaaaaaaaaaaaaaaa... } a ω Example 2: Infinite words containing only a or only b { aaaaaaaaaaaaaaa..., bbbbbbbbbbbb... } a ω + b ω Example 3: a word in aaσ aa followed by only b-s aaσ aa b ω { aaaabbbbbbb..., aababaabbbbbb..., aabbbbaabbbbbbb...,... } Example 4: Infinite words where b occurs only finitely often { aaaaaaaaaaaaaaaa..., baaaaaaaaaa..., babbaaaaaaaaaaaa...,... } Example 5: Infinite words where b occurs infinitely often { abababababab..., bbbabbbabbbabbba..., bbbbbbbbbbbbb...,... }
25 9/14 Σ = { a, b } Example 1: Infinite word consisting only of a { aaaaaaaaaaaaaaaa... } a ω Example 2: Infinite words containing only a or only b { aaaaaaaaaaaaaaa..., bbbbbbbbbbbb... } a ω + b ω Example 3: a word in aaσ aa followed by only b-s aaσ aa b ω { aaaabbbbbbb..., aababaabbbbbb..., aabbbbaabbbbbbb...,... } Example 4: Infinite words where b occurs only finitely often(a + b) b ω { aaaaaaaaaaaaaaaa..., baaaaaaaaaa..., babbaaaaaaaaaaaa...,... } Example 5: Infinite words where b occurs infinitely often { abababababab..., bbbabbbabbbabbba..., bbbbbbbbbbbbb...,... }
26 9/14 Σ = { a, b } Example 1: Infinite word consisting only of a { aaaaaaaaaaaaaaaa... } a ω Example 2: Infinite words containing only a or only b { aaaaaaaaaaaaaaa..., bbbbbbbbbbbb... } a ω + b ω Example 3: a word in aaσ aa followed by only b-s aaσ aa b ω { aaaabbbbbbb..., aababaabbbbbb..., aabbbbaabbbbbbb...,... } Example 4: Infinite words where b occurs only finitely often(a + b) b ω { aaaaaaaaaaaaaaaa..., baaaaaaaaaa..., babbaaaaaaaaaaaa...,... } Example 5: Infinite words where b occurs infinitely often (a b) ω { abababababab..., bbbabbbabbbabbba..., bbbbbbbbbbbbb...,... }
27 10/14 ω-regular expressions G = E 1 F ω 1 + E 2 F ω E n F ω n E 1,...,E n, F 1,...,F n are regular expressions and ε / L(F i ) for all 1 i n
28 10/14 ω-regular expressions G = E 1 F ω 1 + E 2 F ω E n F ω n E 1,...,E n, F 1,...,F n are regular expressions and ε / L(F i ) for all 1 i n L(F ω ) = { w 1 w 2 w 3... each w i L(F)}
29 More examples 11/14
30 11/14 More examples (a + b) ω set of all infinite words
31 11/14 More examples (a + b) ω set of all infinite words a(a + b) ω infinite words starting with an a
32 11/14 More examples (a + b) ω set of all infinite words a(a + b) ω infinite words starting with an a (a + bc + c) ω words where every b is immediately followed by c
33 11/14 More examples (a + b) ω set of all infinite words a(a + b) ω infinite words starting with an a (a + bc + c) ω words where every b is immediately followed by c (a + b) c(a + b) ω words with a single occurrence of c
34 11/14 More examples (a + b) ω set of all infinite words a(a + b) ω infinite words starting with an a (a + bc + c) ω words where every b is immediately followed by c (a + b) c(a + b) ω words with a single occurrence of c ((a + b) c) ω words where c occurs infinitely often
35 12/14 AP = { p 1,p 2,...,p k } Σ = PowerSet(AP) = { { }, {p 1 },..., {p k }, { p 1,p 2 }, { p 1,p 3 },..., { p k 1,p k },... { p 1,p 2,..., p k } } A property is a language of infinite words over alphabet Σ
36 12/14 AP = { p 1,p 2,...,p k } Σ = PowerSet(AP) = { { }, {p 1 },..., {p k }, { p 1,p 2 }, { p 1,p 3 },..., { p k 1,p k },... { p 1,p 2,..., p k } } A property is a language of infinite words over alphabet Σ The property is ω-regular if it can be described by an ω-regular expression
37 13/14 AP = { wait, crit } Σ = PowerSet(AP) = { { }, {wait}, {crit}, {wait, crit} }
38 13/14 AP = { wait, crit } Σ = PowerSet(AP) = { { }, {wait}, {crit}, {wait, crit} } Property: Process enters critical section infinitely often
39 13/14 AP = { wait, crit } Σ = PowerSet(AP) = { { }, {wait}, {crit}, {wait, crit} } Property: Process enters critical section infinitely often ( ({ } + {wait}) ({crit} + {wait, crit}) ) ω
40 14/14 ω-regular properties ω-regular expressions Next goal: Find algorithms to model-check ω-regular properties
FABER Formal Languages, Automata. Lecture 2. Mälardalen University
CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 2 Mälardalen University 2010 1 Content Languages, g Alphabets and Strings Strings & String Operations Languages & Language Operations
More informationIn English, there are at least three different types of entities: letters, words, sentences.
Chapter 2 Languages 2.1 Introduction In English, there are at least three different types of entities: letters, words, sentences. letters are from a finite alphabet { a, b, c,..., z } words are made up
More information1 Alphabets and Languages
1 Alphabets and Languages Look at handout 1 (inference rules for sets) and use the rules on some examples like {a} {{a}} {a} {a, b}, {a} {{a}}, {a} {{a}}, {a} {a, b}, a {{a}}, a {a, b}, a {{a}}, a {a,
More informationNondeterministic Finite Automata and Regular Expressions
Nondeterministic Finite Automata and Regular Expressions CS 2800: Discrete Structures, Spring 2015 Sid Chaudhuri Recap: Deterministic Finite Automaton A DFA is a 5-tuple M = (Q, Σ, δ, q 0, F) Q is a finite
More informationTheory of Computer Science
Theory of Computer Science C1. Formal Languages and Grammars Malte Helmert University of Basel March 14, 2016 Introduction Example: Propositional Formulas from the logic part: Definition (Syntax of Propositional
More informationAuthor: Vivek Kulkarni ( )
Author: Vivek Kulkarni ( vivek_kulkarni@yahoo.com ) Chapter-3: Regular Expressions Solutions for Review Questions @ Oxford University Press 2013. All rights reserved. 1 Q.1 Define the following and give
More informationChapter 4. Regular Expressions. 4.1 Some Definitions
Chapter 4 Regular Expressions 4.1 Some Definitions Definition: If S and T are sets of strings of letters (whether they are finite or infinite sets), we define the product set of strings of letters to be
More informationC1.1 Introduction. Theory of Computer Science. Theory of Computer Science. C1.1 Introduction. C1.2 Alphabets and Formal Languages. C1.
Theory of Computer Science March 20, 2017 C1. Formal Languages and Grammars Theory of Computer Science C1. Formal Languages and Grammars Malte Helmert University of Basel March 20, 2017 C1.1 Introduction
More informationRegular Expressions [1] Regular Expressions. Regular expressions can be seen as a system of notations for denoting ɛ-nfa
Regular Expressions [1] Regular Expressions Regular expressions can be seen as a system of notations for denoting ɛ-nfa They form an algebraic representation of ɛ-nfa algebraic : expressions with equations
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 informationCS Automata, Computability and Formal Languages
Automata, Computability and Formal Languages Luc Longpré faculty.utep.edu/longpre 1 - Pg 1 Slides : version 3.1 version 1 A. Tapp version 2 P. McKenzie, L. Longpré version 2.1 D. Gehl version 2.2 M. Csűrös,
More informationCSCI 340: Computational Models. Regular Expressions. Department of Computer Science
CSCI 340: Computational Models Regular Expressions Chapter 4 Department of Computer Science Yet Another New Method for Defining Languages Given the Language: L 1 = {x n for n = 1 2 3...} We could easily
More informationCOSE212: Programming Languages. Lecture 1 Inductive Definitions (1)
COSE212: Programming Languages Lecture 1 Inductive Definitions (1) Hakjoo Oh 2017 Fall Hakjoo Oh COSE212 2017 Fall, Lecture 1 September 4, 2017 1 / 9 Inductive Definitions Inductive definition (induction)
More informationCS 133 : Automata Theory and Computability
CS 133 : Automata Theory and Computability Lecture Slides 1 Regular Languages and Finite Automata Nestine Hope S. Hernandez Algorithms and Complexity Laboratory Department of Computer Science University
More informationCOSE212: Programming Languages. Lecture 1 Inductive Definitions (1)
COSE212: Programming Languages Lecture 1 Inductive Definitions (1) Hakjoo Oh 2018 Fall Hakjoo Oh COSE212 2018 Fall, Lecture 1 September 5, 2018 1 / 10 Inductive Definitions Inductive definition (induction)
More informationProblem Session 5 (CFGs) Talk about the building blocks of CFGs: S 0S 1S ε - everything. S 0S0 1S1 A - waw R. S 0S0 0S1 1S0 1S1 A - xay, where x = y.
CSE2001, Fall 2006 1 Problem Session 5 (CFGs) Talk about the building blocks of CFGs: S 0S 1S ε - everything. S 0S0 1S1 A - waw R. S 0S0 0S1 1S0 1S1 A - xay, where x = y. S 00S1 A - xay, where x = 2 y.
More information60-354, Theory of Computation Fall Asish Mukhopadhyay School of Computer Science University of Windsor
60-354, Theory of Computation Fall 2013 Asish Mukhopadhyay School of Computer Science University of Windsor Pushdown Automata (PDA) PDA = ε-nfa + stack Acceptance ε-nfa enters a final state or Stack is
More informationSpecial Factors and Suffix and Factor Automata
Special Factors and Suffix and Factor Automata LIAFA, Paris 5 November 2010 Finite Words Let Σ be a finite alphabet, e.g. Σ = {a, n, b, c}. A word over Σ is finite concatenation of symbols of Σ, that is,
More informationOne-relation languages and ω-code generators
One-relation languages and ω-code generators Tran Vinh Duc, Igor Litovsky I3S Université de Nice - Sophia Antipolis France Journées Montoises d Informatique Théorique AMIENS, 2010 Infinite words Let A
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: 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 informationTopics in Timed Automata
1/32 Topics in Timed Automata B. Srivathsan RWTH-Aachen Software modeling and Verification group 2/32 Timed Automata A theory of timed automata R. Alur and D. Dill, TCS 94 2/32 Timed Automata Language
More informationCS311 Computational Structures Regular Languages and Regular Expressions. Lecture 4. Andrew P. Black Andrew Tolmach
CS311 Computational Structures Regular Languages and Regular Expressions Lecture 4 Andrew P. Black Andrew Tolmach 1 Expressions Weʼre used to using expressions to describe mathematical objects Example:
More informationComputational Learning Theory Learning Patterns (Monomials)
Computational Learning Theory Learning Patterns (Monomials) Akihiro Yamamoto 山本章博 http://www.iip.ist.i.kyoto-u.ac.jp/member/akihiro/ akihiro@i.kyoto-u.ac.jp 1 Formal Languages : a finite set of symbols
More informationAutomata Theory CS F-04 Non-Determinisitic Finite Automata
Automata Theory CS411-2015F-04 Non-Determinisitic Finite Automata David Galles Department of Computer Science University of San Francisco 04-0: Non-Determinism A Deterministic Finite Automata s transition
More informationFormal 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 informationCS 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 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 informationAutomata Theory CS F-08 Context-Free Grammars
Automata Theory CS411-2015F-08 Context-Free Grammars David Galles Department of Computer Science University of San Francisco 08-0: Context-Free Grammars Set of Terminals (Σ) Set of Non-Terminals Set of
More informationCFG Simplification. (simplify) 1. Eliminate useless symbols 2. Eliminate -productions 3. Eliminate unit productions
CFG Simplification (simplify) 1. Eliminate useless symbols 2. Eliminate -productions 3. Eliminate unit productions 1 Eliminating useless symbols 1. A symbol X is generating if there exists: X * w, for
More informationSection 1.3 Ordered Structures
Section 1.3 Ordered Structures Tuples Have order and can have repetitions. (6,7,6) is a 3-tuple () is the empty tuple A 2-tuple is called a pair and a 3-tuple is called a triple. We write (x 1,, x n )
More informationTheory of Computation
Theory of Computation Lecture #2 Sarmad Abbasi Virtual University Sarmad Abbasi (Virtual University) Theory of Computation 1 / 1 Lecture 2: Overview Recall some basic definitions from Automata Theory.
More informationSemigroup presentations via boundaries in Cayley graphs 1
Semigroup presentations via boundaries in Cayley graphs 1 Robert Gray University of Leeds BMC, Newcastle 2006 1 (Research conducted while I was a research student at the University of St Andrews, under
More informationRecap from Last Time
Regular Expressions Recap from Last Time Regular Languages A language L is a regular language if there is a DFA D such that L( D) = L. Theorem: The following are equivalent: L is a regular language. There
More informationCSE 105 Homework 1 Due: Monday October 9, Instructions. should be on each page of the submission.
CSE 5 Homework Due: Monday October 9, 7 Instructions Upload a single file to Gradescope for each group. should be on each page of the submission. All group members names and PIDs Your assignments in this
More informationPushdown Automata. Pushdown Automata. Pushdown Automata. Pushdown Automata. Pushdown Automata. Pushdown Automata. The stack
A pushdown automata (PDA) is essentially: An NFA with a stack A move of a PDA will depend upon Current state of the machine Current symbol being read in Current symbol popped off the top of the stack With
More informationTheory of Computation - Module 3
Theory of Computation - Module 3 Syllabus Context Free Grammar Simplification of CFG- Normal forms-chomsky Normal form and Greibach Normal formpumping lemma for Context free languages- Applications of
More informationSFWR ENG 2FA3. Solution to the Assignment #4
SFWR ENG 2FA3. Solution to the Assignment #4 Total = 131, 100%= 115 The solutions below are often very detailed on purpose. Such level of details is not required from students solutions. Some questions
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 informationThe Binomial Theorem.
The Binomial Theorem RajeshRathod42@gmail.com The Problem Evaluate (A+B) N as a polynomial in powers of A and B Where N is a positive integer A and B are numbers Example: (A+B) 5 = A 5 +5A 4 B+10A 3 B
More informationHarvard CS121 and CSCI E-121 Lecture 2: Mathematical Preliminaries
Harvard CS121 and CSCI E-121 Lecture 2: Mathematical Preliminaries Harry Lewis September 5, 2013 Reading: Sipser, Chapter 0 Sets Sets are defined by their members A = B means that for every x, x A iff
More informationHomework 4 Solutions. 2. Find context-free grammars for the language L = {a n b m c k : k n + m}. (with n 0,
Introduction to Formal Language, Fall 2016 Due: 21-Apr-2016 (Thursday) Instructor: Prof. Wen-Guey Tzeng Homework 4 Solutions Scribe: Yi-Ruei Chen 1. Find context-free grammars for the language L = {a n
More information1. (a) Explain the procedure to convert Context Free Grammar to Push Down Automata.
Code No: R09220504 R09 Set No. 2 II B.Tech II Semester Examinations,December-January, 2011-2012 FORMAL LANGUAGES AND AUTOMATA THEORY Computer Science And Engineering Time: 3 hours Max Marks: 75 Answer
More informationLecture 4: More on Regexps, Non-Regular Languages
6.045 Lecture 4: More on Regexps, Non-Regular Languages 6.045 Announcements: - Pset 1 is on piazza (as of last night) - If you don t have piazza access but are registered for 6.045, send email to TAs with
More informationFinite-State Machines (Automata) lecture 12
Finite-State Machines (Automata) lecture 12 cl a simple form of computation used widely one way to find patterns 1 A current D B A B C D B C D A C next 2 Application Fields Industry real-time control,
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 A Term 2009: Foundations of Computer Science. Homework 2. By Li Feng, Shweta Srivastava, and Carolina Ruiz.
CS3133 - A Term 2009: Foundations of Computer Science Prof. Carolina Ruiz Homework 2 WPI By Li Feng, Shweta Srivastava, and Carolina Ruiz Chapter 4 Problem 1: (10 Points) Exercise 4.3 Solution 1: S is
More informationTAFL 1 (ECS-403) Unit- IV. 4.1 Push Down Automata. 4.2 The Formal Definition of Pushdown Automata. EXAMPLES for PDA. 4.3 The languages of PDA
TAFL 1 (ECS-403) Unit- IV 4.1 Push Down Automata 4.2 The Formal Definition of Pushdown Automata EXAMPLES for PDA 4.3 The languages of PDA 4.3.1 Acceptance by final state 4.3.2 Acceptance by empty stack
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 informationText Search and Closure Properties
Text Search and Closure Properties CSCI 3130 Formal Languages and Automata Theory Siu On CHAN Chinese University of Hong Kong Fall 2017 1/30 Text Search 2/30 grep program grep -E regexp file.txt Searches
More informationText Search and Closure Properties
Text Search and Closure Properties CSCI 330 Formal Languages and Automata Theory Siu On CHAN Fall 208 Chinese University of Hong Kong /28 Text Search grep program grep -E regex file.txt Searches for an
More information1. Draw a parse tree for the following derivation: S C A C C A b b b b A b b b b B b b b b a A a a b b b b a b a a b b 2. Show on your parse tree u,
1. Draw a parse tree for the following derivation: S C A C C A b b b b A b b b b B b b b b a A a a b b b b a b a a b b 2. Show on your parse tree u, v, x, y, z as per the pumping theorem. 3. Prove that
More information(b) If G=({S}, {a}, {S SS}, S) find the language generated by G. [8+8] 2. Convert the following grammar to Greibach Normal Form G = ({A1, A2, A3},
Code No: 07A50501 R07 Set No. 2 III B.Tech I Semester Examinations,MAY 2011 FORMAL LANGUAGES AND AUTOMATA THEORY Computer Science And Engineering Time: 3 hours Max Marks: 80 Answer any FIVE Questions All
More informationIntro to Theory of Computation
Intro to Theory of Computation 1/26/2016 LECTURE 5 Last time: Closure properties. Equivalence of NFAs, DFAs and regular expressions Today: Conversion from NFAs to regular expressions Proving that a language
More informationContext Free Languages. Automata Theory and Formal Grammars: Lecture 6. Languages That Are Not Regular. Non-Regular Languages
Context Free Languages Automata Theory and Formal Grammars: Lecture 6 Context Free Languages Last Time Decision procedures for FAs Minimum-state DFAs Today The Myhill-Nerode Theorem The Pumping Lemma Context-free
More informationParsing. Context-Free Grammars (CFG) Laura Kallmeyer. Winter 2017/18. Heinrich-Heine-Universität Düsseldorf 1 / 26
Parsing Context-Free Grammars (CFG) Laura Kallmeyer Heinrich-Heine-Universität Düsseldorf Winter 2017/18 1 / 26 Table of contents 1 Context-Free Grammars 2 Simplifying CFGs Removing useless symbols Eliminating
More informationCS6902 Theory of Computation and Algorithms
CS6902 Theory of Computation and Algorithms Any mechanically (automatically) discretely computation of problem solving contains at least three components: - problem description - computational tool - procedure/analysis
More informationTalen en Compilers. Johan Jeuring , period 2. October 29, Department of Information and Computing Sciences Utrecht University
Talen en Compilers 2015-2016, period 2 Johan Jeuring Department of Information and Computing Sciences Utrecht University October 29, 2015 12. LL parsing 12-1 This lecture LL parsing Motivation Stack-based
More informationClosure Properties of Regular Languages
Closure Properties of Regular Languages Lecture 13 Section 4.1 Robb T. Koether Hampden-Sydney College Wed, Sep 21, 2016 Robb T. Koether (Hampden-Sydney College) Closure Properties of Regular Languages
More informationDefinition: A grammar G = (V, T, P,S) is a context free grammar (cfg) if all productions in P have the form A x where
Recitation 11 Notes Context Free Grammars Definition: A grammar G = (V, T, P,S) is a context free grammar (cfg) if all productions in P have the form A x A V, and x (V T)*. Examples Problem 1. Given the
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 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 informationcse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska
cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska LECTURE 6a REVIEW for Q2 Q2 covers Lecture 5 and Lecture 6 Chapter 2 - Deterministic Finite Automata DFA Chapter 2 - Nondeterministic
More informationHW 3 Solutions. Tommy November 27, 2012
HW 3 Solutions Tommy November 27, 2012 5.1.1 (a) Online solution: S 0S1 ɛ. (b) Similar to online solution: S AY XC A aa ɛ b ɛ C cc ɛ X axb aa b Y by c b cc (c) S X A A A V AV a V V b V a b X V V X V (d)
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 informationTAFL 1 (ECS-403) Unit- II. 2.1 Regular Expression: The Operators of Regular Expressions: Building Regular Expressions
TAFL 1 (ECS-403) Unit- II 2.1 Regular Expression: 2.1.1 The Operators of Regular Expressions: 2.1.2 Building Regular Expressions 2.1.3 Precedence of Regular-Expression Operators 2.1.4 Algebraic laws for
More informationINSTITUTE OF AERONAUTICAL ENGINEERING
INSTITUTE OF AERONAUTICAL ENGINEERING DUNDIGAL 500 043, HYDERABAD COMPUTER SCIENCE AND ENGINEERING TUTORIAL QUESTION BANK Course Name : FORMAL LANGUAGES AND AUTOMATA THEORY Course Code : A40509 Class :
More informationQuestion Bank UNIT I
Siddhivinayak Technical Campus School of Engineering & Research Technology Department of computer science and Engineering Session 2016-2017 Subject Name- Theory of Computation Subject Code-4KS05 Sr No.
More informationMore Properties of Regular Languages
More Properties of Regular anguages 1 We have proven Regular languages are closed under: Union Concatenation Star operation Reverse 2 Namely, for regular languages 1 and 2 : Union 1 2 Concatenation Star
More informationcse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska
cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska LECTURE 14 SMALL REVIEW FOR FINAL SOME Y/N QUESTIONS Q1 Given Σ =, there is L over Σ Yes: = {e} and L = {e} Σ Q2 There are uncountably
More informationSturmian Words, Sturmian Trees and Sturmian Graphs
Sturmian Words, Sturmian Trees and Sturmian Graphs A Survey of Some Recent Results Jean Berstel Institut Gaspard-Monge, Université Paris-Est CAI 2007, Thessaloniki Jean Berstel (IGM) Survey on Sturm CAI
More informationIntroduction to computability Tutorial 7
Introduction to computability Tutorial 7 Context free languages and Turing machines November 6 th 2014 Context-free languages 1. Show that the following languages are not context-free: a) L ta i b j a
More informationA canonical semi-deterministic transducer
A canonical semi-deterministic transducer Achilles A. Beros Joint work with Colin de la Higuera Laboratoire d Informatique de Nantes Atlantique, Université de Nantes September 18, 2014 The Results There
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 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 informationOutline. Theorem 1. For every regular expression E, there exists an ε-nfa A such that L(E)=L(A).
Outline We have two results to prove: Theorem 1. For every regular expression E, there exists an ε-nfa A such that L(E)=L(A). Theorem 2. For every DFA A, there exists a regular expression E such that L(A)=L(E).
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 informationLinear conjunctive languages are closed under complement
Linear conjunctive languages are closed under complement Alexander Okhotin okhotin@cs.queensu.ca Technical report 2002-455 Department of Computing and Information Science, Queen s University, Kingston,
More informationdownload instant at Assume that (w R ) R = w for all strings w Σ of length n or less.
Chapter 2 Languages 3. We prove, by induction on the length of the string, that w = (w R ) R for every string w Σ. Basis: The basis consists of the null string. In this case, (λ R ) R = (λ) R = λ as desired.
More informationComputability and Complexity
Computability and Complexity Rewriting Systems and Chomsky Grammars CAS 705 Ryszard Janicki Department of Computing and Software McMaster University Hamilton, Ontario, Canada janicki@mcmaster.ca Ryszard
More informationTheory Of Computation UNIT-II
Regular Expressions and Context Free Grammars: Regular expression formalism- equivalence with finite automata-regular sets and closure properties- pumping lemma for regular languages- decision algorithms
More informationChapter 1. Formal Definition and View. Lecture Formal Pushdown Automata on the 28th April 2009
Chapter 1 Formal and View Lecture on the 28th April 2009 Formal of PA Faculty of Information Technology Brno University of Technology 1.1 Aim of the Lecture 1 Define pushdown automaton in a formal way
More informationSafety and Liveness Properties
Safety and Liveness Properties Lecture #6 of Model Checking Joost-Pieter Katoen Lehrstuhl 2: Software Modeling and Verification E-mail: katoen@cs.rwth-aachen.de November 5, 2008 c JPK Overview Lecture
More informationCMSC 330: Organization of Programming Languages. Regular Expressions and Finite Automata
CMSC 330: Organization of Programming Languages Regular Expressions and Finite Automata CMSC330 Spring 2018 1 How do regular expressions work? What we ve learned What regular expressions are What they
More informationInstructor s Solutions Manual for Introduction to the Theory of Computation third edition Michael Sipser Mathematics Department MIT
Instructor s Solutions Manual for Introduction to the Theory of Computation third edition Michael Sipser Mathematics Department MIT Preface This Instructor s Manual is designed to accompany the textbook,
More informationAC68 FINITE AUTOMATA & FORMULA LANGUAGES JUNE 2014
Q.2 a. Show by using Mathematical Induction that n i= 1 i 2 n = ( n + 1) ( 2 n + 1) 6 b. Define language. Let = {0; 1} denote an alphabet. Enumerate five elements of the following languages: (i) Even binary
More informationCMSC 330: Organization of Programming Languages
CMSC 330: Organization of Programming Languages Regular Expressions and Finite Automata CMSC 330 Spring 2017 1 How do regular expressions work? What we ve learned What regular expressions are What they
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 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 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 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 informationOn Parsing Expression Grammars A recognition-based system for deterministic languages
Bachelor thesis in Computer Science On Parsing Expression Grammars A recognition-based system for deterministic languages Author: Démian Janssen wd.janssen@student.ru.nl First supervisor/assessor: Herman
More informationVTU QUESTION BANK. Unit 1. Introduction to Finite Automata. 1. Obtain DFAs to accept strings of a s and b s having exactly one a.
VTU QUESTION BANK Unit 1 Introduction to Finite Automata 1. Obtain DFAs to accept strings of a s and b s having exactly one a.(5m )( Dec-2014) 2. Obtain a DFA to accept strings of a s and b s having even
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 informationAC68 FINITE AUTOMATA & FORMULA LANGUAGES DEC 2013
Q.2 a. Prove by mathematical induction n 4 4n 2 is divisible by 3 for n 0. Basic step: For n = 0, n 3 n = 0 which is divisible by 3. Induction hypothesis: Let p(n) = n 3 n is divisible by 3. Induction
More informationSimplification of CFG and Normal Forms. Wen-Guey Tzeng Computer Science Department National Chiao Tung University
Simplification of CFG and Normal Forms Wen-Guey Tzeng Computer Science Department National Chiao Tung University Normal Forms We want a cfg with either Chomsky or Greibach normal form Chomsky normal form
More informationSimplification of CFG and Normal Forms. Wen-Guey Tzeng Computer Science Department National Chiao Tung University
Simplification of CFG and Normal Forms Wen-Guey Tzeng Computer Science Department National Chiao Tung University Normal Forms We want a cfg with either Chomsky or Greibach normal form Chomsky normal form
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 informationClasses and conversions
Classes and conversions Regular expressions Syntax: r = ε a r r r + r r Semantics: The language L r of a regular expression r is inductively defined as follows: L =, L ε = {ε}, L a = a L r r = L r L r
More informationA Universal Turing Machine
A Universal Turing Machine A limitation of Turing Machines: Turing Machines are hardwired they execute only one program Real Computers are re-programmable Solution: Universal Turing Machine Attributes:
More information