Presentation on theme: "Properties of Regular Sets"— Presentation transcript:
1 Properties of Regular Sets Automata Theory CS 3313Chapter 5Properties of Regular Sets
2 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.
3 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) = qiIt is not possible for each of the n + 1 states q0 , q1, …, qn to be distinct, since there are only n different states.
4 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.
5 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 …, amNote 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)
6 Applications of the Pumping Lemma. Assignment:[Example-3.1, page 57 of the text book.][Example-3.2, page 57 of the text book.]
7 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.
8 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