SlideShare ist ein Scribd-Unternehmen logo
1 von 37
Costas Busch - LSU 1
Properties of
Regular Languages
Costas Busch - LSU 2
1L 2L
21LLConcatenation:
*
1LStar:
21 LL Union:
Are regular
Languages
For regular languages and
we will prove that:
1L
21 LL 
Complement:
Intersection:
R
L1
Reversal:
Costas Busch - LSU 3
We say Regular languages are closed under
21LLConcatenation:
Star:
21 LL Union:
1L
21 LL 
Complement:
Intersection:
Reversal:
*
1L
R
L1
Costas Busch - LSU 4
a
b
b
a
NFA
Equivalent
NFA


a
b
b
a
A useful transformation: use one accept state
2 accept states
1 accept state
Costas Busch - LSU 5
NFA
Equivalent NFA
Single
accepting
state



In General
Costas Busch - LSU 6
NFA without accepting state
Add an accepting state
without transitions
Extreme case
Costas Busch - LSU 7
1LRegular language
  11 LML 
1M
Single accepting state
NFA 2M
2L
Single accepting state
  22 LML 
Regular language
NFA
Take two languages
Costas Busch - LSU 8
}{1 baL n

a
b
1M
 baL 2
ab
2M
0n
Example
Costas Busch - LSU 9
Union
NFA for
1M
2M
21 LL 


21 LLw  21 or LwLw 
Costas Busch - LSU 10
a
b
ab


}{1 baL n

}{2 baL 
}{}{21 babaLL n
NFA for
Example
Costas Busch - LSU 11
Concatenation
21LL
1M 2M

21LLw
NFA for
221121 and: LwLwwww 
change to
regular state
Costas Busch - LSU 12
NFA for
a
b ab
}{1 baL n

}{2 baL 
}{}}{{21 bbaababaLL nn


Example
Costas Busch - LSU 13
Star Operation
*
L
Lwwwww ik  :21 
LML )(

 
NFA for
*
Lw
or w
M
Costas Busch - LSU 14
**
1 }{ baL n

a
b
}{1 baL n



Example
NFA for
Costas Busch - LSU 15
Reverse
R
L
M
NFA for
M
1. Reverse all transitions
2. Make the initial state accept state
and the accept state initial state
LML )( R
LML )(
Costas Busch - LSU 16
}{1 baL n

a
b
1M
}{1
nR
baL 
a
b
1M
Example
Costas Busch - LSU 17
Complement
1. Take the DFA that accepts L
M
LML )(
M
LML )(
2. Make accept states regular
and vice-versa
Costas Busch - LSU 18
}{1 baL n

a
b
1M
ba,
ba,
}{*},{1 babaL n
 a
b
1M
ba,
ba,
Example
Costas Busch - LSU 19
NFAs cannot be used for complement
Make accept states regular
and vice-versa
{})( ML
M M
)(}{)( MLML  
**
},{)( baML 
NFA NFA
it is not the
complement
Costas Busch - LSU 20
Same example with DFAs
Make accept states regular
and vice-versa
{})( ML
M M
)(},{)( *
MLbaML 
**
},{)( baML 
DFA DFA
ba, ba,
it is the
complement
Costas Busch - LSU 21
Intersection
1L regular
2L regular
We show 21 LL 
regular
Costas Busch - LSU 22
DeMorgan’s Law: 2121 LLLL 
21 , LL regular, regular
21 , LL regular, regular
21 LL  regular
21 LL  regular
21 LL  regular
Costas Busch - LSU 23
Example
}{1 baL n

},{2 baabL 
regular
regular
}{21 abLL 
regular
Costas Busch - LSU 24
1Lfor for 2LDFA
1M
DFA
2M
Construct a new DFA that accepts
Machine Machine
M 21 LL 
M simulates in parallel and1M 2M
Another Proof for Intersection Closure
Costas Busch - LSU 25
States in M
ji pq ,
1M 2MState in State in
Costas Busch - LSU 26
1M 2M
1q 2qa
transition
1p 2pa
transition
DFA DFA
11, pq a
New transition
MDFA
22, pq
Costas Busch - LSU 27
0q
initial state
0p
initial state
New initial state
00, pq
1M 2MDFA DFA
MDFA
Costas Busch - LSU 28
iq
accept state
jp
accept states
New accept states
ji pq ,
kp
ki pq ,
1M 2MDFA DFA
MDFA
Both constituents must be accepting states
Costas Busch - LSU 29
Example:
}{1 baL n

a
b
1M
0n
}{2
m
abL 
b
b
2M
0q 1q 0p 1p
0m
2q 2p
a
a
ba, ba,
ba,
Costas Busch - LSU 30
00, pq
DFA for intersection
}{}{}{)( ababbaML mn

10, pqa
21, pq
b
ab 11, pq
20, pq
a
12, pq
22, pq
b
ba,
a
b
ba,
b
a
M
Costas Busch - LSU 31
Construction procedure for intersection
1. Build Initial State
2. For each new state and for each symbol
add transition to either an existing state
or create a new state and point to it
3. Repeat step 3 until no new states
are added
4. Designate accept states
Costas Busch - LSU 32
00, pq
Automaton for intersection
}{}{}{ ababbaL mn

initial state
Costas Busch - LSU 33
00, pq
Automaton for intersection
}{}{}{ ababbaL mn

10, pqa
add transition and new state
for symbol a 1M 2M
0q 0qa
0p 1pa
00 , pq a
M
10 , pq
Costas Busch - LSU 34
00, pq
Automaton for intersection
}{}{}{ ababbaL mn

10, pqa
21, pq
b
add transition and new state
for symbol b
1M 2M
0q 1qb 0p 2p
00 , pq b
M
21, pq
b
Costas Busch - LSU 35
Automaton for intersection
}{}{}{ ababbaL mn

00, pq 10, pqa
21, pq
b
ab 11, pq
20, pq
a
12, pq
22, pq
b
ba,
a
b
ba,
b
a
Repeat until no new states can be added
Costas Busch - LSU 36
Automaton for intersection
}{}{}{ ababbaL mn

add Accept state
00, pq 10, pqa
21, pq
b
ab 11, pq
20, pq
a
12, pq
22, pq
b
ba,
a
b
ba,
b
a
accept state for
accept state for
1q 1M
1p 2M
Costas Busch - LSU 37
simulates in parallel and1M 2M
accepts string w if and only if:
accepts string w1M
and accepts string w2M
)()()( 21 MLMLML 
Intersection DFA :M

Weitere ähnliche Inhalte

Was ist angesagt?

Algorithm chapter 10
Algorithm chapter 10Algorithm chapter 10
Algorithm chapter 10
chidabdu
 

Was ist angesagt? (20)

Lecture 5
Lecture 5Lecture 5
Lecture 5
 
0.0 Introduction to theory of computation
0.0 Introduction to theory of computation0.0 Introduction to theory of computation
0.0 Introduction to theory of computation
 
Lecture 7
Lecture 7Lecture 7
Lecture 7
 
Graph Theory: Connectivity & Isomorphism
Graph Theory: Connectivity & Isomorphism Graph Theory: Connectivity & Isomorphism
Graph Theory: Connectivity & Isomorphism
 
Lecture 3,4
Lecture 3,4Lecture 3,4
Lecture 3,4
 
AUTOMATA THEORY - SHORT NOTES
AUTOMATA THEORY - SHORT NOTESAUTOMATA THEORY - SHORT NOTES
AUTOMATA THEORY - SHORT NOTES
 
Lesson 04
Lesson 04Lesson 04
Lesson 04
 
Lecture: Automata
Lecture: AutomataLecture: Automata
Lecture: Automata
 
Automata theory
Automata theoryAutomata theory
Automata theory
 
1.1. the central concepts of automata theory
1.1. the central concepts of automata theory1.1. the central concepts of automata theory
1.1. the central concepts of automata theory
 
Theory of computation and automata
Theory of computation and automataTheory of computation and automata
Theory of computation and automata
 
Pumping lemma for cfl
Pumping lemma for cflPumping lemma for cfl
Pumping lemma for cfl
 
Regular Languages
Regular LanguagesRegular Languages
Regular Languages
 
Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)
 
Kleene's theorem
Kleene's theoremKleene's theorem
Kleene's theorem
 
Theory of Automata
Theory of AutomataTheory of Automata
Theory of Automata
 
Closure properties of context free grammar
Closure properties of context free grammarClosure properties of context free grammar
Closure properties of context free grammar
 
Lesson 08
Lesson 08Lesson 08
Lesson 08
 
Algorithm chapter 10
Algorithm chapter 10Algorithm chapter 10
Algorithm chapter 10
 
Pushdown Automata Theory
Pushdown Automata TheoryPushdown Automata Theory
Pushdown Automata Theory
 

Andere mochten auch

applications of set theory in economical problem
applications of set theory in economical problem applications of set theory in economical problem
applications of set theory in economical problem
Farjana Mim
 
5.state diagrams
5.state diagrams5.state diagrams
5.state diagrams
APU
 
Nondeterministic Finite Automat
Nondeterministic Finite AutomatNondeterministic Finite Automat
Nondeterministic Finite Automat
Adel Al-Ofairi
 

Andere mochten auch (20)

Lecture: Regular Expressions and Regular Languages
Lecture: Regular Expressions and Regular LanguagesLecture: Regular Expressions and Regular Languages
Lecture: Regular Expressions and Regular Languages
 
Regular expressions
Regular expressionsRegular expressions
Regular expressions
 
Dfa example
Dfa   exampleDfa   example
Dfa example
 
Theory of Computation
Theory of ComputationTheory of Computation
Theory of Computation
 
Regular expressions 2
Regular expressions 2Regular expressions 2
Regular expressions 2
 
Variants of Turing Machine
Variants of Turing MachineVariants of Turing Machine
Variants of Turing Machine
 
Pumping lemma for regular set h1
Pumping lemma for regular set h1Pumping lemma for regular set h1
Pumping lemma for regular set h1
 
Pumping lemma for regular language
Pumping lemma for regular languagePumping lemma for regular language
Pumping lemma for regular language
 
Lecture2 B
Lecture2 BLecture2 B
Lecture2 B
 
Ch3 server controls
Ch3 server controlsCh3 server controls
Ch3 server controls
 
Theory of automata and formal language
Theory of automata and formal languageTheory of automata and formal language
Theory of automata and formal language
 
Properties of cfg
Properties of cfgProperties of cfg
Properties of cfg
 
Introduction to Regular Expressions
Introduction to Regular ExpressionsIntroduction to Regular Expressions
Introduction to Regular Expressions
 
Deterministic Finite Automata
Deterministic Finite AutomataDeterministic Finite Automata
Deterministic Finite Automata
 
applications of set theory in economical problem
applications of set theory in economical problem applications of set theory in economical problem
applications of set theory in economical problem
 
Introduction to asp.net
Introduction to asp.netIntroduction to asp.net
Introduction to asp.net
 
5.state diagrams
5.state diagrams5.state diagrams
5.state diagrams
 
Dfa vs nfa
Dfa vs nfaDfa vs nfa
Dfa vs nfa
 
Nondeterministic Finite Automat
Nondeterministic Finite AutomatNondeterministic Finite Automat
Nondeterministic Finite Automat
 
Nfa egs
Nfa egsNfa egs
Nfa egs
 

Mehr von Shiraz316

Mehr von Shiraz316 (20)

FINGERNAIL DISORDER DETECTION FOR DISEASE ANALYSIS
FINGERNAIL DISORDER DETECTION FOR DISEASE ANALYSISFINGERNAIL DISORDER DETECTION FOR DISEASE ANALYSIS
FINGERNAIL DISORDER DETECTION FOR DISEASE ANALYSIS
 
K neareast neighbor algorithm presentation
K neareast neighbor algorithm presentationK neareast neighbor algorithm presentation
K neareast neighbor algorithm presentation
 
Khi 087 revised dt report
Khi 087 revised dt reportKhi 087 revised dt report
Khi 087 revised dt report
 
Khi 117 revised dt report
Khi 117 revised dt reportKhi 117 revised dt report
Khi 117 revised dt report
 
Khi 164 revised dt report
Khi 164 revised dt reportKhi 164 revised dt report
Khi 164 revised dt report
 
Khi 054 revised dt report
Khi 054 revised dt reportKhi 054 revised dt report
Khi 054 revised dt report
 
Khi 061 revised dt report
Khi 061 revised dt reportKhi 061 revised dt report
Khi 061 revised dt report
 
Khi 022 revised dt report
Khi 022 revised dt reportKhi 022 revised dt report
Khi 022 revised dt report
 
Khi 113 revised dt report
Khi 113 revised dt reportKhi 113 revised dt report
Khi 113 revised dt report
 
Khi 156 revised dt report
Khi 156 revised dt reportKhi 156 revised dt report
Khi 156 revised dt report
 
Khi 142 revised dt report
Khi 142 revised dt reportKhi 142 revised dt report
Khi 142 revised dt report
 
Khi 316 revised dt report
Khi 316 revised dt reportKhi 316 revised dt report
Khi 316 revised dt report
 
Khi 186 revised dt report
Khi 186 revised dt reportKhi 186 revised dt report
Khi 186 revised dt report
 
Khi 052 revised dt report
Khi 052 revised dt reportKhi 052 revised dt report
Khi 052 revised dt report
 
Khi 151 revised dt report
Khi 151 revised dt reportKhi 151 revised dt report
Khi 151 revised dt report
 
Khi 150 revised dt report
Khi 150 revised dt reportKhi 150 revised dt report
Khi 150 revised dt report
 
Khi 078 revised dt report
Khi 078 revised dt reportKhi 078 revised dt report
Khi 078 revised dt report
 
LTE quick introduction session Training
LTE quick introduction session TrainingLTE quick introduction session Training
LTE quick introduction session Training
 
LTE Sales Training for CPE Device
LTE Sales Training for CPE DeviceLTE Sales Training for CPE Device
LTE Sales Training for CPE Device
 
Witribe Customer Premises Equipment Training for LTE
Witribe Customer Premises Equipment Training for LTEWitribe Customer Premises Equipment Training for LTE
Witribe Customer Premises Equipment Training for LTE
 

Kürzlich hochgeladen

6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
@Chandigarh #call #Girls 9053900678 @Call #Girls in @Punjab 9053900678
 
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
nirzagarg
 
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
nilamkumrai
 
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
nilamkumrai
 
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
nirzagarg
 
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Kürzlich hochgeladen (20)

"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
 
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
 
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirt
 
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
 
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
 
Al Barsha Night Partner +0567686026 Call Girls Dubai
Al Barsha Night Partner +0567686026 Call Girls  DubaiAl Barsha Night Partner +0567686026 Call Girls  Dubai
Al Barsha Night Partner +0567686026 Call Girls Dubai
 
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
 
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
 
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
 
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf
 
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
 
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
 
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Microsoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftMicrosoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck Microsoft
 
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
 

Properties of Regular Expressions

  • 1. Costas Busch - LSU 1 Properties of Regular Languages
  • 2. Costas Busch - LSU 2 1L 2L 21LLConcatenation: * 1LStar: 21 LL Union: Are regular Languages For regular languages and we will prove that: 1L 21 LL  Complement: Intersection: R L1 Reversal:
  • 3. Costas Busch - LSU 3 We say Regular languages are closed under 21LLConcatenation: Star: 21 LL Union: 1L 21 LL  Complement: Intersection: Reversal: * 1L R L1
  • 4. Costas Busch - LSU 4 a b b a NFA Equivalent NFA   a b b a A useful transformation: use one accept state 2 accept states 1 accept state
  • 5. Costas Busch - LSU 5 NFA Equivalent NFA Single accepting state    In General
  • 6. Costas Busch - LSU 6 NFA without accepting state Add an accepting state without transitions Extreme case
  • 7. Costas Busch - LSU 7 1LRegular language   11 LML  1M Single accepting state NFA 2M 2L Single accepting state   22 LML  Regular language NFA Take two languages
  • 8. Costas Busch - LSU 8 }{1 baL n  a b 1M  baL 2 ab 2M 0n Example
  • 9. Costas Busch - LSU 9 Union NFA for 1M 2M 21 LL    21 LLw  21 or LwLw 
  • 10. Costas Busch - LSU 10 a b ab   }{1 baL n  }{2 baL  }{}{21 babaLL n NFA for Example
  • 11. Costas Busch - LSU 11 Concatenation 21LL 1M 2M  21LLw NFA for 221121 and: LwLwwww  change to regular state
  • 12. Costas Busch - LSU 12 NFA for a b ab }{1 baL n  }{2 baL  }{}}{{21 bbaababaLL nn   Example
  • 13. Costas Busch - LSU 13 Star Operation * L Lwwwww ik  :21  LML )(    NFA for * Lw or w M
  • 14. Costas Busch - LSU 14 ** 1 }{ baL n  a b }{1 baL n    Example NFA for
  • 15. Costas Busch - LSU 15 Reverse R L M NFA for M 1. Reverse all transitions 2. Make the initial state accept state and the accept state initial state LML )( R LML )(
  • 16. Costas Busch - LSU 16 }{1 baL n  a b 1M }{1 nR baL  a b 1M Example
  • 17. Costas Busch - LSU 17 Complement 1. Take the DFA that accepts L M LML )( M LML )( 2. Make accept states regular and vice-versa
  • 18. Costas Busch - LSU 18 }{1 baL n  a b 1M ba, ba, }{*},{1 babaL n  a b 1M ba, ba, Example
  • 19. Costas Busch - LSU 19 NFAs cannot be used for complement Make accept states regular and vice-versa {})( ML M M )(}{)( MLML   ** },{)( baML  NFA NFA it is not the complement
  • 20. Costas Busch - LSU 20 Same example with DFAs Make accept states regular and vice-versa {})( ML M M )(},{)( * MLbaML  ** },{)( baML  DFA DFA ba, ba, it is the complement
  • 21. Costas Busch - LSU 21 Intersection 1L regular 2L regular We show 21 LL  regular
  • 22. Costas Busch - LSU 22 DeMorgan’s Law: 2121 LLLL  21 , LL regular, regular 21 , LL regular, regular 21 LL  regular 21 LL  regular 21 LL  regular
  • 23. Costas Busch - LSU 23 Example }{1 baL n  },{2 baabL  regular regular }{21 abLL  regular
  • 24. Costas Busch - LSU 24 1Lfor for 2LDFA 1M DFA 2M Construct a new DFA that accepts Machine Machine M 21 LL  M simulates in parallel and1M 2M Another Proof for Intersection Closure
  • 25. Costas Busch - LSU 25 States in M ji pq , 1M 2MState in State in
  • 26. Costas Busch - LSU 26 1M 2M 1q 2qa transition 1p 2pa transition DFA DFA 11, pq a New transition MDFA 22, pq
  • 27. Costas Busch - LSU 27 0q initial state 0p initial state New initial state 00, pq 1M 2MDFA DFA MDFA
  • 28. Costas Busch - LSU 28 iq accept state jp accept states New accept states ji pq , kp ki pq , 1M 2MDFA DFA MDFA Both constituents must be accepting states
  • 29. Costas Busch - LSU 29 Example: }{1 baL n  a b 1M 0n }{2 m abL  b b 2M 0q 1q 0p 1p 0m 2q 2p a a ba, ba, ba,
  • 30. Costas Busch - LSU 30 00, pq DFA for intersection }{}{}{)( ababbaML mn  10, pqa 21, pq b ab 11, pq 20, pq a 12, pq 22, pq b ba, a b ba, b a M
  • 31. Costas Busch - LSU 31 Construction procedure for intersection 1. Build Initial State 2. For each new state and for each symbol add transition to either an existing state or create a new state and point to it 3. Repeat step 3 until no new states are added 4. Designate accept states
  • 32. Costas Busch - LSU 32 00, pq Automaton for intersection }{}{}{ ababbaL mn  initial state
  • 33. Costas Busch - LSU 33 00, pq Automaton for intersection }{}{}{ ababbaL mn  10, pqa add transition and new state for symbol a 1M 2M 0q 0qa 0p 1pa 00 , pq a M 10 , pq
  • 34. Costas Busch - LSU 34 00, pq Automaton for intersection }{}{}{ ababbaL mn  10, pqa 21, pq b add transition and new state for symbol b 1M 2M 0q 1qb 0p 2p 00 , pq b M 21, pq b
  • 35. Costas Busch - LSU 35 Automaton for intersection }{}{}{ ababbaL mn  00, pq 10, pqa 21, pq b ab 11, pq 20, pq a 12, pq 22, pq b ba, a b ba, b a Repeat until no new states can be added
  • 36. Costas Busch - LSU 36 Automaton for intersection }{}{}{ ababbaL mn  add Accept state 00, pq 10, pqa 21, pq b ab 11, pq 20, pq a 12, pq 22, pq b ba, a b ba, b a accept state for accept state for 1q 1M 1p 2M
  • 37. Costas Busch - LSU 37 simulates in parallel and1M 2M accepts string w if and only if: accepts string w1M and accepts string w2M )()()( 21 MLMLML  Intersection DFA :M