l7-handout

l7-handout - Lecture 7: Closure properties Outline Closure...

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

View Full Document Right Arrow Icon
Lecture 7: Closure properties David Dill Department of Computer Science 1 Outline Closure properties of regular languages 2 Closure Properties A ”closure property” is a theorem that shows that certain operations preserve some property. People often say that a set is closed under certain operations. For example, the integers are closed under addition, subtraction, and multiplication, but not division. So a closure property is that addition of integers gives an integer. Closure properties are generally of interest to mathematics. They provide powerful ways to prove that certain sets have a property, and, sometimes more importantly, that the sets do not have the property. That’s why we’re interested in closure properties of regular languages. We can use all the different representations we have (reg exprs, DFAs, NFAs e-NFAs) to prove closure properties. 3 Regular Operators We can use all the different representations we have (reg exprs, DFAs, NFEs e-NFAs) to prove closure properties. Theorem Regular sets are closed under the operations: union, concatenation, Kleene closure. Proof: Suppose L 1 and L 2 are regular languages. Then there exist regular expressions R 1 and R 2 such that L ( R 1 ) = L 1 and L ( R 2 ) = L 2 . But then L ( R 1 + R 2 ) = L 1 L 2 , L ( R 1 R 2 ) = L 1 L 2 , and L ( R * 1 ) = L * 1 . So each of these languages is regular as well. 4
Background image of page 1

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

View Full DocumentRight Arrow Icon
Boolean Operations Def. The complement of a language (relative to an alphabet Σ ) L = Σ * - L . The Boolean operations are union, intersection, and complement. Theorem: The regular languages are closed under Boolean operations. Proof: We’ve already got union. Complement: Build the DFA D . Define D C as the same DFA, but complement the set of final states ( F C = Q - F ). It’s easy to see that this DFA accepts the complement of the language. Note:
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/08/2011 for the course CS 154 taught by Professor Motwani,r during the Winter '08 term at Stanford.

Page1 / 6

l7-handout - Lecture 7: Closure properties Outline Closure...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online