1 State SymbolRead- Q E(Q) a b a b a b Convert to a DFA: Start state: Final States:

Slides:



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

Lecture 8 From NFA to Regular Language. Induction on k= # of states other than initial and final states K=0 a a* b a c d c*a(d+bc*a)*
Automata and Formal Languages Tim Sheard 1 Lecture 9 Reasoning with DFAs.
1 Languages. 2 A language is a set of strings String: A sequence of letters Examples: “cat”, “dog”, “house”, … Defined over an alphabet: Languages.
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 |
Finite Automata Great Theoretical Ideas In Computer Science Anupam Gupta Danny Sleator CS Fall 2010 Lecture 20Oct 28, 2010Carnegie Mellon University.
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.
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.
1 Regular Expressions. 2 Regular expressions describe regular languages Example: describes the language.
Introduction to the Theory of Computation John Paxton Montana State University Summer 2003.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Regular.
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 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.
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 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.
Fall 2004COMP 3351 Regular Expressions. Fall 2004COMP 3352 Regular Expressions Regular expressions describe regular languages Example: describes the language.
Regular Languages A language is regular over  if it can be built from ;, {  }, and { a } for every a 2 , using operators union ( [ ), concatenation.
1 Problems of the day: 1. Let P= {(b, acbb), (aac, a), (b, ca)}. Prove that P has a match. 2. How many ways can aab be factored as x y z such that |y|≥
1 Proof of the Day: Let P= {(b, acbb), (aac, a), (b, ca)}. 1.Prove that P has a match. 2. Find Q which is P encoded in binary. 3.What match of Q corresponds.
THEORY OF COMPUTATION 08 KLEENE’S THEOREM.
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 For each language, give a regular expression that generates the language and a DFA that accepts it. L 1 = { w  {0, 1}* : has both 00 and 11 as substrings}
1 Problem of the Day: Factor (ab) k as xyz in all ways such that y ≠ ε.
1 Assignment #1 is due on Friday. Any questions?.
CSCI 2670 Introduction to Theory of Computing August 26, 2004.
CSCI 2670 Introduction to Theory of Computing August 25, 2005.
CSCI 2670 Introduction to Theory of Computing September 1, 2005.
MA/CSSE 474 Theory of Computation Regular Expressions Intro.
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.
1 String v is a prefix of w if w= v y for some string y. String v is a suffix of w if w= x v for some string x. String v is a substring of w if there are.
INHERENT LIMITATIONS OF COMPUTER PROGAMS CSci 4011.
Regular Expressions Costas Busch - LSU.
Regular Languages ภาษาปกติ. Jaruloj Chongstitvatana Outline Regular expressions Regular languages Equivalence between languages accepted by.
1 For each language, give a DFA that accepts it. L 1 = { w  {a, b}* : w at most 2 a’s} L 2 = { w  {0, 1}* : has both 00 and 11 as substrings} L 3 = {
Lecture 2 Overview Topics What I forgot from last lecture Proof techniques continued Alphabets, strings, languages Automata June 2, 2015 CSCE 355 Foundations.
Finite Automata Great Theoretical Ideas In Computer Science Victor Adamchik Danny Sleator CS Spring 2010 Lecture 20Mar 30, 2010Carnegie Mellon.
1 Language Recognition (11.4) Longin Jan Latecki Temple University Based on slides by Costas Busch from the courseCostas Busch
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
Complexity and Computability Theory I Lecture #5 Rina Zviel-Girshin Leah Epstein Winter
Finite Automata A simple model of computation. 2 Finite Automata2 Outline Deterministic finite automata (DFA) –How a DFA works.
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.
Languages.
L1= { w  {a,b}* : w consists of all strings that begin with an even number of a's followed by an odd number of b's. } L2= { w  {a,b}* : the number of.
Closure Properties of Regular Languages
Properties of Regular Languages
CSE 105 theory of computation
Formal Language & Automata Theory
Single Final State for NFA
Closure Properties for Regular Languages
CSE322 PROPERTIES OF REGULAR LANGUAGES
Properties of Regular Languages
CSE322 CONSTRUCTION OF FINITE AUTOMATA EQUIVALENT TO REGULAR EXPRESSION Lecture #9.
Closure Properties of Regular Languages
Properties of Context-Free languages
Closure Properties of Regular Languages
Regular Languages ภาษาปกติ.
Convert to a DFA: Start state: Final States: State Symbol Read- Q E(Q)
Design NDFA’s which accept:
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
CSCE 355 Foundations of Computation
Presentation transcript:

1 State SymbolRead- Q E(Q) a b a b a b Convert to a DFA: Start state: Final States:

2 Announcements Assignment #2: Due at beginning of class Friday June 8. Read through the assignment and take any questions you have about it to the tutorial next week.

3 P = {(a, bb)(a, ab), (b, ca), (ca, a), (abc, c), (cccc, acc)}, MATCH: (a, ab) (b, ca) (ca, a) (a, ab) (abc, c) a b ca a abc = abcaaabc

4 (Comic by Randall Munroe.) CSC 320 Lecture 10: DFA’s and Regular Expressions

5 Lecture 11: Regular Languages The goal of the lecture is to prove that: R= { L : L is generated by a regular expression}, and S= { L : L is L(M) for a DFA(M)} are the same sets of languages (R=S). We already proved that S is the same set as T= {L : L = L(M) for some NDFA M} (last class). Before proving this, it is helpful to first show that the set S is closed under union, concatenation and Kleene star.

6 A set S is closed with respect to a binary operation · if for all s and t in S, s · t is in S. Examples: N= {0, 1, 2, 3, …} Closed for addition and multiplication. Not closed under subtraction or division.

7 The set S = { L : L is L(M) for some DFA M} is closed under union. Let M 1 = (K 1, Σ, δ 1, s 1, F 1 ) accept L 1 and M 2 = (K 2, Σ, δ 2, s 2, F 2 ) accept L 2. Proof 1: A construction for a new DFA M= (K, Σ, δ, s, F) which accepts L 1 ⋃ L 2. Proof 2: A construction for a new NDFA M= (K, Σ, Δ, s, F) which accepts L 1 ⋃ L 2.

8 The set S={ L : L is L(M) for some DFA M} is closed under concatenation. Let M 1 = (K 1, Σ, δ 1, s 1, F 1 ) accept L 1 and M 2 = (K 2, Σ, δ 2, s 2, F 2 ) accept L 2. Proof: A construction for a new NDFA M= (K, Σ, Δ, s, F) which accepts L 1 ۰ L 2.

9 The set S= { L : L is L(M) for some DFA M} is closed under Kleene star. Let M 1 = (K 1, Σ, δ 1, s 1, F 1 ) accept L 1. Proof: A construction for a new NDFA M= (K, Σ, Δ, s, F) which accepts L 1 *.

10 Theorem: If L is a regular language, then L is L(M) for some DFA M. Proof: By showing how to construct a NDFA for L. Last lecture, we proved by construction that for every NDFA, there is an equivalent DFA. So this indirectly gives a construction for a DFA.

11 Regular expressions over Σ: [Basis] 1. Φ and σ for each σ  Σ are regular expressions. [Inductive step] If α and β are regular expressions, then so are: 2. ( αβ) 3. (α ⋃ β) and 4. α * Note: Regular expressions are strings over Σ ⋃ { (, ), Φ, ⋃, * } for some alphabet Σ.

12 Theorem: If L is accepted by a DFA M, then there is a regular expression which generates L. There is a proof which constructs a regular expression from the DFA in the text (in the proof of Theorem 2.3.2). I expect you to know that this theorem is true but you are not responsible for the proof. Conclusion: A language is regular if and only if it is accepted by a finite automaton.

13 The set of S= { L : L is L(M) for some DFA M} is closed under complement. Let M 1 = (K 1, Σ, δ 1, s 1, F 1 ) accept L 1. Proof: A construction for a new DFA M= (K, Σ, δ, s, F) which accepts the complement of L 1. Regular languages are also closed for intersection (assignment #2).