SlideShare a Scribd company logo
1 of 15
1
Consider a CFG G = (V, Σ, R, S).
Assume for any rule A → w in R, |w| < c for a constant c > 0.
For x in L(G), consider a parse tree T for x.
x
This tree would have at least |x| leaves. Therefore,
the depth of this tree > logc |x|
> logc |x|
s
2
Let |x| > K = c .
|v|+1
Then the depth of parse tree T > |V|+1.
So, there is a path from root to a leaf with length > |V|+1,
That is, it contains at least |V|+1 internal nodes.
x
Thus, there exists a nonterminal symbol, say A
appearing twice.
s
3
A
A
u
v
w
y
z
S
Tree T is decomposed into three smaller trees I, II, III.
I
II
III
Corresponding to this tree decomposition,
x = uvwyz
which has property that for any i > 0
uv wy z L(G).i i
∈
I
III
A
u
w
z
S
w
u
v
v y
y
z
A
A
A
S
4
To make this property significant, we should have
vy ≠ ε .
Choose T to be a parse tree for x with minimum number
of nodes. Then we would have vy ≠ ε.
If vy = ε, then
I
III
A
S
u v
w
is a parse tree for x with less number of node than T.
(-> <-)
5
Pumping Lemma (weak): For any CFL L, there exists a
Constant K > 0 such that any x L with |x| > K can be
Decomposed as x = uvwyz satisfying
(1) vy ≠ ε,
(2) for any i > 0, uv wy z L.
∈
∈
∈
It is similar to the situation od pumping lemma fo
regular languages that this lemma may not easy
to use.
Therefore, we would like to add some condition which
can restrict the location of v and y. The following is such
A condition.
(3) |vwy| < K.
i i
6
A
A
u
v
w
y
z
S
To get condition (3), choose A to be the lowest one
among nonterminal symbols appearing again in the
subpath from which to a leaf.
I
II
III
Therefore subtree II+III has depth < |V|+1. Hence, it
Has at most K=c leaves, i.e., (3) holds.
|V|+1
< |V|+1
7
Pumping Lemma (strong): For any CFL L, there exists a
Constant K > 0 such that any x L with |x| > K can be
Decomposed as x = uvwyz satisfying
(1) vy ≠ ε,
(2) for any i > 0, uv wy z L,
(3) |vwy| < K.
i i
∈
∈
8
Example 1 L={a b c | n > 0} is not CF.
n n n
9
CFL is not closed under intersection!
A = {a b c | m, n > 0}
B = {a b c | m, n > 0}
m m n
m nn
Both A and B are CFL, but
A ∩ B = {a b c | n > 0} is not.
n nn
10
Example 2. L={ww | w (0+1)*} is not CF.∈
11
CFL is not closed under complement!
For L = {ww | w (0+1)*}, L is a CFL.
However, L = L is not.
∈
12
Proof. For contradiction, suppose L is CF. Let K > 0
be the constant in Pumping Lemma. Consider a
prime p > K. Then, 0 = uvwxy such that vx≠ε and
for any i > 0
uv wx y is in L. Thus,
|u| + |w| + |y| + i(|v|+|x|) is a prime
for any I > 0.
13
n
p
i i
For i =0, |u|+|w| + |y| is a prime.
For i =|u|+|w|+|y|, |u|+|w|+|y|+ i(|v|+|x|)
= (|u|+|w|+|y|)(1+|v|+|x|)
is a prime. (-><-)
14
Theorem For a language L with one symbol,
L is CF if and only if L is regular.
15

More Related Content

What's hot

KRUSKAL'S algorithm from chaitra
KRUSKAL'S algorithm from chaitraKRUSKAL'S algorithm from chaitra
KRUSKAL'S algorithm from chaitraguest1f4fb3
 
trapezoidal and simpson's 1/3 and 3/8 rule
trapezoidal and simpson's 1/3 and 3/8 ruletrapezoidal and simpson's 1/3 and 3/8 rule
trapezoidal and simpson's 1/3 and 3/8 rulehitarth shah
 
