Regular operations Sipser 1.1 (pages 44 – 47). CS 311 Fall 2008 2 Building languages If L is a language, then its complement is L’ = {w | w ∉ L} Let A.

Slides:



Advertisements
Similar presentations
Properties of Regular Sets
Advertisements

CS 3240: Languages and Computation
Algorithms Sipser 3.3 (pages ). CS 311 Fall Computability Hilbert's Tenth Problem: Find a process according to which it can be determined.
Measuring Time Complexity
Non-Deterministic Finite Automata
DEFINITION Let f : A  B and let X  A and Y  B. The image (set) of X is f(X) = {y  B : y = f(x) for some x  X} and the inverse image of Y is f –1 (Y)
NFAs and DFAs Sipser 1.2 (pages 47-63).
Nondeterministic Finite Automata CS 130: Theory of Computation HMU textbook, Chapter 2 (Sec 2.3 & 2.5)
Deterministic Finite Automata (DFA)
More Set Definitions and Proofs 1.6, 1.7. Ordered n-tuple The ordered n-tuple (a1,a2,…an) is the ordered collection that has a1 as its first element,
CFGs and PDAs Sipser 2 (pages ). Long long ago…
Finite Automata Section 1.1 CSC 4170 Theory of Computation.
Regular operations Sipser 1.2 (pages 47-63). First… a sample proof Latex files on ella.
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.
Regular operations Sipser 1.1 (pages 44 – 47). CS 311 Mount Holyoke College 2 Building languages If L is a language, then its complement is L’ = {w |
PDAs => CFGs Sipser 2.2 (pages ). Last time…
PDAs => CFGs Sipser 2.2 (pages ). Last time…
NFAs and DFAs Sipser 1.2 (pages 47-63). Last time…
Reducibility Sipser 5.1 (pages ). CS 311 Fall Reducibility.
Nonregular languages Sipser 1.4 (pages 77-82). CS 311 Mount Holyoke College 2 Nonregular languages? We now know: –Regular languages may be specified either.
Reducibility Sipser 5.1 (pages ).
Regular expressions Sipser 1.3 (pages 63-76). CS 311 Mount Holyoke College 2 Looks familiar…
CFG => PDA Sipser 2 (pages ).
Intro to DFAs Readings: Sipser 1.1 (pages 31-44) With basic background from Sipser 0.
NFAs Sipser 1.2 (pages 47–54). CS 311 Mount Holyoke College 2 Recall… Last time we showed that the class of regular languages is closed under: –Complement.
Regular operations Sipser 1.2 (pages 47-63). First… a sample proof
Intro to DFAs Readings: Sipser 1.1 (pages 31-44) With basic background from Sipser 0.
CFG => PDA Sipser 2 (pages ). CS 311 Fall Formally… A pushdown automaton is a sextuple M = (Q, Σ, Γ, δ, q 0, F), where – Q is a finite set.
Nonregular languages Sipser 1.4 (pages 77-82). CS 311 Fall Nonregular languages? We now know: –Regular languages may be specified either by regular.
Finite Automata and Non Determinism
CS 310 – Fall 2006 Pacific University CS310 Finite Automata Sections:1.1 page 44 September 8, 2006.
Fall 2006Costas Busch - RPI1 Deterministic Finite Automata And Regular Languages.
CS 310 – Fall 2006 Pacific University CS310 Strings, String Operators, and Languages Sections: August 30, 2006.
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.
Fall 2006Costas Busch - RPI1 Properties of Regular Languages.
Regular expressions Sipser 1.3 (pages 63-76). CS 311 Fall Looks familiar…
CS5371 Theory of Computation Lecture 4: Automata Theory II (DFA = NFA, Regular Language)
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.
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.
Finite Automata – Definition and Examples Lecture 6 Section 1.1 Mon, Sep 3, 2007.
P Symbol Q E(Q) a b a b a b Convert to a DFA: Start state: Final States:
CSE 105 theory of computation
Regular Languages, Regular Operations, Closure
CSE 105 theory of computation
Theory of Languages and Automata
CSE 105 theory of computation
Formal Language & Automata Theory
Finite Automata & Regular Languages
Single Final State for NFA
CSE322 PROPERTIES OF REGULAR LANGUAGES
Properties of Regular Languages
CS 154, Lecture 3: DFANFA, Regular Expressions.
COSC 3340: Introduction to Theory of Computation
CSE322 CONSTRUCTION OF FINITE AUTOMATA EQUIVALENT TO REGULAR EXPRESSION Lecture #9.
Non Deterministic Automata
CSE 2001: Introduction to Theory of Computation Fall 2009
CSE322 Minimization of finite Automaton & REGULAR LANGUAGES
Closure Properties of Regular Languages
Properties of Context-Free languages
Convert to a DFA: Start state: Final States: State Symbol Read- Q E(Q)
Convert to a DFA: Start state: Final States: P Symbol Q E(Q) a b.
CSE 105 theory of computation
Chapter 1 Regular Language
CSE 105 theory of computation
CSE 105 theory of computation
CSE 105 theory of computation
CSE 105 theory of computation
Presentation transcript:

Regular operations Sipser 1.1 (pages 44 – 47)

CS 311 Fall Building languages If L is a language, then its complement is L’ = {w | w ∉ L} Let A = {w | w is a string of 0 s and 1 s containing an odd number of 1s }. What is A' ? Let B = {w | w is a string of over {a,b} that starts and ends with the same symbol}. What is B' ? L L L’

CS 311 Fall Which complements are regular? A = {w | w is a string of 0 s and 1 s containing an odd number of 1s } What about A’ ? B = {w | w is a string over {a,b} that starts and ends with the same symbol} What about B’ ?

CS 311 Fall Our first theorem Theorem: The class of regular languages is closed under the complement operator How do we prove it?

CS 311 Fall Our first proof Theorem: The class of regular languages is closed under the complement operation Proof: Let A be a regular language. By definition, there exists a finite automaton M =(Q, Σ, δ, q 0, F) that recognizes A=L(M). Since N =(Q, Σ, δ, q 0, F’) is a finite automaton that recognizes L(N)=A’, A’ is a regular language.

CS 311 Fall Union and Intersection Let A and B be languages Define their union A ∪ B = { w | w ∈ A or w ∈ B} Define their intersection A∩B = { w | w ∈ A and w ∈ B}

CS 311 Fall Example: union A = {w | w is a string over {a,b} containing an odd number of a s } B = {w | w is a string over {a,b} that starts and ends with the same symbol} What is A ∪ B ? Is A ∪ B regular?

CS 311 Fall Can we build a recognizer for the union from previous machines?

CS 311 Fall Now do it in general… our second theorem Theorem: The class of regular languages is closed under the union operation

CS 311 Fall The proof Theorem: The class of regular languages is closed under the union operation Let A and B be regular languages. By definition, there exists finite automata M 1 =(Q 1, Σ, δ 1, q 1, F 1 ) and M 2 =(Q 2, Σ, δ 2, q 2, F 2 ) that recognize A=L(M 1 ) and B=L(M 2 ), respectively. What’s left? Build a finite automaton M that recognizes L(M) = A ∪ B.

CS 311 Fall What about intersection? Theorem: The class of regular languages is closed under the intersection operation