1 Closure E.g., we understand number systems partly by understanding closure properties: Naturals are closed under +, , but not -, . Integers are closed.

Slides:



Advertisements
Similar presentations
CS2303-THEORY OF COMPUTATION Closure Properties of Regular Languages
Advertisements

&& Department of nskinfo-i educationwww.nsksofttch.com CS2303-THEORY OF COMPUTATION uChapter: Closure.
Theory Of Automata By Dr. MM Alam
Properties of Regular Languages
Lecture 9,10 Theory of AUTOMATA
8/27/2009 Sofya Raskhodnikova Intro to Theory of Computation L ECTURE 2 Theory of Computation Finite Automata Operations on languages Nondeterminism L2.1.
YES-NO machines Finite State Automata as language recognizers.
Automata and Formal Languages Tim Sheard 1 Lecture 9 Reasoning with DFAs.
FORMAL LANGUAGES, AUTOMATA, AND COMPUTABILITY
1 Introduction to Computability Theory Lecture3: Regular Expressions Prof. Amos Israeli.
NFAs Sipser 1.2 (pages 47–54). CS 311 Fall Recall… Last time we showed that the class of regular languages is closed under: –Complement –Union.
1 Introduction to Computability Theory Lecture4: Regular Expressions Prof. Amos Israeli.
Lecture 3UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 3.
1 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY (For next time: Read Chapter 1.3 of the book)
Costas Busch - RPI1 Single Final State for NFAs. Costas Busch - RPI2 Any NFA can be converted to an equivalent NFA with a single final state.
1 Module 21 Closure Properties for LFSA using NFA’s –From now on, when I say NFA, I mean any NFA including an NFA- unless I add a specific restriction.
Lecture 3: Closure Properties & Regular Expressions Jim Hook Tim Sheard Portland State University.
Fall 2004COMP 3351 Single Final State for NFA. Fall 2004COMP 3352 Any NFA can be converted to an equivalent NFA with a single final state.
1 Languages and Finite Automata or how to talk to machines...
1 Lecture 5 Topics –Closure Properties for REC Proofs –2 examples Applications.
1 NFAs accept the Regular Languages. 2 Equivalence of Machines Definition: Machine is equivalent to machine if.
Fall 2006Costas Busch - RPI1 Properties of Regular Languages.
CS5371 Theory of Computation Lecture 6: Automata Theory IV (Regular Expression = NFA = DFA)
1 Module 31 Closure Properties for CFL’s –Kleene Closure construction examples proof of correctness –Others covered less thoroughly in lecture union, concatenation.
Courtesy Costas Busch - RPI1 Non-regular languages.
1 Lecture 19 Closure Properties for LFSA using NFA’s –union second proof –concatenation –Kleene closure.
CS5371 Theory of Computation Lecture 4: Automata Theory II (DFA = NFA, Regular Language)
1 Module 10 Recursive and r.e. language classes –representing solvable and half-solvable problems Proofs of closure properties –for the set of recursive.
1 A Single Final State for Finite Accepters. 2 Observation Any Finite Accepter (NFA or DFA) can be converted to an equivalent NFA with a single final.
Regular Languages A language is regular over  if it can be built from ;, {  }, and { a } for every a 2 , using operators union ( [ ), concatenation.
NFA Closure Properties. NFAs also have closure properties We have given constructions for showing that DFAs are closed under 1.Complement 2.Intersection.
NFA Closure Properties Sipser pages pages NFAs also have closure properties We have given constructions for showing that DFAs are closed under.
1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 5 School of Innovation, Design and Engineering Mälardalen University 2012.
Theory of Computation, Feodor F. Dragan, Kent State University 1 Regular expressions: definition An algebraic equivalent to finite automata. We can build.
Introduction to CS Theory Lecture 3 – Regular Languages Piotr Faliszewski
1 Let L= { w= u v : u  {a, b}*, v  {c, d}* and |u|= |v|} 1.Design a context-free grammar that generates L. 2.Use your grammar and the construction from.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Closure.
Regular Expressions and Languages A regular expression is a notation to represent languages, i.e. a set of strings, where the set is either finite or contains.
CHAPTER 1 Regular Languages
Chapter 4 Pumping Lemma Properties of Regular Languages Decidable questions on Regular Languages.
Class Discussion Can you draw a DFA that accepts the language {a k b k | k = 0,1,2,…} over the alphabet  ={a,b}?
1 Closure Properties of Regular Languages L 1 and L 2 are regular. How about L 1  L 2, L 1  L 2, L 1 L 2, L 1, L 1 * ?
CS 203: Introduction to Formal Languages and Automata
1 Closure Properties of Regular Languages Union, Intersection, Difference, Concatenation, Kleene Closure, Reversal, Homomorphism.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 9 Mälardalen University 2006.
Strings and Languages Denning, Section 2.7. Alphabet An alphabet V is a finite nonempty set of symbols. Each symbol is a non- divisible or atomic object.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
 2004 SDU Lecture4 Regular Expressions.  2004 SDU 2 Regular expressions A third way to view regular languages. Say that R is a regular expression if.
P Symbol Q E(Q) a b a b a b Convert to a DFA: Start state: Final States:
1 Use the pumping theorem for context-free languages to prove that L= { a n b a n b a p : n, p ≥ 0, p ≥ n } is not context-free. Hint: For the pumping.
Regular Languages, Regular Operations, Closure
Properties of Context-Free Languages
Closure Properties of Regular Languages
Properties of Regular Languages
Properties of Regular Languages
PDAs Accept Context-Free Languages
Single Final State for NFA
CSE322 PROPERTIES OF REGULAR LANGUAGES
Properties of Regular Languages
Closure Properties of DFAs
COSC 3340: Introduction to Theory of Computation
CSE322 CONSTRUCTION OF FINITE AUTOMATA EQUIVALENT TO REGULAR EXPRESSION Lecture #9.
Deterministic PDAs - DPDAs
Closure Properties of Regular Languages
Properties of Context-Free languages
Closure Properties of Regular Languages
Convert to a DFA: Start state: Final States: P Symbol Q E(Q) a b.
Chapter 1 Regular Language
CSC312 Automata Theory Kleene’s Theorem Lecture # 12
NFAs accept the Regular Languages
Presentation transcript:

1 Closure E.g., we understand number systems partly by understanding closure properties: Naturals are closed under +, , but not -, . Integers are closed under +, -, , but not . Rationals are closed under +, -, , .

2 Closure Properties Since languages are sets of strings, first examine common set operations…

3 Union L = L’  L’’ More formally, binary union. By definition of regular languages. Why regular? ? ?

4 Closure Properties What other operations are closed for RLs by definition? Concatenation: L = L’ L’’ Closure: L = L’ *

5 Intersection L = L’  L’’ More formally, binary intersection. Why regular? ? ?

6 Intersection: Lessons Common technique: New state = product of old states. More generally: New state = product of old state & other info.

7 Complementation More formally, usually mean  ’ * - L’. Why regular? ? ?

8 Complementation: Proof Prove regular by corresponding DFA M: M is identical to DFA M’, but with final states complemented. M accepts x  M’ does not. M = (Q’,  ’,  ’, q’ 0, Q’-F’)

9 Intersection: Another Proof Now have alternate proof for intersection: Intersection closed because union & complementation are closed. Can prove closure properties using other closure properties! Don’t always have to show FA construction.

10 Reverse L = L’ R E.g., 0111  L’  1110  L’ R. Why regular? ? ?

11 Substitute symbol by symbol: E.g,  ’ = {0,1}, substitute 0  a, 1  b. Substitutions Result of substitution is regular. Obvious. Have implicitly used this frequently. Proof idea: Re-label transitions, change alphabet a b ba

12 Substitute symbol by string: E.g.,  ’ = {0,1}, substitute 0  aba, 1  bb. Substitutions Result of substitution is regular. Proof idea: Replace each transition with a series of new states & transitions, change alphabet a b b b b a b a b a

13 Substitute symbol by regular language: E.g.,  ’ = {0,1}, substitute 0  ab*a, 1  b+bb. Substitutions Result of substitution is regular. Proof idea: Replace transitions with whole FAs, add  transitions to these, change alphabet b+bb  ab * a  b+bb   Fairly intuitive, but let’s show more formally…

14 Summary Why are closure properties useful? Decompose model construction. Modular programming. Simplify proofs of regularity. Same as model construction, but with different goal. Simplify proofs of non-regularity.