Parallel lines
Parallel linesParallel lines
Parallel linescandicef
 
Shortest path algorithm
Shortest path algorithmShortest path algorithm
Shortest path algorithmsana younas
 
Presentation on Numerical Integration
Presentation on Numerical IntegrationPresentation on Numerical Integration
Presentation on Numerical IntegrationTausif Shahanshah
 
prim's and kruskal's algorithm
prim's and kruskal's algorithmprim's and kruskal's algorithm
prim's and kruskal's algorithmshreeuva
 
Core 3 Simpsons Rule
Core 3 Simpsons RuleCore 3 Simpsons Rule
Core 3 Simpsons Ruledavidmiles100
 
6161103 3.4 three dimensional force systems
6161103 3.4 three dimensional force systems6161103 3.4 three dimensional force systems
6161103 3.4 three dimensional force systemsetcenterrbru
 
Calculus notes ch 6
Calculus notes ch 6Calculus notes ch 6
Calculus notes ch 6debukks6
 
NUMERICAL INTEGRATION AND ITS APPLICATIONS
NUMERICAL INTEGRATION AND ITS APPLICATIONSNUMERICAL INTEGRATION AND ITS APPLICATIONS
NUMERICAL INTEGRATION AND ITS APPLICATIONSGOWTHAMGOWSIK98
 
Feasible Combinatorial Matrix Theory - MFCS2013
Feasible Combinatorial Matrix Theory - MFCS2013Feasible Combinatorial Matrix Theory - MFCS2013
Feasible Combinatorial Matrix Theory - MFCS2013Michael Soltys
 
Composition Of Functions &amp; Difference Quotient
Composition Of Functions &amp; Difference QuotientComposition Of Functions &amp; Difference Quotient
Composition Of Functions &amp; Difference Quotientcpirie0607
 
The Max Cut Problem
The Max Cut ProblemThe Max Cut Problem
The Max Cut Problemdnatapov
 
Section 1-4 -- Trapezoid Rule
Section 1-4 -- Trapezoid RuleSection 1-4 -- Trapezoid Rule
Section 1-4 -- Trapezoid Rulechrismac47
 
Shortest path problem
Shortest path problemShortest path problem
Shortest path problemIfra Ilyas
 

What's hot (20)

Lesson 3 simpsons rule
Lesson 3 simpsons ruleLesson 3 simpsons rule
Lesson 3 simpsons rule
 
KRUSKAL'S algorithm from chaitra
KRUSKAL'S algorithm from chaitraKRUSKAL'S algorithm from chaitra
KRUSKAL'S algorithm from chaitra
 
Minimum spanning tree
Minimum spanning treeMinimum spanning tree
Minimum spanning tree
 
trapezoidal and simpson's 1/3 and 3/8 rule
trapezoidal and simpson's 1/3 and 3/8 ruletrapezoidal and simpson's 1/3 and 3/8 rule
trapezoidal and simpson's 1/3 and 3/8 rule
 
Parallel lines
Parallel linesParallel lines
Parallel lines
 
Shortest path algorithm
Shortest path algorithmShortest path algorithm
Shortest path algorithm
 
Presentation on Numerical Integration
Presentation on Numerical IntegrationPresentation on Numerical Integration
Presentation on Numerical Integration
 
prim's and kruskal's algorithm
prim's and kruskal's algorithmprim's and kruskal's algorithm
prim's and kruskal's algorithm
 
Core 3 Simpsons Rule
Core 3 Simpsons RuleCore 3 Simpsons Rule
Core 3 Simpsons Rule
 
inverse varition
 inverse varition inverse varition
inverse varition
 
6161103 3.4 three dimensional force systems
6161103 3.4 three dimensional force systems6161103 3.4 three dimensional force systems
6161103 3.4 three dimensional force systems
 
Calculus notes ch 6
Calculus notes ch 6Calculus notes ch 6
Calculus notes ch 6
 
