Convert to a DFA: Start state: Final States: P Symbol Q E(Q) a b.

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.
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 |
1 Introduction to Computability Theory Lecture3: Regular Expressions Prof. Amos Israeli.
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.
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 Languages and Finite Automata or how to talk to machines...
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.
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.
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:
CSCI 2670 Introduction to Theory of Computing September 1, 2005.
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.
INHERENT LIMITATIONS OF COMPUTER PROGAMS CSci 4011.
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.
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.
Theory of Languages and Automata By: Mojtaba Khezrian.
CIS Automata and Formal Languages – Pei Wang
CSE 105 theory of computation
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.
Non Deterministic Automata
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
CSE322 CONSTRUCTION OF FINITE AUTOMATA EQUIVALENT TO REGULAR EXPRESSION Lecture #9.
Non-Deterministic Finite Automata
Nondeterministic Finite Automata
Closure Properties of Regular Languages
Properties of Context-Free languages
Closure Properties of Regular Languages
Regular Languages ภาษาปกติ.
Language Recognition (12.4)
Convert to a DFA: Start state: Final States: State Symbol Read- Q E(Q)
Design NDFA’s which accept:
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
Kleene’s Theorem (Part-3)
NFAs accept the Regular Languages
CSCI 2670 Introduction to Theory of Computing
CSE 105 theory of computation
CSE 105 theory of computation
Presentation transcript:

Convert to a DFA: Start state: Final States: P Symbol Q E(Q) a b

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