SlideShare a Scribd company logo
CSE322
Comparison of deterministic and
nondeterministic versions
&
closure properties
Lecture #34
Union Closure Properties
Lemma: Let A1 and A2 be two CF languages,
then the union A1∪A2 is context free as well.
Proof: Assume that the two grammars are
G1=(V1,Σ,R1,S1) and G2=(V2,Σ,R2,S2).
Construct a third grammar G3=(V3,Σ,R3,S3) by:
V3 = V1 ∪V2 ∪ { S3 } (new start variable) with
R3 = R1 ∪ R2 ∪ { S3 → S1 | S2 }.
It follows that L(G3) = L(G1) ∪ L(G2).
Intersection & Complement?
Let again A1 and A2 be two CF languages.
One can prove that, in general,
the intersection A1 ∩ A2 ,
and
the complement Ā1= Σ*  A1
are not context free languages.
One proves this with specific counter examples
of languages (see homework).

More Related Content

What's hot

Lecture 5
Lecture 5Lecture 5
Lecture 5
shah zeb
 
Lecture 1,2
Lecture 1,2Lecture 1,2
Lecture 1,2
shah zeb
 
Theory of Automata Lesson 02
Theory of Automata Lesson 02Theory of Automata Lesson 02
Theory of Automata Lesson 02
hamzamughal39
 
Theory of Automata
Theory of AutomataTheory of Automata
Theory of Automata
Farooq Mian
 
FLAT Notes
FLAT NotesFLAT Notes
FLAT Notes
dilip kumar
 
Theory of Automata Lesson 01
 Theory of Automata Lesson 01  Theory of Automata Lesson 01
Theory of Automata Lesson 01
hamzamughal39
 
Context free grammar
Context free grammarContext free grammar
Context free grammar
Radhakrishnan Chinnusamy
 
Improper integral
Improper integralImproper integral
Improper integral
HardyJadav
 
Theory of automata and formal language
Theory of automata and formal languageTheory of automata and formal language
Theory of automata and formal language
Rabia Khalid
 
Lecture 6
Lecture 6Lecture 6
Lecture 6
shah zeb
 
Lesson 03
Lesson 03Lesson 03
Lesson 03
maamir farooq
 
1.7. eqivalence of nfa and dfa
1.7. eqivalence of nfa and dfa1.7. eqivalence of nfa and dfa
1.7. eqivalence of nfa and dfa
Sampath Kumar S
 
Lecture 3,4
Lecture 3,4Lecture 3,4
Lecture 3,4
shah zeb
 
Unit iii
Unit iiiUnit iii
Unit iii
TPLatchoumi
 

What's hot (16)

To lec 04
To lec 04To lec 04
To lec 04
 
Lecture 5
Lecture 5Lecture 5
Lecture 5
 
Lecture 1,2
Lecture 1,2Lecture 1,2
Lecture 1,2
 
To lec 03
To lec 03To lec 03
To lec 03
 
Theory of Automata Lesson 02
Theory of Automata Lesson 02Theory of Automata Lesson 02
Theory of Automata Lesson 02
 
Theory of Automata
Theory of AutomataTheory of Automata
Theory of Automata
 
FLAT Notes
FLAT NotesFLAT Notes
FLAT Notes
 
Theory of Automata Lesson 01
 Theory of Automata Lesson 01  Theory of Automata Lesson 01
Theory of Automata Lesson 01
 
Context free grammar
Context free grammarContext free grammar
Context free grammar
 
Improper integral
Improper integralImproper integral
Improper integral
 
Theory of automata and formal language
Theory of automata and formal languageTheory of automata and formal language
Theory of automata and formal language
 
Lecture 6
Lecture 6Lecture 6
Lecture 6
 
Lesson 03
Lesson 03Lesson 03
Lesson 03
 
1.7. eqivalence of nfa and dfa
1.7. eqivalence of nfa and dfa1.7. eqivalence of nfa and dfa
1.7. eqivalence of nfa and dfa
 
Lecture 3,4
Lecture 3,4Lecture 3,4
Lecture 3,4
 
Unit iii
Unit iiiUnit iii
Unit iii
 

More from Mohd Arif Ansari