NUMERICAL INTEGRATION AND ITS APPLICATIONS
NUMERICAL INTEGRATION AND ITS APPLICATIONSNUMERICAL INTEGRATION AND ITS APPLICATIONS
NUMERICAL INTEGRATION AND ITS APPLICATIONS
 
Shortest path algorithm
Shortest  path algorithmShortest  path algorithm
Shortest path algorithm
 
Graph Theory: Trees
Graph Theory: TreesGraph Theory: Trees
Graph Theory: Trees
 
Feasible Combinatorial Matrix Theory - MFCS2013
Feasible Combinatorial Matrix Theory - MFCS2013Feasible Combinatorial Matrix Theory - MFCS2013
Feasible Combinatorial Matrix Theory - MFCS2013
 
Composition Of Functions &amp; Difference Quotient
Composition Of Functions &amp; Difference QuotientComposition Of Functions &amp; Difference Quotient
Composition Of Functions &amp; Difference Quotient
 
The Max Cut Problem
The Max Cut ProblemThe Max Cut Problem
The Max Cut Problem
 
Section 1-4 -- Trapezoid Rule
Section 1-4 -- Trapezoid RuleSection 1-4 -- Trapezoid Rule
Section 1-4 -- Trapezoid Rule
 
Shortest path problem
Shortest path problemShortest path problem
Shortest path problem
 

Similar to Pumping lemma for cfg

Top school in ghaziabad
Top school in ghaziabadTop school in ghaziabad
Top school in ghaziabadEdhole.com
 
The Epsilon-Delta Definition of a Limit
The Epsilon-Delta Definition of a LimitThe Epsilon-Delta Definition of a Limit
The Epsilon-Delta Definition of a LimitElizabethMastrangelo1
 
lecture 16
lecture 16lecture 16
lecture 16sajinsc
 
Mid semexam | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
Mid semexam | Theory of Computation | Akash Anand | MTH 401A | IIT KanpurMid semexam | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
Mid semexam | Theory of Computation | Akash Anand | MTH 401A | IIT KanpurVivekananda Samiti
 
Nbhm m. a. and m.sc. scholarship test 2006
Nbhm m. a. and m.sc. scholarship test 2006Nbhm m. a. and m.sc. scholarship test 2006
Nbhm m. a. and m.sc. scholarship test 2006MD Kutubuddin Sardar
 
Lecture 6 limits with infinity
Lecture 6   limits with infinityLecture 6   limits with infinity
Lecture 6 limits with infinitynjit-ronbrown
 
Automata
AutomataAutomata
AutomataGaditek
 
Automata
AutomataAutomata
AutomataGaditek
 
Lecture 6 limits with infinity
Lecture 6   limits with infinityLecture 6   limits with infinity
Lecture 6 limits with infinitynjit-ronbrown
 
ADA - Minimum Spanning Tree Prim Kruskal and Dijkstra
ADA - Minimum Spanning Tree Prim Kruskal and Dijkstra ADA - Minimum Spanning Tree Prim Kruskal and Dijkstra
ADA - Minimum Spanning Tree Prim Kruskal and Dijkstra Sahil Kumar
 
Explaining the Kruskal Tree Theore
Explaining the Kruskal Tree TheoreExplaining the Kruskal Tree Theore
Explaining the Kruskal Tree TheoreMarco Benini
 
Longest common subsequence
Longest common subsequenceLongest common subsequence
Longest common subsequenceKiran K
 
Introduction to the Theory of Computation, Winter 2003 A. Hevia and J. Mao S...
 Introduction to the Theory of Computation, Winter 2003 A. Hevia and J. Mao S... Introduction to the Theory of Computation, Winter 2003 A. Hevia and J. Mao S...
Introduction to the Theory of Computation, Winter 2003 A. Hevia and J. Mao S...parmeet834
 

Similar to Pumping lemma for cfg (20)

Top school in ghaziabad
Top school in ghaziabadTop school in ghaziabad
Top school in ghaziabad
 
