Properties of Regular Sets

Slides:



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

Chapter 3 Regular Expression and Regular Languages
Chapter 4 An Introduction to Finite Automata
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 9,10 Theory of AUTOMATA
Fall 2006Costas Busch - RPI1 Non-regular languages (Pumping Lemma)
3.2 Pumping Lemma for Regular Languages Given a language L, how do we know whether it is regular or not? If we can construct an FA to accept the language.
CS21 Decidability and Tractability
Introduction to Computability Theory
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 Lecture2: Non Deterministic Finite Automata Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture3: Regular Expressions Prof. Amos Israeli.
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.
Introduction to Computability Theory
1 Introduction to Computability Theory Lecture4: Non Regular Languages Prof. Amos Israeli.
Nonregular languages Sipser 1.4 (pages 77-82). CS 311 Fall Nonregular languages? We now know: –Regular languages may be specified either by regular.
CS 310 – Fall 2006 Pacific University CS310 Pumping Lemma Sections:1.4 page 77 September 27, 2006.
1 More Properties of Regular Languages. 2 We have proven Regular languages are closed under: Union Concatenation Star operation Reverse.
1 Regular Expressions. 2 Regular expressions describe regular languages Example: describes the language.
Costas Busch - RPI1 Standard Representations of Regular Languages Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
CS5371 Theory of Computation Lecture 5: Automata Theory III (Non-regular Language, Pumping Lemma, Regular Expression)
1 Introduction to Computability Theory Lecture4: Non Regular Languages Prof. Amos Israeli.
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.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Limitations.
1 More Applications of the Pumping Lemma. 2 The Pumping Lemma: Given a infinite regular language there exists an integer for any string with length we.
Courtesy Costas Busch - RPI1 Non-regular languages.
Fall 2004COMP 3351 Standard Representations of Regular Languages Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
CS5371 Theory of Computation Lecture 4: Automata Theory II (DFA = NFA, Regular Language)
1 Non-regular languages. 2 Regular languages Non-regular languages.
Regular Languages A language is regular over  if it can be built from ;, {  }, and { a } for every a 2 , using operators union ( [ ), concatenation.
1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 5 School of Innovation, Design and Engineering Mälardalen University 2012.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
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.
Introduction to CS Theory
Solution Exercise 1.43 a A r r s q q > b b e b s’ q r q’ b r’ a A’
CS 3240 – Chapter 4.  Closure Properties  Algorithms for Elementary Questions:  Is a given word, w, in L?  Is L empty, finite or infinite?  Are L.
Class Discussion Can you draw a DFA that accepts the language {a k b k | k = 0,1,2,…} over the alphabet  ={a,b}?
Properties of Regular Languages
CS355 - Theory of Computation Regular Expressions.
CS 203: Introduction to Formal Languages and Automata
Copyright © Cengage Learning. All rights reserved. CHAPTER 8 RELATIONS.
Algorithms for hard problems Automata and tree automata Juris Viksna, 2015.
Finite Automata Great Theoretical Ideas In Computer Science Victor Adamchik Danny Sleator CS Spring 2010 Lecture 20Mar 30, 2010Carnegie Mellon.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
Lecture #5 Advanced Computation Theory Finite Automata.
Lecture 15: Theory of Automata:2014 Finite Automata with Output.
General Discussion of “Properties” The Pumping Lemma Membership, Emptiness, Etc.
Formal Language & Automata Theory
Standard Representations of Regular Languages
CSE322 PUMPING LEMMA FOR REGULAR SETS AND ITS APPLICATIONS
PROPERTIES OF REGULAR LANGUAGES
Copyright © Cengage Learning. All rights reserved.
FORMAL LANGUAGES AND AUTOMATA THEORY
Lecture 9 Theory of AUTOMATA
REGULAR LANGUAGES AND REGULAR GRAMMARS
Infiniteness Test The Pumping Lemma Nonregular Languages
4. Properties of Regular Languages
Deterministic PDAs - DPDAs
Properties of Regular Languages
Elementary Questions about Regular Languages
Non-regular languages
Closure Properties of Regular Languages
Chapter 1 Regular Language - 02
Convert to a DFA: Start state: Final States: P Symbol Q E(Q) a b.
CSC312 Automata Theory Kleene’s Theorem Lecture # 12
CHAPTER 1 Regular Languages
CSCI 2670 Introduction to Theory of Computing
Presentation transcript:

Properties of Regular Sets Automata Theory CS 3313 Chapter 5 Properties of Regular Sets

Properties of Regular Sets There are several questions one can ask concerning regular sets. One important question is: given a language L specified in some manner, is L a regular set? We also might want to know whether the regular sets denoted by different regular expressions are the same, or find the finite automaton with fewest states, that denotes the same language as a given FA. This section of notes will try to discuss the tools to deal with questions such as these regarding regular sets. We prove a "pumping lemma" to show that certain languages are non-regular.

The Pumping Lemma for Regular Sets: Pumping lemma, is a powerful tool for proving certain languages non-regular. It is also useful in the development of algorithms to answer certain questions concerning finite automata, such as whether the language accepted by a given FA is finite or infinite. If a language is regular, it is accepted by a DFA M = (Q, Σ, δ, q0, F) with some particular number of states, say n. Consider an input of n or more symbols a1, a2, … am m ≥ n, and for i = 1, 2, …, m let δ(q0, a1, a2, … , ai) = qi It is not possible for each of the n + 1 states q0 , q1, …, qn to be distinct, since there are only n different states.

The Pumping Lemma for Regular Sets: Thus there are tow integers j and k, 0 ≤ j < k ≤ n, such that qj = qk. The path labeled a1, a2, … am in the transition diagram of M is illustrated in figure-3.1 [page 56 of the text book.] Since j < k, the string a j+1 …, a k is of length at least 1, and since k ≤ n, its length is no more than n. Proof of figure from book. LEMMA-3.1: Let L be a regular set. Then there is a constant n such that if z is any word in L, and |z| ≥ n, we may write z = u v w, in such a way that |u v| ≤ n, |v| ≥ 1, and for all i ≥ 1, and for all i ≥ 0, u vi w is in L.

Lemma 3.1 contd… Furthermore, n is no greater than the number of states of the smallest FA accepting L. Proof: See the discussion preceding the statement of the lemma. There, z is a1, a2, … am, u = a1, a2, … a j, v = a j+1 , …, ak , and w = ak+1 …, am Note that the pumping lemma states that if a regular set contains a long string z, then it contains an infinite set of strings of the from u vi w. The lemma does not state that every sufficiently long string in a regular set is of the form u vi w for some large i. In fact, (0 + 1)* contains arbitrarily long strings in which no sub-string appears three times consecutively. (The proof is left as an assignment)

Applications of the Pumping Lemma. Assignment: [Example-3.1, page 57 of the text book.] [Example-3.2, page 57 of the text book.]

Closure Properties of Regular Sets: There are many operations on languages that preserve regular sets, in the sense that the operations applied to regular sets result in regular sets. For example, the union of two regular sets is a regular set, since if r1 and r2 are regular expressions denoting regular sets L1 and L2, then r1 + r2 denotes L1 U L2, so L1 U L2 is also regular. Similarly, the concatenation of regular sets is a regular set and the Kleene closure of a regular set is regular. [Reading assignment: Theorem-3.1, Theorem-3.2 and Theorem-3.3 on page 59, of the text book.] Example:3.3, on page 60 of the text book. [Assignment: Theorem-3.4, on page 60 of the text book.] Example:3.4, on page 61 of the text book.

The MYHILL-NERODE Theorem and Minimization of Finite Automata: [Reading assignment: Theorem-3.9, page 65 of the text book.] Example-3.7 [Reading assignment: Minimizing finite automata, theorem-3.10 on page 67 of the text book.] Example-3.8