Download presentation
Presentation is loading. Please wait.
Published byAileen Chase Modified over 9 years ago
1
Prof. Busch - LSU1 Properties of Context-Free languages
2
Prof. Busch - LSU2 Context-free languages are closed under: Union is context free is context-free Union
3
Prof. Busch - LSU3 Example Union LanguageGrammar
4
Prof. Busch - LSU4 In general: The grammar of the union has new start variable and additional production For context-free languages with context-free grammars and start variables
5
Prof. Busch - LSU5 Context-free languages are closed under: Concatenation is context free is context-free Concatenation
6
Prof. Busch - LSU6 Example Concatenation LanguageGrammar
7
Prof. Busch - LSU7 In general: The grammar of the concatenation has new start variable and additional production For context-free languages with context-free grammars and start variables
8
Prof. Busch - LSU8 Context-free languages are closed under: Star-operation is context freeis context-free Star Operation
9
Prof. Busch - LSU9 Example Language Grammar Star Operation
10
Prof. Busch - LSU10 In general: The grammar of the star operation has new start variable and additional production For context-free language with context-free grammar and start variable
11
Prof. Busch - LSU11 Negative Properties of Context-Free Languages
12
Prof. Busch - LSU12 Context-free languages are not closed under: intersection is context free not necessarily context-free Intersection
13
Prof. Busch - LSU13 Example Context-free: NOT context-free Intersection
14
Prof. Busch - LSU14 Context-free languages are not closed under: complement is context freenot necessarily context-free Complement
15
Prof. Busch - LSU15 NOT context-free Example Context-free: Complement
16
Prof. Busch - LSU16 Intersection of Context-free languages and Regular Languages
17
Prof. Busch - LSU17 The intersection of a context-free language and a regular language is a context-free language context free regular context-free
18
Prof. Busch - LSU18 for NPDA DFA Construct a new NPDA machine that accepts Machine context-free regular simulates in parallel and
19
Prof. Busch - LSU19 transition NPDADFA transition NPDA
20
Prof. Busch - LSU20 transition NPDADFA transition NPDA
21
Prof. Busch - LSU21 initial state NPDADFA Initial state NPDA
22
Prof. Busch - LSU22 final state final states NPDADFA final states NPDA
23
Prof. Busch - LSU23 Example: NPDA context-free
24
Prof. Busch - LSU24 DFA regular
25
Prof. Busch - LSU25 Automaton for: NPDA context-free
26
Prof. Busch - LSU26 simulates in parallel and accepts stringif and only if accepts string and accepts string In General:
27
Prof. Busch - LSU27 Therefore: is NPDA is context-free
28
Prof. Busch - LSU28 Applications of Regular Closure
29
Prof. Busch - LSU29 The intersection of a context-free language and a regular language is a context-free language context free regular context-free Regular Closure
30
Prof. Busch - LSU30 An Application of Regular Closure Prove that: is context-free
31
Prof. Busch - LSU31 We know: is context-free
32
Prof. Busch - LSU32 is regular We also know:
33
Prof. Busch - LSU33 regularcontext-free is context-free (regular closure)
34
Prof. Busch - LSU34 Another Application of Regular Closure Prove that: is not context-free
35
Prof. Busch - LSU35 context-freeregularcontext-free If is context-free Then Impossible!!! Therefore, is not context free (regular closure)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.