SlideShare ist ein Scribd-Unternehmen logo
1 von 11
Downloaden Sie, um offline zu lesen
Automata Theory and Logic
Pumping Lemma for Regular Language
A TUTORIAL
BY
ANIMESH CHATURVEDI
AT
INDIAN INSTITUTE OF TECHNOLOGY INDORE (IIT-I)
Pumping Lemma
If L is finite language then it is definitely regular.
L is regular if strings x, y and z such that |xy| ≤ p, |y| ≥ 1 and xyiz is in L for every integer i ≥ 0
If L is regular then a pumping lemma will exist for L.
If pumping lemma for L then L is regular. (ab)n where n > 0
If L is non-regular then there may be pumping lemma. (ab)n U ap where p is prime number
Regular language consist of pattern that keep on repeating.
x
z
y
Language Regular or not?
an / n >= 1
an bm / n, m >= 1
anbn / n <= 1010
an bn / n >= 1
wwR / |w| = 2
wwR / |w| >= 1
anbmck / n, m, k >= 1
aib2j / i, j >= 1
aib4j / i, j >= 1
Regular or not?
Language Regular or not?
an / n >= 1 Two state DFA exist.
an bm / n, m >= 1 Three state DFA exist.
anbn / n <= 1010
Regular because it is finite
an bn / n >= 1 Not regular because this requires memory to store the number of ‘a’ for same number of ‘b’.
wwR / |w| = 2 Regular because language is finite and bounded
wwR / |w| >= 1 Not Regular because language is infinite and need to store w for writing its reverse as wR
anbmck / n, m, k >= 1 Regular expression aa*bb*cc*
aib2j / i, j >= 1 Regular expression aa*(bb)(bb)*
aib4j / i, j >= 1 Regular expression aa*(bbbb)(bbbb)*
Regular or not?
Language Regular or not?
an / n is even
an / n is odd
an / n is prime
an / n=m2 and m >= 1
an / n=2m and m >= 1
Regular has Arithmetic progress
Language Regular or not?
an / n is even {a0, a2, a4, a6 …} string length is 0, 2, 4, 6 … which forms AP with difference 2. Hence Regular
an / n is odd {a1, a3, a5, a7 …}string length is 1, 3, 5, 7 … forms AP with difference 2. Hence Regular
an / n is prime Not regular because string length is not in AP.
an / n=m2 and m >= 1 {a1, a4, a9, a16, a25 …} Not regular because string length is not in AP.
an / n=2m and m >= 1 {a2, a4, a8, a16, a32 …} Not regular because string length is not in AP.
Regular has Arithmetic progress
Language Regular or not?
anbm / n >= 1, m = j2 where j >= 1
anbm / n >= 1, m = 2j where j >= 1
w / na(w) = nb(w)
w / na(w) <= nb(w)
w / na(w) >= nb(w)
w / na(w) mod 3 >= nb(w) mod 3
wwwR
anbn+mcm / n, m >= 1
Regular or not
Language Regular or not?
anbm / n >= 1, m = j2 where j >= 1 Not Regular because of bm
anbm / n >= 1, m = 2j where j >= 1 Not Regular because of bm
w / na(w) = nb(w) Not Regular because we can’t count and store number of a and b
w / na(w) <= nb(w) Not Regular because we can’t count and store number of a and b
w / na(w) >= nb(w) Not Regular because we can’t count and store number of a and b
w / na(w) mod 3 >= nb(w) mod 3 Regular because it is finite to create states to measure multiple of 3
wwwR Not Regular because storing and reversing both required
anbn+mcm / n, m >= 1 Not Regular because storing and reversing both required
Regular or not?
Language Regular or not?
wwR / w is (0 + 1)+
wxwR / w, x is (0 + 1+
wxwR / w, x is (0 + 1)+ and |x| = 5
xwwRy / w, x, y is (0 + 1)+
xwwR / w, x is (0 + 1)+
wwRy / w, y is (0 + 1)+
Regular or not?
Language Regular or not?
wwR / w is (0 + 1)+
Not Regular because storing and reversing both required
wxwR / w, x is (0 + 1+
Regular because we can re-write it as 0(0+1)*0 + 1(0+1)*1
wxwR / w, x is (0 + 1)+ and |x| = 5 Not Regular because x is of fixed length thus we need storing and reversing
xwwRy / w, x, y is (0 + 1)+ Regular because we can re-write it as (0+1)*00(0+1)* + (0+1)*11(0+1)*
xwwR / w, x is (0 + 1)+ Not Regular because x cannot be expanded here thus we need storing and reversing
wwRy / w, y is (0 + 1)+ Not Regular because y cannot be expanded here thus we need storing and reversing
Regular or not?
Pumping Lemma and Regular language or not?

Weitere ähnliche Inhalte

Was ist angesagt?

5.2 Strong Induction
5.2 Strong Induction5.2 Strong Induction
5.2 Strong Induction
showslidedump
 

Was ist angesagt? (20)

Regular expressions-Theory of computation
Regular expressions-Theory of computationRegular expressions-Theory of computation
Regular expressions-Theory of computation
 
Theory of Automata Lesson 02
Theory of Automata Lesson 02Theory of Automata Lesson 02
Theory of Automata Lesson 02
 
Lecture 1,2
Lecture 1,2Lecture 1,2
Lecture 1,2
 
Pumping lemma
Pumping lemmaPumping lemma
Pumping lemma
 
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
 
Pumping lemma for regular language
Pumping lemma for regular languagePumping lemma for regular language
Pumping lemma for regular language
 
Regular Languages
Regular LanguagesRegular Languages
Regular Languages
 
TOC 4 | Non-deterministic Finite Automata
TOC 4 | Non-deterministic Finite AutomataTOC 4 | Non-deterministic Finite Automata
TOC 4 | Non-deterministic Finite Automata
 
Pumping lemma for regular set h1
Pumping lemma for regular set h1Pumping lemma for regular set h1
Pumping lemma for regular set h1
 
Flat unit 3
Flat unit 3Flat unit 3
Flat unit 3
 
Flat unit 2
Flat unit 2Flat unit 2
Flat unit 2
 
Regular expressions
Regular expressionsRegular expressions
Regular expressions
 
Newton Raphson
Newton RaphsonNewton Raphson
Newton Raphson
 
NFA or Non deterministic finite automata
NFA or Non deterministic finite automataNFA or Non deterministic finite automata
NFA or Non deterministic finite automata
 
5.2 Strong Induction
5.2 Strong Induction5.2 Strong Induction
5.2 Strong Induction
 
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...
 
Theory of automata and formal language
Theory of automata and formal languageTheory of automata and formal language
Theory of automata and formal language
 
Theory of Computation
Theory of ComputationTheory of Computation
Theory of Computation
 
Dynamic programming
Dynamic programmingDynamic programming
Dynamic programming
 
Properties of Regular Expressions
Properties of Regular ExpressionsProperties of Regular Expressions
Properties of Regular Expressions
 

Andere mochten auch

Class6
 Class6 Class6
Class6
issbp
 
Class7
 Class7 Class7
Class7
issbp
 
Context free grammars
Context free grammarsContext free grammars
Context free grammars
Ronak Thakkar
 
Class8
 Class8 Class8
Class8
issbp
 

Andere mochten auch (20)

Push Down Automata (PDA)
Push Down Automata (PDA)Push Down Automata (PDA)
Push Down Automata (PDA)
 
Class6
 Class6 Class6
Class6
 
Class7
 Class7 Class7
Class7
 
Automated Web Service Change Management (AWSCM) A tool published at IEEE Clou...
Automated Web Service Change Management (AWSCM) A tool published at IEEE Clou...Automated Web Service Change Management (AWSCM) A tool published at IEEE Clou...
Automated Web Service Change Management (AWSCM) A tool published at IEEE Clou...
 
Pattern detection in mealy machine
Pattern detection in mealy machinePattern detection in mealy machine
Pattern detection in mealy machine
 
Fundamental question and answer in cloud computing quiz by animesh chaturvedi
Fundamental question and answer in cloud computing quiz by animesh chaturvediFundamental question and answer in cloud computing quiz by animesh chaturvedi
Fundamental question and answer in cloud computing quiz by animesh chaturvedi
 
Context free langauges
Context free langaugesContext free langauges
Context free langauges
 
Deterministic Finite Automata (DFA)
Deterministic Finite Automata (DFA)Deterministic Finite Automata (DFA)
Deterministic Finite Automata (DFA)
 
Context free grammars
Context free grammarsContext free grammars
Context free grammars
 
Minimizing DFA
Minimizing DFAMinimizing DFA
Minimizing DFA
 
NFA to DFA
NFA to DFANFA to DFA
NFA to DFA
 
Regular language and Regular expression
Regular language and Regular expressionRegular language and Regular expression
Regular language and Regular expression
 
Context free grammars
Context free grammarsContext free grammars
Context free grammars
 
Lecture: Context-Free Grammars
Lecture: Context-Free GrammarsLecture: Context-Free Grammars
Lecture: Context-Free Grammars
 
Cloud Computing Architecture
Cloud Computing ArchitectureCloud Computing Architecture
Cloud Computing Architecture
 
Introduction to Cloud Computing
Introduction to Cloud ComputingIntroduction to Cloud Computing
Introduction to Cloud Computing
 
Lecture 7: Definite Clause Grammars
Lecture 7: Definite Clause GrammarsLecture 7: Definite Clause Grammars
Lecture 7: Definite Clause Grammars
 
Class8
 Class8 Class8
Class8
 
Simplifies and normal forms - Theory of Computation
Simplifies and normal forms - Theory of ComputationSimplifies and normal forms - Theory of Computation
Simplifies and normal forms - Theory of Computation
 
Os6
Os6Os6
Os6
 

Ähnlich wie Pumping Lemma and Regular language or not?

Finite automata intro
Finite automata introFinite automata intro
Finite automata intro
lavishka_anuj
 

Ähnlich wie Pumping Lemma and Regular language or not? (20)

Finite automata intro
Finite automata introFinite automata intro
Finite automata intro
 
Mod 2_RegularExpressions.pptx
Mod 2_RegularExpressions.pptxMod 2_RegularExpressions.pptx
Mod 2_RegularExpressions.pptx
 
10 Regular VS Non Regular Language.pptx
10 Regular VS Non Regular Language.pptx10 Regular VS Non Regular Language.pptx
10 Regular VS Non Regular Language.pptx
 
Chapter 3 REGULAR EXPRESSION.pdf
Chapter 3 REGULAR EXPRESSION.pdfChapter 3 REGULAR EXPRESSION.pdf
Chapter 3 REGULAR EXPRESSION.pdf
 
Theory of Computation Basic Concepts and Grammar
Theory of Computation Basic Concepts and GrammarTheory of Computation Basic Concepts and Grammar
Theory of Computation Basic Concepts and Grammar
 
Finite automata-for-lexical-analysis
Finite automata-for-lexical-analysisFinite automata-for-lexical-analysis
Finite automata-for-lexical-analysis
 
20 sequences x
20 sequences x20 sequences x
20 sequences x
 
20 sequences x
20 sequences x20 sequences x
20 sequences x
 
A new technique for proving non regularity based on the measure of a language
A new technique for proving non regularity based on the measure of a languageA new technique for proving non regularity based on the measure of a language
A new technique for proving non regularity based on the measure of a language
 
Lda2vec text by the bay 2016 with notes
Lda2vec text by the bay 2016 with notesLda2vec text by the bay 2016 with notes
Lda2vec text by the bay 2016 with notes
 
Regular expression for dfa
Regular expression for dfaRegular expression for dfa
Regular expression for dfa
 
Regular expression for dfa
Regular expression for dfaRegular expression for dfa
Regular expression for dfa
 
pumpexamples.pptx
pumpexamples.pptxpumpexamples.pptx
pumpexamples.pptx
 
09.LearningMaterial_Sample.pdf
09.LearningMaterial_Sample.pdf09.LearningMaterial_Sample.pdf
09.LearningMaterial_Sample.pdf
 
Lex analysis
Lex analysisLex analysis
Lex analysis
 
Theory of Computation.pptx
Theory of Computation.pptxTheory of Computation.pptx
Theory of Computation.pptx
 
Automata
AutomataAutomata
Automata
 
Automata
AutomataAutomata
Automata
 
language , grammar and automata
language , grammar and automatalanguage , grammar and automata
language , grammar and automata
 
Theory of Computation Regular Expressions, Minimisation & Pumping Lemma
Theory of Computation Regular Expressions, Minimisation & Pumping LemmaTheory of Computation Regular Expressions, Minimisation & Pumping Lemma
Theory of Computation Regular Expressions, Minimisation & Pumping Lemma
 

Mehr von Animesh Chaturvedi

Mehr von Animesh Chaturvedi (19)

Cloud Platforms & Frameworks
Cloud Platforms & FrameworksCloud Platforms & Frameworks
Cloud Platforms & Frameworks
 
Cloud platforms and frameworks
Cloud platforms and frameworksCloud platforms and frameworks
Cloud platforms and frameworks
 
Cloud service lifecycle management
Cloud service lifecycle managementCloud service lifecycle management
Cloud service lifecycle management
 
Graph Analytics and Complexity Questions and answers
Graph Analytics and Complexity Questions and answersGraph Analytics and Complexity Questions and answers
Graph Analytics and Complexity Questions and answers
 
Advance Systems Engineering Topics
Advance Systems Engineering TopicsAdvance Systems Engineering Topics
Advance Systems Engineering Topics
 
P, NP, NP-Complete, and NP-Hard
P, NP, NP-Complete, and NP-HardP, NP, NP-Complete, and NP-Hard
P, NP, NP-Complete, and NP-Hard
 
System Development Life Cycle (SDLC)
System Development Life Cycle (SDLC)System Development Life Cycle (SDLC)
System Development Life Cycle (SDLC)
 
Shortest path, Bellman-Ford's algorithm, Dijkastra's algorithm, their Java co...
Shortest path, Bellman-Ford's algorithm, Dijkastra's algorithm, their Java co...Shortest path, Bellman-Ford's algorithm, Dijkastra's algorithm, their Java co...
Shortest path, Bellman-Ford's algorithm, Dijkastra's algorithm, their Java co...
 
Minimum Spanning Tree (MST), Kruskal's algorithm and Prim's Algorithm, and th...
Minimum Spanning Tree (MST), Kruskal's algorithm and Prim's Algorithm, and th...Minimum Spanning Tree (MST), Kruskal's algorithm and Prim's Algorithm, and th...
Minimum Spanning Tree (MST), Kruskal's algorithm and Prim's Algorithm, and th...
 
C- Programming Assignment practice set 2 solutions
C- Programming Assignment practice set 2 solutionsC- Programming Assignment practice set 2 solutions
C- Programming Assignment practice set 2 solutions
 
C- Programming Assignment 4 solution
C- Programming Assignment 4 solutionC- Programming Assignment 4 solution
C- Programming Assignment 4 solution
 
C- Programming Assignment 3
C- Programming Assignment 3C- Programming Assignment 3
C- Programming Assignment 3
 
C - Programming Assignment 1 and 2
C - Programming Assignment 1 and 2C - Programming Assignment 1 and 2
C - Programming Assignment 1 and 2
 
System requirements engineering
System requirements engineeringSystem requirements engineering
System requirements engineering
 
Informatics systems
Informatics systemsInformatics systems
Informatics systems
 
Introduction to Systems Engineering
Introduction to Systems EngineeringIntroduction to Systems Engineering
Introduction to Systems Engineering
 
Big Data Analytics and Ubiquitous computing
Big Data Analytics and Ubiquitous computingBig Data Analytics and Ubiquitous computing
Big Data Analytics and Ubiquitous computing
 
Cloud Platforms and Frameworks
Cloud Platforms and FrameworksCloud Platforms and Frameworks
Cloud Platforms and Frameworks
 
Cloud Service Life-cycle Management
Cloud Service Life-cycle ManagementCloud Service Life-cycle Management
Cloud Service Life-cycle Management
 

Kürzlich hochgeladen

VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
MsecMca
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
Epec Engineered Technologies
 

Kürzlich hochgeladen (20)

COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdf
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 

Pumping Lemma and Regular language or not?

  • 1. Automata Theory and Logic Pumping Lemma for Regular Language A TUTORIAL BY ANIMESH CHATURVEDI AT INDIAN INSTITUTE OF TECHNOLOGY INDORE (IIT-I)
  • 2. Pumping Lemma If L is finite language then it is definitely regular. L is regular if strings x, y and z such that |xy| ≤ p, |y| ≥ 1 and xyiz is in L for every integer i ≥ 0 If L is regular then a pumping lemma will exist for L. If pumping lemma for L then L is regular. (ab)n where n > 0 If L is non-regular then there may be pumping lemma. (ab)n U ap where p is prime number Regular language consist of pattern that keep on repeating. x z y
  • 3. Language Regular or not? an / n >= 1 an bm / n, m >= 1 anbn / n <= 1010 an bn / n >= 1 wwR / |w| = 2 wwR / |w| >= 1 anbmck / n, m, k >= 1 aib2j / i, j >= 1 aib4j / i, j >= 1 Regular or not?
  • 4. Language Regular or not? an / n >= 1 Two state DFA exist. an bm / n, m >= 1 Three state DFA exist. anbn / n <= 1010 Regular because it is finite an bn / n >= 1 Not regular because this requires memory to store the number of ‘a’ for same number of ‘b’. wwR / |w| = 2 Regular because language is finite and bounded wwR / |w| >= 1 Not Regular because language is infinite and need to store w for writing its reverse as wR anbmck / n, m, k >= 1 Regular expression aa*bb*cc* aib2j / i, j >= 1 Regular expression aa*(bb)(bb)* aib4j / i, j >= 1 Regular expression aa*(bbbb)(bbbb)* Regular or not?
  • 5. Language Regular or not? an / n is even an / n is odd an / n is prime an / n=m2 and m >= 1 an / n=2m and m >= 1 Regular has Arithmetic progress
  • 6. Language Regular or not? an / n is even {a0, a2, a4, a6 …} string length is 0, 2, 4, 6 … which forms AP with difference 2. Hence Regular an / n is odd {a1, a3, a5, a7 …}string length is 1, 3, 5, 7 … forms AP with difference 2. Hence Regular an / n is prime Not regular because string length is not in AP. an / n=m2 and m >= 1 {a1, a4, a9, a16, a25 …} Not regular because string length is not in AP. an / n=2m and m >= 1 {a2, a4, a8, a16, a32 …} Not regular because string length is not in AP. Regular has Arithmetic progress
  • 7. Language Regular or not? anbm / n >= 1, m = j2 where j >= 1 anbm / n >= 1, m = 2j where j >= 1 w / na(w) = nb(w) w / na(w) <= nb(w) w / na(w) >= nb(w) w / na(w) mod 3 >= nb(w) mod 3 wwwR anbn+mcm / n, m >= 1 Regular or not
  • 8. Language Regular or not? anbm / n >= 1, m = j2 where j >= 1 Not Regular because of bm anbm / n >= 1, m = 2j where j >= 1 Not Regular because of bm w / na(w) = nb(w) Not Regular because we can’t count and store number of a and b w / na(w) <= nb(w) Not Regular because we can’t count and store number of a and b w / na(w) >= nb(w) Not Regular because we can’t count and store number of a and b w / na(w) mod 3 >= nb(w) mod 3 Regular because it is finite to create states to measure multiple of 3 wwwR Not Regular because storing and reversing both required anbn+mcm / n, m >= 1 Not Regular because storing and reversing both required Regular or not?
  • 9. Language Regular or not? wwR / w is (0 + 1)+ wxwR / w, x is (0 + 1+ wxwR / w, x is (0 + 1)+ and |x| = 5 xwwRy / w, x, y is (0 + 1)+ xwwR / w, x is (0 + 1)+ wwRy / w, y is (0 + 1)+ Regular or not?
  • 10. Language Regular or not? wwR / w is (0 + 1)+ Not Regular because storing and reversing both required wxwR / w, x is (0 + 1+ Regular because we can re-write it as 0(0+1)*0 + 1(0+1)*1 wxwR / w, x is (0 + 1)+ and |x| = 5 Not Regular because x is of fixed length thus we need storing and reversing xwwRy / w, x, y is (0 + 1)+ Regular because we can re-write it as (0+1)*00(0+1)* + (0+1)*11(0+1)* xwwR / w, x is (0 + 1)+ Not Regular because x cannot be expanded here thus we need storing and reversing wwRy / w, y is (0 + 1)+ Not Regular because y cannot be expanded here thus we need storing and reversing Regular or not?