A944346117 22750 24_2018_equivalence of dfa and ndfa
A944346117 22750 24_2018_equivalence of dfa and ndfaA944346117 22750 24_2018_equivalence of dfa and ndfa
A944346117 22750 24_2018_equivalence of dfa and ndfa
Mohd Arif Ansari
 
A792697141 22750 24_2018_minimization of fa & regular languages
A792697141 22750 24_2018_minimization of fa & regular languagesA792697141 22750 24_2018_minimization of fa & regular languages
A792697141 22750 24_2018_minimization of fa & regular languages
Mohd Arif Ansari
 
A698111855 22750 26_2018_finite
A698111855 22750 26_2018_finiteA698111855 22750 26_2018_finite
A698111855 22750 26_2018_finite
Mohd Arif Ansari
 
A576893542 22750 24_2018_recursive and recursively enumerable sets
A576893542 22750 24_2018_recursive and recursively enumerable setsA576893542 22750 24_2018_recursive and recursively enumerable sets
A576893542 22750 24_2018_recursive and recursively enumerable sets
Mohd Arif Ansari
 
A496658235 22750 31_2018_practice exercise2
A496658235 22750 31_2018_practice exercise2A496658235 22750 31_2018_practice exercise2
A496658235 22750 31_2018_practice exercise2
Mohd Arif Ansari
 
A195259101 22750 24_2018_grammars and languages generated by grammars
A195259101 22750 24_2018_grammars and languages generated by grammarsA195259101 22750 24_2018_grammars and languages generated by grammars
A195259101 22750 24_2018_grammars and languages generated by grammars
Mohd Arif Ansari
 

More from Mohd Arif Ansari (6)

A944346117 22750 24_2018_equivalence of dfa and ndfa
A944346117 22750 24_2018_equivalence of dfa and ndfaA944346117 22750 24_2018_equivalence of dfa and ndfa
A944346117 22750 24_2018_equivalence of dfa and ndfa
 
A792697141 22750 24_2018_minimization of fa & regular languages
A792697141 22750 24_2018_minimization of fa & regular languagesA792697141 22750 24_2018_minimization of fa & regular languages
A792697141 22750 24_2018_minimization of fa & regular languages
 
A698111855 22750 26_2018_finite
A698111855 22750 26_2018_finiteA698111855 22750 26_2018_finite
A698111855 22750 26_2018_finite
 
A576893542 22750 24_2018_recursive and recursively enumerable sets
A576893542 22750 24_2018_recursive and recursively enumerable setsA576893542 22750 24_2018_recursive and recursively enumerable sets
A576893542 22750 24_2018_recursive and recursively enumerable sets
 
A496658235 22750 31_2018_practice exercise2
A496658235 22750 31_2018_practice exercise2A496658235 22750 31_2018_practice exercise2
A496658235 22750 31_2018_practice exercise2
 
A195259101 22750 24_2018_grammars and languages generated by grammars
A195259101 22750 24_2018_grammars and languages generated by grammarsA195259101 22750 24_2018_grammars and languages generated by grammars
A195259101 22750 24_2018_grammars and languages generated by grammars
 

Recently uploaded

Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
AmarGB2
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
Vijay Dialani, PhD
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
AhmedHussein950959
 

Recently uploaded (20)

Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 

A890743837 22750 24_2018_comparison of deterministic and non-deterministic version

  • 1. CSE322 Comparison of deterministic and nondeterministic versions & closure properties Lecture #34
  • 2. Union Closure Properties Lemma: Let A1 and A2 be two CF languages, then the union A1∪A2 is context free as well. Proof: Assume that the two grammars are G1=(V1,Σ,R1,S1) and G2=(V2,Σ,R2,S2). Construct a third grammar G3=(V3,Σ,R3,S3) by: V3 = V1 ∪V2 ∪ { S3 } (new start variable) with R3 = R1 ∪ R2 ∪ { S3 → S1 | S2 }. It follows that L(G3) = L(G1) ∪ L(G2).
  • 3. Intersection & Complement? Let again A1 and A2 be two CF languages. One can prove that, in general, the intersection A1 ∩ A2 , and the complement Ā1= Σ* A1 are not context free languages. One proves this with specific counter examples of languages (see homework).