The Epsilon-Delta Definition of a Limit
The Epsilon-Delta Definition of a LimitThe Epsilon-Delta Definition of a Limit
The Epsilon-Delta Definition of a Limit
 
Split block domination in graphs
Split block domination in graphsSplit block domination in graphs
Split block domination in graphs
 
lecture 16
lecture 16lecture 16
lecture 16
 
Mid semexam | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
Mid semexam | Theory of Computation | Akash Anand | MTH 401A | IIT KanpurMid semexam | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
Mid semexam | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
 
DIFFERENTIATION
DIFFERENTIATIONDIFFERENTIATION
DIFFERENTIATION
 
Nbhm m. a. and m.sc. scholarship test 2006
Nbhm m. a. and m.sc. scholarship test 2006Nbhm m. a. and m.sc. scholarship test 2006
Nbhm m. a. and m.sc. scholarship test 2006
 
Analysis Solutions CVI
Analysis Solutions CVIAnalysis Solutions CVI
Analysis Solutions CVI
 
Lecture 6 limits with infinity
Lecture 6   limits with infinityLecture 6   limits with infinity
Lecture 6 limits with infinity
 
Automata
AutomataAutomata
Automata
 
Automata
AutomataAutomata
Automata
 
Lecture 6 limits with infinity
Lecture 6   limits with infinityLecture 6   limits with infinity
Lecture 6 limits with infinity
 
ADA - Minimum Spanning Tree Prim Kruskal and Dijkstra
ADA - Minimum Spanning Tree Prim Kruskal and Dijkstra ADA - Minimum Spanning Tree Prim Kruskal and Dijkstra
ADA - Minimum Spanning Tree Prim Kruskal and Dijkstra
 
Networking Assignment Help
Networking Assignment HelpNetworking Assignment Help
Networking Assignment Help
 
Graph
GraphGraph
Graph
 
Graph
GraphGraph
Graph
 
Analysis Solutions CIV
Analysis Solutions CIVAnalysis Solutions CIV
Analysis Solutions CIV
 
Explaining the Kruskal Tree Theore
Explaining the Kruskal Tree TheoreExplaining the Kruskal Tree Theore
Explaining the Kruskal Tree Theore
 
Longest common subsequence
Longest common subsequenceLongest common subsequence
Longest common subsequence
 
Introduction to the Theory of Computation, Winter 2003 A. Hevia and J. Mao S...
 Introduction to the Theory of Computation, Winter 2003 A. Hevia and J. Mao S... Introduction to the Theory of Computation, Winter 2003 A. Hevia and J. Mao S...
Introduction to the Theory of Computation, Winter 2003 A. Hevia and J. Mao S...
 

More from Dr. ABHISHEK K PANDEY (20)

Digital to digital
Digital to digitalDigital to digital
Digital to digital
 
Digital to analog
Digital to analog Digital to analog
Digital to analog
 
Analog to analog
Analog to analogAnalog to analog
Analog to analog
 
Wcdma interface sakshi
Wcdma interface sakshiWcdma interface sakshi
Wcdma interface sakshi
 
Utran architecture(rashmi)
Utran architecture(rashmi)Utran architecture(rashmi)
Utran architecture(rashmi)
 
Umts
UmtsUmts
Umts
 
Osi modal
Osi modalOsi modal
Osi modal
 
Network topologies(chetan)
Network topologies(chetan)Network topologies(chetan)
Network topologies(chetan)
 
Multiplexing II
Multiplexing IIMultiplexing II
Multiplexing II
 
Est umts speech cells
Est umts speech cellsEst umts speech cells
Est umts speech cells
 
Digital to analog piyush sen
Digital to analog piyush senDigital to analog piyush sen
Digital to analog piyush sen
 
Adc
AdcAdc
Adc
 
Reguler grammar cfg
Reguler grammar cfgReguler grammar cfg
Reguler grammar cfg
 
Regular languag regular set
Regular languag regular setRegular languag regular set
Regular languag regular set
 
