This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: £ CS 373: Theory of Computation £ Madhusudan Parthasarathy Lecture 6: Closure properties February 5, 2009 This lecture covers the last part of section 1.2 of Sipser (pp. 58 63), beginning of 1.3 (pp. 63 66), and also closure under string reversal. We also include a proof of the stringreversal construction and the union construction for NFAs, which Sipser unfortunately does not. 1 Operations on languages Regular operations on languages (sets of strings). Suppose L and K are languages. • Union : L ∪ K = n x x ∈ L or x ∈ K o . • Concatenation : L ◦ K = LK = n xy x ∈ L and y ∈ K o . • Star ( Kleene star ): L * = n w 1 w 2 ...w n w 1 ,...,w n ∈ L and n ≥ o . We (hopefully) all understand what union does. The other two have some subtleties. Let L = { under , over } , and K = { ground , water , work } . Then LK = { underground , underwater , underwork , overground , overwater , overwork } . Similarly, K * = , ground , water , work , groundground , groundwater , groundwork , workground , waterworkwork ,... . For star operator, note that the resulting set always contains the empty string (because n can be zero). Also, each of the substrings is chosen independently from the base set and you can repeat. E.g. waterworkwork is in K * . Regular languages are closed under many operations, including the three regular op erations listed above, set intersection, set complement, string reversal, homomorphism (formal version of shifting alphabets). We have seen (last class) why regular languages are closed under set complement. We will prove the rest of these bit by bit over the next few lectures. 1 2 Overview of closure properties We de ned a language to be regular if it is recognized by some DFA . The agenda for the new few lectures is to show that three di erent ways of de ning languages, that is NFA s, DFA s, and regexes, and in fact all equivalent; that is, they all de ne regular languages. We will show this equivalence, as follows. DFA NFA Regex trivial next lecture today next next lecture One of the main properties of languages we are interested in are closure properties, and the fact that regular languages are closed under union, intersection, complement, concatenation, and star (and also under homomorphism). However, closure operations are easier to show in one model than the other. For example, for DFA s showing that they are closed under union, intersection, complement are easy. But showing closure of DFA under concatenation and * is hard. Here is a table that lists the closure property and how hard it is to show it in the various models of regular languages. Model Property ∩ ∪ L ◦ * intersection union complement concatenation star DFA Easy (done) Easy (done) Easy (done) Hard Hard NFA Doable (hw?) Easy: Lemma 4.1 Hard Easy: Lemma 4.2 Easy: Lemma 4.3 regex Hard Easy Hard Easy Easy Recall what it means for regular languages to be closed under an operation op . If L 1 and L 2 are regular, then L 1 op L 2...
View
Full Document
 Spring '10
 kuma
 Regular expression, Portable Document Format, Foxit Reader, Foxit Software Company,20052006, n NFA

Click to edit the document details