Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 7 Sept 22, 2011 Goals: closure properties regular expressions.

Similar presentations


Presentation on theme: "Lecture 7 Sept 22, 2011 Goals: closure properties regular expressions."— Presentation transcript:

1 Lecture 7 Sept 22, 2011 Goals: closure properties regular expressions.

2 Operations on Languages Concatenation S 1 S 2 = {s 1 s 2 : s 1  S 1, s 2  S 2 } Union S 1 U S 2 = {s: s  S 1 or s  S 2 } Kleene Star S* = {  } U {s 1 s 2...s n :  i, s i  S}

3 Examples If w = 10, v = 011, then w U v = {w} U {v} = {10,011} w* = { , 10, 1010, 101010, …} (w U v)* = { , 10, 011, 10011, 01110, 011011, 1010, 101010, …} (w v)* = { , 10011, 1001110011, 100111001110011, …}

4 Theorem: The set of Regular languages is closed under the three operations concatenation, union and Kleene star. Proof: (by construction) Union: Given DFA’s M 1 and M 2 for L 1 and L 2, we design a NFA for L 1 U L 2. s1 s2 s   M1M1 M2M2

5 Concatenation:

6

7 Concatenation – Formal Proof

8 Closure under Kleene star – informal proof DFA for a language L is shown on the left. The NFA for L* can be constructed as shown on the right.

9 Regular Expressions over 


Download ppt "Lecture 7 Sept 22, 2011 Goals: closure properties regular expressions."

Similar presentations


Ads by Google