Convert to a DFA: Start state: Final States: State Symbol Read- Q E(Q)

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.
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.
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)*
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.
1 Regular Expressions. 2 Regular expressions describe regular languages Example: describes the language.
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.
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.
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 State SymbolRead- Q E(Q) a b a b a b Convert to a DFA: Start state: Final States:
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.
MA/CSSE 474 Theory of Computation Regular Expressions Intro.
1 Closure Properties of Regular Languages Union, Intersection, Difference, Concatenation, Kleene Closure, Reversal, Homomorphism.
Regular Languages ภาษาปกติ. Jaruloj Chongstitvatana Outline Regular expressions Regular languages Equivalence between languages accepted by.
Lecture 2 Overview Topics What I forgot from last lecture Proof techniques continued Alphabets, strings, languages Automata June 2, 2015 CSCE 355 Foundations.
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.
CIS Automata and Formal Languages – Pei Wang
CSE 105 theory of computation
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
FORMAL LANGUAGES AND AUTOMATA THEORY
CSE 105 theory of computation
Formal Language & Automata Theory
Closure Properties of Regular Languages
Single Final State for NFA
Language Recognition (12.4)
Assume that p, q, and r are in
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.
Closure Properties of Regular Languages
Properties of Context-Free languages
Closure Properties of Regular Languages
Regular Languages ภาษาปกติ.
Language Recognition (12.4)
Design NDFA’s which accept:
Convert to a DFA: Start state: Final States: P Symbol Q E(Q) a b.
CSE 105 theory of computation
Chapter 1 Regular Language
CSCI 2670 Introduction to Theory of Computing
CSC312 Automata Theory Kleene’s Theorem Lecture # 12
CSE 105 theory of computation
NFAs accept the Regular Languages
CSCE 355 Foundations of Computation
CSE 105 theory of computation
CSE 105 theory of computation
Presentation transcript:

Convert to a DFA: Start state: Final States: State Symbol Read- Q E(Q)

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

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 ab ca a ab c = abcaaabc

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

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.

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.

The set S = { L : L is L(M) for some DFA M} is closed under union. Let M1= (K1, Σ, δ1, s1, F1) accept L1 and M2= (K2, Σ, δ2, s2, F2) accept L2 . Proof 1: A construction for a new DFA M= (K, Σ, δ, s, F) which accepts L1 ⋃ L2. Proof 2: A construction for a new NDFA M= (K, Σ, Δ, s, F) which accepts L1 ⋃ L2.

The set S={ L : L is L(M) for some DFA M} is closed under concatenation. Let M1= (K1, Σ, δ1, s1, F1) accept L1 and M2= (K2, Σ, δ2, s2, F2) accept L2. Proof: A construction for a new NDFA M= (K, Σ, Δ, s, F) which accepts L1 ۰ L2.

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

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.

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 Σ.

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.

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