Regular expressions Sipser 1.3 (pages 63-76). CS 311 Mount Holyoke College 2 Looks familiar…

Slides:



Advertisements
Similar presentations
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.
Advertisements

Measuring Time Complexity
NFAs and DFAs Sipser 1.2 (pages 47-63).
Regular operations Sipser 1.2 (pages 47-63). First… a sample proof Latex files on ella.
Regular expressions Regular languages Sipser 1.3 (pages 63-76)
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 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 |
Regular expressions Regular languages Sipser 1.3 (pages 63-76)
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…
Turing machines Sipser 2.3 and 3.1 (pages )
PDAs => CFGs Sipser 2.2 (pages ). Last time…
NFAs and DFAs Sipser 1.2 (pages 47-63). Last time…
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 ).
CFG => PDA Sipser 2 (pages ).
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.
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.
Courtesy Costas Busch - RPI1 Non Deterministic Automata.
Fall 2006Costas Busch - RPI1 Regular Expressions.
CS 310 – Fall 2006 Pacific University CS310 Converting NFA to DFA Sections:1.2 Page 54 September 15, 2006.
CS 310 – Fall 2006 Pacific University CS310 Regular Expressions Sections:1.3 page 63 September 18, 2006 September 20, 2006.
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.
1 Regular Expressions. 2 Regular expressions describe regular languages Example: describes the language.
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.
Introduction to the Theory of Computation John Paxton Montana State University Summer 2003.
1 Single Final State for NFAs and DFAs. 2 Observation Any Finite Automaton (NFA or DFA) can be converted to an equivalent NFA with a single final state.
Lecture 7 Sept 22, 2011 Goals: closure properties regular expressions.
CS5371 Theory of Computation Lecture 6: Automata Theory IV (Regular Expression = NFA = DFA)
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)
FSA Lecture 1 Finite State Machines. Creating a Automaton  Given a language L over an alphabet , design a deterministic finite automaton (DFA) M such.
CS 310 – Fall 2006 Pacific University CS310 Homework 2 & JFLAP September 22, 2006.
Fall 2004COMP 3351 Another NFA Example. Fall 2004COMP 3352 Language accepted (redundant state)
1 Regular Expressions/Languages Regular languages –Inductive definitions –Regular expressions syntax semantics Not covered in lecture.
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.
Fall 2004COMP 3351 Regular Expressions. Fall 2004COMP 3352 Regular Expressions Regular expressions describe regular languages Example: describes the language.
Nondeterminism (Deterministic) FA required for every state q and every symbol  of the alphabet to have exactly one arrow out of q labeled . What happens.
NFA Closure Properties Sipser pages pages NFAs also have closure properties We have given constructions for showing that DFAs are closed under.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
REGULAR LANGUAGES.
Theory of Computation, Feodor F. Dragan, Kent State University 1 Regular expressions: definition An algebraic equivalent to finite automata. We can build.
1 Module 14 Regular languages –Inductive definitions –Regular expressions syntax semantics.
Lecture 5 Sept 06, 2012 Regular expressions – examples Converting DFA to regular expression. (same works for NFA to r.e. conversion.) Converting R.E. to.
CHAPTER 1 Regular Languages
INHERENT LIMITATIONS OF COMPUTER PROGAMS CSci 4011.
Regular Expressions Costas Busch - LSU.
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
Nondeterministic Finite Automata (NFAs). Reminder: Deterministic Finite Automata (DFA) q For every state q in Q and every character  in , one and only.
1 Language Recognition (11.4) Longin Jan Latecki Temple University Based on slides by Costas Busch from the courseCostas Busch
 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.
1 Some Properties of Regular Languages. 2 Properties Concatenation:Star: Union: Are regular Languages For regular languages and.
Page 1. 1)Let B n = { a k | where k is a multiple of n}. I.e. B 1 = { a k | where k is a multiple of 1} = { a k | k Є {0,1,2,3,…}} = {‘’, a, aa, aaa, aaaa,
Formal Language & Automata Theory
Regular Expressions Sections:1.3 page 63 September 17, 2008
Nondeterministic Finite Automata
Regular Expressions Prof. Busch - LSU.
Chapter 1 Regular Language
Presentation transcript:

Regular expressions Sipser 1.3 (pages 63-76)

CS 311 Mount Holyoke College 2 Looks familiar…

CS 311 Mount Holyoke College 3 Your turn now!

CS 311 Mount Holyoke College 4 Formally Definition 1.52: Say that R is a regular expression if R is 1. a for some a in the alphabet Σ 2.ε 3.Ø 4.( R 1 ∪ R 2 ), where R 1 and R 2 are regular exressions 5.( R 1 ° R 2 ), where R 1 and R 2 are regular expressions 6.( R 1 *), where R 1 is a regular expression

CS 311 Mount Holyoke College 5 Examples 0*10* ={w | } ={w | w is a string of odd length} (0 ∪ ε)(1 ∪ ε) = (01)* ∅ = (+ ∪ - ∪ ε)(DD* ∪ DD*.D* ∪ D*.DD*) = where D = {0,1,2,3,4,5,6,7,8,9}

CS 311 Mount Holyoke College 6 Identities Let R be a regular expression –R ° Ø = –R ° ε = –R ∪ Ø = –R ∪ ε =

CS 311 Mount Holyoke College 7 Regular expressions and NFAs Theorem 1.54: A language is regular if and only if some regular expression describes it. Proof ( ⇐ ) 1.If a ∈ Σ, then a is regular. 2.ε is regular. 3. Ø is regular. 4.If R 1 and R 2 are regular, then ( R 1 ∪ R 2 ) is regular. 5.If R 1 and R 2 are regular, then ( R 1 ° R 2 ) is regular. 6.If R 1 is a regular, then ( R 1 *) is regular

CS 311 Mount Holyoke College 8 Proof in action Build an NFA to that recognizes the regular expression a(a ∪ b)*a