Regular expression for dfa
Regular expression for dfaRegular expression for dfa
Regular expression for dfa
 
Pumping lemma
Pumping lemmaPumping lemma
Pumping lemma
 
Pumping lemma numerical
Pumping lemma numericalPumping lemma numerical
Pumping lemma numerical
 
Power of authomata
Power of authomataPower of authomata
Power of authomata
 
Pda1
Pda1Pda1
Pda1
 
Pda
PdaPda
Pda
 

Recently uploaded

UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 

Recently uploaded (20)

UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 

Pumping lemma for cfg

  • 1. 1
  • 2. Consider a CFG G = (V, Σ, R, S). Assume for any rule A → w in R, |w| < c for a constant c > 0. For x in L(G), consider a parse tree T for x. x This tree would have at least |x| leaves. Therefore, the depth of this tree > logc |x| > logc |x| s 2
  • 3. Let |x| > K = c . |v|+1 Then the depth of parse tree T > |V|+1. So, there is a path from root to a leaf with length > |V|+1, That is, it contains at least |V|+1 internal nodes. x Thus, there exists a nonterminal symbol, say A appearing twice. s 3
  • 4. A A u v w y z S Tree T is decomposed into three smaller trees I, II, III. I II III Corresponding to this tree decomposition, x = uvwyz which has property that for any i > 0 uv wy z L(G).i i ∈ I III A u w z S w u v v y y z A A A S 4
  • 5. To make this property significant, we should have vy ≠ ε . Choose T to be a parse tree for x with minimum number of nodes. Then we would have vy ≠ ε. If vy = ε, then I III A S u v w is a parse tree for x with less number of node than T. (-> <-) 5
  • 6. Pumping Lemma (weak): For any CFL L, there exists a Constant K > 0 such that any x L with |x| > K can be Decomposed as x = uvwyz satisfying (1) vy ≠ ε, (2) for any i > 0, uv wy z L. ∈ ∈ ∈ It is similar to the situation od pumping lemma fo regular languages that this lemma may not easy to use. Therefore, we would like to add some condition which can restrict the location of v and y. The following is such A condition. (3) |vwy| < K. i i 6
  • 7. A A u v w y z S To get condition (3), choose A to be the lowest one among nonterminal symbols appearing again in the subpath from which to a leaf. I II III Therefore subtree II+III has depth < |V|+1. Hence, it Has at most K=c leaves, i.e., (3) holds. |V|+1 < |V|+1 7
  • 8. Pumping Lemma (strong): For any CFL L, there exists a Constant K > 0 such that any x L with |x| > K can be Decomposed as x = uvwyz satisfying (1) vy ≠ ε, (2) for any i > 0, uv wy z L, (3) |vwy| < K. i i ∈ ∈ 8
  • 9. Example 1 L={a b c | n > 0} is not CF. n n n 9
  • 10. CFL is not closed under intersection! A = {a b c | m, n > 0} B = {a b c | m, n > 0} m m n m nn Both A and B are CFL, but A ∩ B = {a b c | n > 0} is not. n nn 10
  • 11. Example 2. L={ww | w (0+1)*} is not CF.∈ 11
  • 12. CFL is not closed under complement! For L = {ww | w (0+1)*}, L is a CFL. However, L = L is not. ∈ 12
  • 13. Proof. For contradiction, suppose L is CF. Let K > 0 be the constant in Pumping Lemma. Consider a prime p > K. Then, 0 = uvwxy such that vx≠ε and for any i > 0 uv wx y is in L. Thus, |u| + |w| + |y| + i(|v|+|x|) is a prime for any I > 0. 13 n p i i
  • 14. For i =0, |u|+|w| + |y| is a prime. For i =|u|+|w|+|y|, |u|+|w|+|y|+ i(|v|+|x|) = (|u|+|w|+|y|)(1+|v|+|x|) is a prime. (-><-) 14
  • 15. Theorem For a language L with one symbol, L is CF if and only if L is regular. 15