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 |

Slides:



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

Properties of Regular Sets
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.
Nondeterministic Finite Automata CS 130: Theory of Computation HMU textbook, Chapter 2 (Sec 2.3 & 2.5)
Deterministic Finite Automata (DFA)
FORMAL LANGUAGES, AUTOMATA, AND COMPUTABILITY
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.
Measuring Time Complexity Sipser 7.1 (pages )
Regular expressions Regular languages Sipser 1.3 (pages 63-76)
PDAs => CFGs Sipser 2.2 (pages ). Last time…
Algorithms Sipser 3.3 (pages ). CS 311 Mount Holyoke College 2 Computability Hilbert's Tenth Problem: Find “a process according to which it can.
CFGs and PDAs Sipser 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.
Turing machines Sipser 2.3 and 3.1 (pages )
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.
Context-Free Grammars Sipser 2.1 (pages 99 – 109).
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 ).
The Halting Problem Sipser 4.2 (pages ). CS 311 Mount Holyoke College 2 Taking stock All languages Turing-recognizable Turing-decidable Context-free.
Intro to DFAs Readings: Sipser 1.1 (pages 31-44) With basic background from Sipser 0.
Mapping Reducibility Sipser 5.3 (pages ).
More Turing Machines Sipser 3.2 (pages ).
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.
Decidable languages Sipser 4.1 (pages ). CS 311 Mount Holyoke College 2 Hierarchy of languages All languages Turing-recognizable Turing-decidable.
Nonregular languages Sipser 1.4 (pages 77-82). CS 311 Fall Nonregular languages? We now know: –Regular languages may be specified either by regular.
Lecture 3UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 3.
Finite Automata and Non Determinism
CS 310 – Fall 2006 Pacific University CS310 Finite Automata Sections:1.1 page 44 September 8, 2006.
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)
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
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.
1 State SymbolRead- Q E(Q) a b a b a b Convert to a DFA: Start state: Final States:
Finite Automata – Definition and Examples Lecture 6 Section 1.1 Mon, Sep 3, 2007.
INHERENT LIMITATIONS OF COMPUTER PROGAMS CSci 4011.
Deterministic Finite Automata COMPSCI 102 Lecture 2.
Finite Automata & Regular Languages Sipser, Chapter 1.
Great Theoretical Ideas in Computer Science for Some.
P Symbol Q E(Q) a b a b a b Convert to a DFA: Start state: Final States:
Theory of Languages and Automata
CSE 105 theory of computation
Finite Automata & Regular Languages
Closure Properties for Regular Languages
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
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
CSC 4170 Theory of Computation Finite Automata Section 1.1.
CSCI 2670 Introduction to Theory of Computing
CSE 105 theory of computation
Presentation transcript:

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 | 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 Mount Holyoke College 3 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 Mount Holyoke College 4 Our first theorem Theorem: The class of regular languages is closed under the complement operator How do we prove it?

CS 311 Mount Holyoke College 5 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 Mount Holyoke College 6 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 Mount Holyoke College 7 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 Mount Holyoke College 8 Can we build a recognizer for the union from previous machines?

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

CS 311 Mount Holyoke College 10 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 Mount Holyoke College 11 What about intersection? Theorem: The class of regular languages is closed under the intersection operation