Download presentation

Presentation is loading. Please wait.

Published byAntoine Rowett Modified over 3 years ago

1
Regular operations Sipser 1.1 (pages 44 – 47)

2
CS 311 Fall 2008 2 Building languages If L is a language, then its complement is L’ = {w | w ∉ L} Let A = {w | w is a string of 0 s and 1 s containing an odd number of 1s }. What is A' ? Let B = {w | w is a string of over {a,b} that starts and ends with the same symbol}. What is B' ? L L L’

3
CS 311 Fall 2008 3 Which complements are regular? A = {w | w is a string of 0 s and 1 s containing an odd number of 1s } What about A’ ? B = {w | w is a string over {a,b} that starts and ends with the same symbol} What about B’ ?

4
CS 311 Fall 2008 4 Our first theorem Theorem: The class of regular languages is closed under the complement operator How do we prove it?

5
CS 311 Fall 2008 5 Our first proof Theorem: The class of regular languages is closed under the complement operation Proof: Let A be a regular language. By definition, there exists a finite automaton M =(Q, Σ, δ, q 0, F) that recognizes A=L(M). Since N =(Q, Σ, δ, q 0, F’) is a finite automaton that recognizes L(N)=A’, A’ is a regular language.

6
CS 311 Fall 2008 6 Union and Intersection Let A and B be languages Define their union A ∪ B = { w | w ∈ A or w ∈ B} Define their intersection A∩B = { w | w ∈ A and w ∈ B}

7
CS 311 Fall 2008 7 Example: union A = {w | w is a string over {a,b} containing an odd number of a s } B = {w | w is a string over {a,b} that starts and ends with the same symbol} What is A ∪ B ? Is A ∪ B regular?

8
CS 311 Fall 2008 8 Can we build a recognizer for the union from previous machines?

9
CS 311 Fall 2008 9 Now do it in general… our second theorem Theorem: The class of regular languages is closed under the union operation

10
CS 311 Fall 2008 10 The proof Theorem: The class of regular languages is closed under the union operation Let A and B be regular languages. By definition, there exists finite automata M 1 =(Q 1, Σ, δ 1, q 1, F 1 ) and M 2 =(Q 2, Σ, δ 2, q 2, F 2 ) that recognize A=L(M 1 ) and B=L(M 2 ), respectively. What’s left? Build a finite automaton M that recognizes L(M) = A ∪ B.

11
CS 311 Fall 2008 11 What about intersection? Theorem: The class of regular languages is closed under the intersection operation

Similar presentations

Presentation is loading. Please wait....

OK

PDAs => CFGs Sipser 2.2 (pages 119-122). Last time…

PDAs => CFGs Sipser 2.2 (pages 119-122). Last time…

© 2018 SlidePlayer.com Inc.

All rights reserved.

By using this website, you agree with our use of **cookies** to functioning of the site. More info in our Privacy Policy and Google Privacy & Terms.

Ads by Google

Ppt on exponential functions Presenting ppt on ipad Ppt on solar energy class 10 Ppt on abstract art ideas Ppt on foldable screen technology Ppt on panel discussion invitation Download ppt on home security system Ppt on world diabetes day 2015 Download ppt on pulse code modulation pdf Ppt on history of badminton game