{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

lect_06 - £ CS 373 Theory of Computation £ Madhusudan...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the 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 string-reversal 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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern