SlideShare uma empresa Scribd logo
1 de 15
Pumping Lemma

Prepared By: Gagan Dhawan
(9996274406)


An example

L = {0n1n: n ≥ 0} is not regular.


We reason by contradiction:

◦ Suppose we have managed to construct a DFA M for L
◦ We argue something must be wrong with this DFA
◦ In particular, M must accept some strings outside L
imaginary DFA for L with n states

x



M

What happens when we run M on input x = 0n+11n+1?
◦ M better accept, because x ∈ L
0

x

0

0

0

M
0
0r1n+1



What happens when we run M on input x = 0n+11n+1?

◦ M better accept, because x ∈ L
◦ But since M has n states, it must revisit at least one of its
states while reading 0n+1
0

x

0

0

0

M
0
0r1n+1



What happens when we run M on input x = 0n+11n+1?

◦ M better accept, because x ∈ L2
◦ But since M has n states, it must revisit at least one of its
states while reading 0n+1
◦ But then the DFA must contain a loop with 0s


Pumping lemma: For every regular language L

There exists a number n such that for every
string z in L, we can write z = u v w where
 |uv| ≤ n
 |v| ≥ 1
 For every i ≥ 0, the string u vi w is in L.

z

…
u

v
…
w
adversary

you

choose n
2 write z = uvw (|uv| ≤ n,|v| ≥ 1)
1

choose z ∈ L
choose i
you win if uviw ∉ L

L = {0n1n: n ≥ 0}
adversary

you

choose n
2 write z = uvw

z = 0n1n
i=2

1

000000000000000111111111111111

u

v

w

0000000000000000000111111111111111

u

v

v

w

uv2w = 0n+k1n ∉ L
LDUP = {0n10n1: n ≥ 0}
adversary

you

choose n
2 write z = uvw

z = 0n10n1
i=2

1

uv2w = 0n+k10n1 ∉ L
000000000000001000000000000001

u

v

w

0000000000000000001000000000000001

u

v

v

w
L1 = {x: x has same number of 0s and 1s}
L2 = {x: x = 0n1m, n > m ≥ 0}
L3 = {x: x has same number of patterns 01 and 10}
L4 = {x: x has same number of patterns 01 and 10}
L5 = {x: x has different number of 0s and 1s}

Σ = {0, 1}
L1 = {x: x has same number of 0s and 1s}
adversary

you

choose n
2 write z = uvw

z = 0n1n
i=2

1

uv2w = 0n+k1n ∉ L3
000000000000000111111111111111

u

v

w

0000000000000000000111111111111111

u

v

v

w
L2 = {x: x = 0m1n, m > n ≥ 0}
adversary

you

choose n
2 write z = uvw

z = 0n+11n
i=0

1

uv0w
000000000000000111111111111111

u

v

w

00000000000111111111111111

u

w

= 0j+l1n+1 ∉ L2
L3 = {x: x has same number of 01s and 11s}
adversary
1

you

choose n
n=1

z = (01)n(11)n
z = 0111 ∉ L4
has too many 11s

What we have in mind:
n=1
n=2
n=3

z = 011
z = 010111
z = 010101111

z = (01)n1n
has n 01s and n 11s
0

1

0

r0

q0

1

s0

1
0

one more 01

r1

0

0

one more 10

1

1

s1

L4 = {x: x has same number of 01s and 10s}
L4 = {x: x has different number of 0s than 1s}
adversary
1

you

choose n

z=?

there is an easier way!
L1 = {x: x has same number of 0s and 1s} = L4
If L4 is regular, then L1 = L4 is also regular
But L1 is not regular, so L4 cannot be regular
L5 = {1p: p is prime}
adversary

you

choose n
2 write z = uvw = 1a1b1c
1

z = 1p: p > n is prime
a
i=?+c
uviw

111111111111111111111111111111

u = 1a

v = 1b

w = 1c

= 1a1ib1c
= 1(a+c)+ib
= 1(a+c)+(a+c)b
= 1(a+c)(b+1)
= 1composite ∉ L5

Mais conteúdo relacionado

Mais procurados

Operating Systems Process Scheduling Algorithms
Operating Systems   Process Scheduling AlgorithmsOperating Systems   Process Scheduling Algorithms
Operating Systems Process Scheduling Algorithmssathish sak
 
Pumping lemma for regular set h1
Pumping lemma for regular set h1Pumping lemma for regular set h1
Pumping lemma for regular set h1Rajendran
 
Basic blocks and control flow graphs
Basic blocks and control flow graphsBasic blocks and control flow graphs
Basic blocks and control flow graphsTilakpoudel2
 
Intro automata theory
Intro automata theory Intro automata theory
Intro automata theory Rajendran
 
Closure properties of context free grammar
Closure properties of context free grammarClosure properties of context free grammar
Closure properties of context free grammarAfshanKhan51
 
NFA or Non deterministic finite automata
NFA or Non deterministic finite automataNFA or Non deterministic finite automata
NFA or Non deterministic finite automatadeepinderbedi
 
NFA Non Deterministic Finite Automata by Mudasir khushik
NFA Non Deterministic Finite Automata by Mudasir khushikNFA Non Deterministic Finite Automata by Mudasir khushik
NFA Non Deterministic Finite Automata by Mudasir khushikMudsaraliKhushik
 
Chomsky classification of Language
Chomsky classification of LanguageChomsky classification of Language
Chomsky classification of LanguageDipankar Boruah
 
1.10. pumping lemma for regular sets
1.10. pumping lemma for regular sets1.10. pumping lemma for regular sets
1.10. pumping lemma for regular setsSampath Kumar S
 
Nondeterministic Finite Automata
Nondeterministic Finite AutomataNondeterministic Finite Automata
Nondeterministic Finite AutomataAdel Al-Ofairi
 
Pumping Lemma and Regular language or not?
Pumping Lemma and Regular language or not?Pumping Lemma and Regular language or not?
Pumping Lemma and Regular language or not?Animesh Chaturvedi
 
Bellman Ford's Algorithm
Bellman Ford's AlgorithmBellman Ford's Algorithm
Bellman Ford's AlgorithmTanmay Baranwal
 

Mais procurados (20)

Operating Systems Process Scheduling Algorithms
Operating Systems   Process Scheduling AlgorithmsOperating Systems   Process Scheduling Algorithms
Operating Systems Process Scheduling Algorithms
 
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
Pumping lemmaPumping lemma
Pumping lemma
 
Basic blocks and control flow graphs
Basic blocks and control flow graphsBasic blocks and control flow graphs
Basic blocks and control flow graphs
 
Intro automata theory
Intro automata theory Intro automata theory
Intro automata theory
 
Closure properties of context free grammar
Closure properties of context free grammarClosure properties of context free grammar
Closure properties of context free grammar
 
Finite Automata
Finite AutomataFinite Automata
Finite Automata
 
NFA or Non deterministic finite automata
NFA or Non deterministic finite automataNFA or Non deterministic finite automata
NFA or Non deterministic finite automata
 
NFA Non Deterministic Finite Automata by Mudasir khushik
NFA Non Deterministic Finite Automata by Mudasir khushikNFA Non Deterministic Finite Automata by Mudasir khushik
NFA Non Deterministic Finite Automata by Mudasir khushik
 
Chomsky classification of Language
Chomsky classification of LanguageChomsky classification of Language
Chomsky classification of Language
 
Fafl notes [2010] (sjbit)
Fafl notes [2010] (sjbit)Fafl notes [2010] (sjbit)
Fafl notes [2010] (sjbit)
 
Predictive parser
Predictive parserPredictive parser
Predictive parser
 
Pumping lemma (1)
Pumping lemma (1)Pumping lemma (1)
Pumping lemma (1)
 
Turing machines
Turing machinesTuring machines
Turing machines
 
Lexical analysis - Compiler Design
Lexical analysis - Compiler DesignLexical analysis - Compiler Design
Lexical analysis - Compiler Design
 
1.10. pumping lemma for regular sets
1.10. pumping lemma for regular sets1.10. pumping lemma for regular sets
1.10. pumping lemma for regular sets
 
Nondeterministic Finite Automata
Nondeterministic Finite AutomataNondeterministic Finite Automata
Nondeterministic Finite Automata
 
Pseudocode
PseudocodePseudocode
Pseudocode
 
Pumping Lemma and Regular language or not?
Pumping Lemma and Regular language or not?Pumping Lemma and Regular language or not?
Pumping Lemma and Regular language or not?
 
Bellman Ford's Algorithm
Bellman Ford's AlgorithmBellman Ford's Algorithm
Bellman Ford's Algorithm
 

Destaque

Pumping Lemma
Pumping LemmaPumping Lemma
Pumping Lemmaeburhan
 
Non regular languages
Non regular languagesNon regular languages
Non regular languageslavishka_anuj
 
Deciability (automata presentation)
Deciability (automata presentation)Deciability (automata presentation)
Deciability (automata presentation)Sagar Kumar
 
Aspect Oriented Programming (İlgiye Yönelik Programlama)
Aspect Oriented Programming (İlgiye Yönelik Programlama)Aspect Oriented Programming (İlgiye Yönelik Programlama)
Aspect Oriented Programming (İlgiye Yönelik Programlama)eburhan
 
Yedekleme Sistemleri (S.Çağlar ONUR)
Yedekleme Sistemleri (S.Çağlar ONUR)Yedekleme Sistemleri (S.Çağlar ONUR)
Yedekleme Sistemleri (S.Çağlar ONUR)eburhan
 
Finite state Transducers and mealy Machine
Finite state Transducers and mealy Machine Finite state Transducers and mealy Machine
Finite state Transducers and mealy Machine Nadeem Qasmi
 
Decidability
DecidabilityDecidability
Decidabilityandrejko
 
Push down automata
Push down automataPush down automata
Push down automataSomya Bagai
 
Turing Machine
Turing MachineTuring Machine
Turing MachineAyAn KhAn
 
Introduction to fa and dfa
Introduction to fa  and dfaIntroduction to fa  and dfa
Introduction to fa and dfadeepinderbedi
 

Destaque (20)

Pumping Lemma
Pumping LemmaPumping Lemma
Pumping Lemma
 
Pumping Lemma
Pumping LemmaPumping Lemma
Pumping Lemma
 
Non regular languages
Non regular languagesNon regular languages
Non regular languages
 
Deciability (automata presentation)
Deciability (automata presentation)Deciability (automata presentation)
Deciability (automata presentation)
 
Aspect Oriented Programming (İlgiye Yönelik Programlama)
Aspect Oriented Programming (İlgiye Yönelik Programlama)Aspect Oriented Programming (İlgiye Yönelik Programlama)
Aspect Oriented Programming (İlgiye Yönelik Programlama)
 
Yedekleme Sistemleri (S.Çağlar ONUR)
Yedekleme Sistemleri (S.Çağlar ONUR)Yedekleme Sistemleri (S.Çağlar ONUR)
Yedekleme Sistemleri (S.Çağlar ONUR)
 
Finite state Transducers and mealy Machine
Finite state Transducers and mealy Machine Finite state Transducers and mealy Machine
Finite state Transducers and mealy Machine
 
Final fa part1
Final fa part1Final fa part1
Final fa part1
 
Kleene's theorem
Kleene's theoremKleene's theorem
Kleene's theorem
 
DFA Minimization
DFA MinimizationDFA Minimization
DFA Minimization
 
Optimization of dfa
Optimization of dfaOptimization of dfa
Optimization of dfa
 
SLIDE KE:5 NFA
SLIDE KE:5 NFASLIDE KE:5 NFA
SLIDE KE:5 NFA
 
Decidability
DecidabilityDecidability
Decidability
 
Properties of cfg
Properties of cfgProperties of cfg
Properties of cfg
 
Finite automata
Finite automataFinite automata
Finite automata
 
Push down automata
Push down automataPush down automata
Push down automata
 
Turing Machine
Turing MachineTuring Machine
Turing Machine
 
Theory of computation Lec3 dfa
Theory of computation Lec3 dfaTheory of computation Lec3 dfa
Theory of computation Lec3 dfa
 
Turing machines
Turing machinesTuring machines
Turing machines
 
Introduction to fa and dfa
Introduction to fa  and dfaIntroduction to fa  and dfa
Introduction to fa and dfa
 

Semelhante a Pumping lemma

F_Autómatas_MIT_2010--------------------
F_Autómatas_MIT_2010--------------------F_Autómatas_MIT_2010--------------------
F_Autómatas_MIT_2010--------------------MIGUELANGEL2672
 
End semexam | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
End semexam | Theory of Computation | Akash Anand | MTH 401A | IIT KanpurEnd semexam | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
End semexam | Theory of Computation | Akash Anand | MTH 401A | IIT KanpurVivekananda Samiti
 
Introduction to limits
Introduction to limitsIntroduction to limits
Introduction to limitsTyler Murphy
 
A. Basic Calculus [15]A1. The function f (x) is de…ned as.docx
A. Basic Calculus [15]A1. The function f (x) is de…ned as.docxA. Basic Calculus [15]A1. The function f (x) is de…ned as.docx
A. Basic Calculus [15]A1. The function f (x) is de…ned as.docxannetnash8266
 
Dynamical systems solved ex
Dynamical systems solved exDynamical systems solved ex
Dynamical systems solved exMaths Tutoring
 
Tail Probabilities for Randomized Program Runtimes via Martingales for Higher...
Tail Probabilities for Randomized Program Runtimes via Martingales for Higher...Tail Probabilities for Randomized Program Runtimes via Martingales for Higher...
Tail Probabilities for Randomized Program Runtimes via Martingales for Higher...Satoshi Kura
 
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
 
LAB #2Escape VelocityGoal Determine the initial veloc.docx
LAB #2Escape VelocityGoal Determine the initial veloc.docxLAB #2Escape VelocityGoal Determine the initial veloc.docx
LAB #2Escape VelocityGoal Determine the initial veloc.docxDIPESH30
 
Interpolation techniques - Background and implementation
Interpolation techniques - Background and implementationInterpolation techniques - Background and implementation
Interpolation techniques - Background and implementationQuasar Chunawala
 
11 ma1aexpandednoteswk3
11 ma1aexpandednoteswk311 ma1aexpandednoteswk3
11 ma1aexpandednoteswk3dinhmyhuyenvi
 
Automata
AutomataAutomata
AutomataGaditek
 
Automata
AutomataAutomata
AutomataGaditek
 

Semelhante a Pumping lemma (20)

11 l06
11 l0611 l06
11 l06
 
11 l06
11 l0611 l06
11 l06
 
F_Autómatas_MIT_2010--------------------
F_Autómatas_MIT_2010--------------------F_Autómatas_MIT_2010--------------------
F_Autómatas_MIT_2010--------------------
 
End semexam | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
End semexam | Theory of Computation | Akash Anand | MTH 401A | IIT KanpurEnd semexam | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
End semexam | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
 
Linear algebra
Linear algebraLinear algebra
Linear algebra
 
Introduction to limits
Introduction to limitsIntroduction to limits
Introduction to limits
 
A. Basic Calculus [15]A1. The function f (x) is de…ned as.docx
A. Basic Calculus [15]A1. The function f (x) is de…ned as.docxA. Basic Calculus [15]A1. The function f (x) is de…ned as.docx
A. Basic Calculus [15]A1. The function f (x) is de…ned as.docx
 
Dynamical systems solved ex
Dynamical systems solved exDynamical systems solved ex
Dynamical systems solved ex
 
Poset
PosetPoset
Poset
 
FLAT.pdf
FLAT.pdfFLAT.pdf
FLAT.pdf
 
Tail Probabilities for Randomized Program Runtimes via Martingales for Higher...
Tail Probabilities for Randomized Program Runtimes via Martingales for Higher...Tail Probabilities for Randomized Program Runtimes via Martingales for Higher...
Tail Probabilities for Randomized Program Runtimes via Martingales for Higher...
 
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...
 
Logical vectors
Logical vectorsLogical vectors
Logical vectors
 
Ch05 1
Ch05 1Ch05 1
Ch05 1
 
LAB #2Escape VelocityGoal Determine the initial veloc.docx
LAB #2Escape VelocityGoal Determine the initial veloc.docxLAB #2Escape VelocityGoal Determine the initial veloc.docx
LAB #2Escape VelocityGoal Determine the initial veloc.docx
 
Interpolation techniques - Background and implementation
Interpolation techniques - Background and implementationInterpolation techniques - Background and implementation
Interpolation techniques - Background and implementation
 
11 ma1aexpandednoteswk3
11 ma1aexpandednoteswk311 ma1aexpandednoteswk3
11 ma1aexpandednoteswk3
 
Automata
AutomataAutomata
Automata
 
Automata
AutomataAutomata
Automata
 
Good
GoodGood
Good
 

Último

ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxPoojaSen20
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinojohnmickonozaleda
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 

Último (20)

ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipino
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 

Pumping lemma

  • 1. Pumping Lemma Prepared By: Gagan Dhawan (9996274406)
  • 2.  An example L = {0n1n: n ≥ 0} is not regular.  We reason by contradiction: ◦ Suppose we have managed to construct a DFA M for L ◦ We argue something must be wrong with this DFA ◦ In particular, M must accept some strings outside L
  • 3. imaginary DFA for L with n states x  M What happens when we run M on input x = 0n+11n+1? ◦ M better accept, because x ∈ L
  • 4. 0 x 0 0 0 M 0 0r1n+1  What happens when we run M on input x = 0n+11n+1? ◦ M better accept, because x ∈ L ◦ But since M has n states, it must revisit at least one of its states while reading 0n+1
  • 5. 0 x 0 0 0 M 0 0r1n+1  What happens when we run M on input x = 0n+11n+1? ◦ M better accept, because x ∈ L2 ◦ But since M has n states, it must revisit at least one of its states while reading 0n+1 ◦ But then the DFA must contain a loop with 0s
  • 6.  Pumping lemma: For every regular language L There exists a number n such that for every string z in L, we can write z = u v w where  |uv| ≤ n  |v| ≥ 1  For every i ≥ 0, the string u vi w is in L. z … u v … w
  • 7. adversary you choose n 2 write z = uvw (|uv| ≤ n,|v| ≥ 1) 1 choose z ∈ L choose i you win if uviw ∉ L L = {0n1n: n ≥ 0} adversary you choose n 2 write z = uvw z = 0n1n i=2 1 000000000000000111111111111111 u v w 0000000000000000000111111111111111 u v v w uv2w = 0n+k1n ∉ L
  • 8. LDUP = {0n10n1: n ≥ 0} adversary you choose n 2 write z = uvw z = 0n10n1 i=2 1 uv2w = 0n+k10n1 ∉ L 000000000000001000000000000001 u v w 0000000000000000001000000000000001 u v v w
  • 9. L1 = {x: x has same number of 0s and 1s} L2 = {x: x = 0n1m, n > m ≥ 0} L3 = {x: x has same number of patterns 01 and 10} L4 = {x: x has same number of patterns 01 and 10} L5 = {x: x has different number of 0s and 1s} Σ = {0, 1}
  • 10. L1 = {x: x has same number of 0s and 1s} adversary you choose n 2 write z = uvw z = 0n1n i=2 1 uv2w = 0n+k1n ∉ L3 000000000000000111111111111111 u v w 0000000000000000000111111111111111 u v v w
  • 11. L2 = {x: x = 0m1n, m > n ≥ 0} adversary you choose n 2 write z = uvw z = 0n+11n i=0 1 uv0w 000000000000000111111111111111 u v w 00000000000111111111111111 u w = 0j+l1n+1 ∉ L2
  • 12. L3 = {x: x has same number of 01s and 11s} adversary 1 you choose n n=1 z = (01)n(11)n z = 0111 ∉ L4 has too many 11s What we have in mind: n=1 n=2 n=3 z = 011 z = 010111 z = 010101111 z = (01)n1n has n 01s and n 11s
  • 13. 0 1 0 r0 q0 1 s0 1 0 one more 01 r1 0 0 one more 10 1 1 s1 L4 = {x: x has same number of 01s and 10s}
  • 14. L4 = {x: x has different number of 0s than 1s} adversary 1 you choose n z=? there is an easier way! L1 = {x: x has same number of 0s and 1s} = L4 If L4 is regular, then L1 = L4 is also regular But L1 is not regular, so L4 cannot be regular
  • 15. L5 = {1p: p is prime} adversary you choose n 2 write z = uvw = 1a1b1c 1 z = 1p: p > n is prime a i=?+c uviw 111111111111111111111111111111 u = 1a v = 1b w = 1c = 1a1ib1c = 1(a+c)+ib = 1(a+c)+(a+c)b = 1(a+c)(b+1) = 1composite ∉ L5