{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Chapter2Section3_F11

# Chapter2Section3_F11 - 91.304 Foundations of(Theoretical...

This preview shows pages 1–9. Sign up to view the full content.

91.304 Foundations of (Th ti l) C t S i (Theoretical) Computer Science Chapter 2 Lecture Notes (Section 2.3: Non-Context-Free Languages) David Martin [email protected] uml edu [email protected] With some modifications by Prof. Karen Daniels, Fall 2011 This work is licensed under the Creative Commons Attribution-ShareAlike License. To view a copy of this license, visit http://creativecommons.org/licenses/by- 1 sa/2.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Picture so far ALL B = { 0 n 1 n | n 0 } CFL REG RPP 0 * (101)* FIN { 0101, ε } 0 (101) Each point is a language in this Venn diagram Does this exist? 2
Strategy for finding a non-CFL J t d d l Just as we produced non-regular languages with the assistance of RPP, we'll produce non context free we ll produce non-context-free languages with the assistance of the context-free pumping property context free pumping property First we show that CFL CFPP And then show that a particular language L is not in CFPP Hence L can not be in CFL either 3

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
The Context-Free Pumping Property, CFPP D fi iti L i b f CFPP if Definition L is a member of CFPP if There exists p 0 such that Fo e e s L satisf ing |s| p For every s L satisfying |s| p, There exist u,v , x,y,z Σ * such that 1 s= uv xyz 1. 2. | v y|>0 3. | v xy| p 4 F ll i 0 bold, red text shows differences from RPP 4. For all i 0, u v i x y i z L 4
The non -CFPP R h i L i t i CFPP if Rephrasing L is not in CFPP if For every p 0 The e e ists some s L satisf ing |s| p There exists some s L satisfying |s| such that For every u v x y z Σ * satisfying 1-3: u,v, x,y,z satisfying 1 3: 1. s= uv xyz, 2. | v y|>0, and 3. | v xy| p There exists some i 0 for which u v i x y i z L 5

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Game theory formulation The direct (non contradiction) proof The direct (non-contradiction) proof of non-context-freeness can be formulated as a two-player game formulated as a two player game You are the player who wants to establish that L is not CF-pumpable Your opponent wants to make it difficult for you to succeed Both of you have to play by the rules Same setup as with regular pumping (RPP) 6
Game theory continued Th h j t f t The game has just four steps. 1. Your opponent picks p 0 2 Y i k L h th t | | 2. You pick s L such that |s| p 3. Your opponent chooses u,v,x,y,z Σ * such that s=uvxyz, |vy|>0, and |vxy| p d h h 4. You produce some i 0 such that uv i xy i z L 7

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Game theory continued If you are able to succeed through step 4 If you are able to succeed through step 4, then you have won only one round of the game
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 23

Chapter2Section3_F11 - 91.304 Foundations of(Theoretical...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online