Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Closure E.g., we understand number systems partly by understanding closure properties: Naturals are closed under +, , but not -, . Integers are closed.

Similar presentations


Presentation on theme: "1 Closure E.g., we understand number systems partly by understanding closure properties: Naturals are closed under +, , but not -, . Integers are closed."— Presentation transcript:

1 1 Closure E.g., we understand number systems partly by understanding closure properties: Naturals are closed under +, , but not -, . Integers are closed under +, -, , but not . Rationals are closed under +, -, , .

2 2 Closure Properties Since languages are sets of strings, first examine common set operations…

3 3 Union L = L’  L’’ More formally, binary union. By definition of regular languages. Why regular? ? ?

4 4 Closure Properties What other operations are closed for RLs by definition? Concatenation: L = L’ L’’ Closure: L = L’ *

5 5 Intersection L = L’  L’’ More formally, binary intersection. Why regular? ? ?

6 6 Intersection: Lessons Common technique: New state = product of old states. More generally: New state = product of old state & other info.

7 7 Complementation More formally, usually mean  ’ * - L’. Why regular? ? ?

8 8 Complementation: Proof Prove regular by corresponding DFA M: M is identical to DFA M’, but with final states complemented. M accepts x  M’ does not. M = (Q’,  ’,  ’, q’ 0, Q’-F’)

9 9 Intersection: Another Proof Now have alternate proof for intersection: Intersection closed because union & complementation are closed. Can prove closure properties using other closure properties! Don’t always have to show FA construction.

10 10 Reverse L = L’ R E.g., 0111  L’  1110  L’ R. Why regular? ? ?

11 11 Substitute symbol by symbol: E.g,  ’ = {0,1}, substitute 0  a, 1  b. Substitutions Result of substitution is regular. Obvious. Have implicitly used this frequently. Proof idea: Re-label transitions, change alphabet. 0 1 10 a b ba

12 12 Substitute symbol by string: E.g.,  ’ = {0,1}, substitute 0  aba, 1  bb. Substitutions Result of substitution is regular. Proof idea: Replace each transition with a series of new states & transitions, change alphabet. 0 1 10 a b b b b a b a b a

13 13 Substitute symbol by regular language: E.g.,  ’ = {0,1}, substitute 0  ab*a, 1  b+bb. Substitutions Result of substitution is regular. Proof idea: Replace transitions with whole FAs, add  transitions to these, change alphabet. 0 1 10 b+bb  ab * a  b+bb   Fairly intuitive, but let’s show more formally…

14 14 Summary Why are closure properties useful? Decompose model construction. Modular programming. Simplify proofs of regularity. Same as model construction, but with different goal. Simplify proofs of non-regularity.


Download ppt "1 Closure E.g., we understand number systems partly by understanding closure properties: Naturals are closed under +, , but not -, . Integers are closed."

Similar presentations


Ads by Google