SlideShare a Scribd company logo
Regular Grammar ( Theory of Computation)
A grammar is a 4-tuple G = (V,T,P,S)
 V: set of variables or nonterminals
 T: set of terminal symbols (terminals)
 P: set of productions
 S: a start symbol from V
 V = { S }, T = { 0, 1 }
 Productions:
S  
S  0S1
This grammar
represents strings
such as:
0011
000111
01

 Leftmost derivation: the leftmost variable is
always the one replaced when applying a
production
 Rightmost derivation: rightmost variable is
replaced
 A tree in graph theory is a set of nodes such
that
› There is a special node called the root
› Nodes can have zero or more child nodes
› Nodes without children are called leaves
› Interior nodes: nodes that are not leaves
 A parse tree for a grammar G is a tree such that
the interior nodes are non-terminals in G and
children of a non-terminal correspond to the
body of a production in G
 Yield: concatenation of leaves from left to
right
 If the root of the tree is the start symbol, and
all leaves are terminal symbols, then the
yield is a string in L(G)
 Note: a derivation always corresponds to
some parse tree
 Regular Language – Regular Language are
those languages which are accepted by finite
automaton.
 Regular Expression – Regular Expression
are used to denote Regular Languages.
 Regular Set – Any set that represent the
value of Regular Expression.
 In order to find out a regular expression of a
finite automaton we use Arden's theorem.
 Statement 1 - Let P & Q be two regular
expression.
 Statement 2 – If P doesn’t contain null string,
then R = Q + R P ( has a unique solution)
 i.e. , R= Q P*
 R = Q + R P
R = Q + ( Q + R P ) P
R = Q + Q P + R P 2
R = Q + Q P + ( Q + R P ) P 2
R = Q + Q P + Q P 2 + R P 3
R = Q ( Ф + P + P 2 + _ _ _ ) + R P n+ 1
R = Q ( P * ) + R P n + 1
R = Q P * + R P n + 1
 Union of two regular language are always be regular.
 Intersection of two regular language are always be
regular.
 Complement of two regular language are always be
regular.
 Difference of two regular language are always be
regular.
 Kleen closure operation over a regular language
always be a regular.
 Concatenation of two regular language are
always be regular.
 Reverse of two regular language are always
be regular.
 Pumping Lemma is used as a proof for
irregularity of a language. Thus, if a
language is regular, it always satisfies
pumping lemma. If there exists at least one
string made from pumping which is not in L,
then L is surely not regular.
 The opposite of this may not always be true.
That is, if Pumping Lemma holds, it does not
mean that the language is regular.
 It always consist of three variables i.e., x, y,
I, z.
 Where, X can be null or can hold value
 y can not be null and has a value in it.
 I is the power upon y which increment by
step .
 Z can be null or can hold value .
 x y z
Ф aa Ф
wxyiz i>0
Ф(aa)iФ = (aa)I
aaФL i=1
aaaФL i=2
Regular Grammar

More Related Content

What's hot

Chomsky classification of Language
Chomsky classification of LanguageChomsky classification of Language
Chomsky classification of Language
Dipankar Boruah
 
Python Flow Control
Python Flow ControlPython Flow Control
Python Flow Control
Kamal Acharya
 
Decision properties of reular languages
Decision properties of reular languagesDecision properties of reular languages
Decision properties of reular languages
SOMNATHMORE2
 
02 order of growth
02 order of growth02 order of growth
02 order of growth
Hira Gul
 
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
Sampath Kumar S
 
Code generation
Code generationCode generation
Code generation
Aparna Nayak
 
Breadth First Search & Depth First Search
Breadth First Search & Depth First SearchBreadth First Search & Depth First Search
Breadth First Search & Depth First Search
Kevin Jadiya
 
NP completeness
NP completenessNP completeness
NP completeness
Amrinder Arora
 
Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)
swapnac12
 
Time complexity
Time complexityTime complexity
Time complexity
Katang Isip
 
Regular Languages
Regular LanguagesRegular Languages
Regular Languages
parmeet834
 
Types of grammer - TOC
Types of grammer - TOCTypes of grammer - TOC
Types of grammer - TOC
AbhayDhupar
 
Lecture: Automata
Lecture: AutomataLecture: Automata
Lecture: Automata
Marina Santini
 
All pair shortest path
All pair shortest pathAll pair shortest path
All pair shortest path
Arafat Hossan
 
Lexical analysis - Compiler Design
Lexical analysis - Compiler DesignLexical analysis - Compiler Design
Lexical analysis - Compiler Design
Muhammed Afsal Villan
 
context free language
context free languagecontext free language
context free language
khush_boo31
 
6-Python-Recursion PPT.pptx
6-Python-Recursion PPT.pptx6-Python-Recursion PPT.pptx
6-Python-Recursion PPT.pptx
Venkateswara Babu Ravipati
 
Pumping lemma Theory Of Automata
Pumping lemma Theory Of AutomataPumping lemma Theory Of Automata
Pumping lemma Theory Of Automata
hafizhamza0322
 
Applications of Mealy & Moore Machine
Applications of  Mealy  & Moore Machine Applications of  Mealy  & Moore Machine
Applications of Mealy & Moore Machine
SardarKashifKhan
 
SINGLE-SOURCE SHORTEST PATHS
SINGLE-SOURCE SHORTEST PATHS SINGLE-SOURCE SHORTEST PATHS
SINGLE-SOURCE SHORTEST PATHS
Md. Shafiuzzaman Hira
 

What's hot (20)

Chomsky classification of Language
Chomsky classification of LanguageChomsky classification of Language
Chomsky classification of Language
 
Python Flow Control
Python Flow ControlPython Flow Control
Python Flow Control
 
Decision properties of reular languages
Decision properties of reular languagesDecision properties of reular languages
Decision properties of reular languages
 
02 order of growth
02 order of growth02 order of growth
02 order of growth
 
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
 
Code generation
Code generationCode generation
Code generation
 
Breadth First Search & Depth First Search
Breadth First Search & Depth First SearchBreadth First Search & Depth First Search
Breadth First Search & Depth First Search
 
NP completeness
NP completenessNP completeness
NP completeness
 
Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)
 
Time complexity
Time complexityTime complexity
Time complexity
 
Regular Languages
Regular LanguagesRegular Languages
Regular Languages
 
Types of grammer - TOC
Types of grammer - TOCTypes of grammer - TOC
Types of grammer - TOC
 
Lecture: Automata
Lecture: AutomataLecture: Automata
Lecture: Automata
 
All pair shortest path
All pair shortest pathAll pair shortest path
All pair shortest path
 
Lexical analysis - Compiler Design
Lexical analysis - Compiler DesignLexical analysis - Compiler Design
Lexical analysis - Compiler Design
 
context free language
context free languagecontext free language
context free language
 
6-Python-Recursion PPT.pptx
6-Python-Recursion PPT.pptx6-Python-Recursion PPT.pptx
6-Python-Recursion PPT.pptx
 
Pumping lemma Theory Of Automata
Pumping lemma Theory Of AutomataPumping lemma Theory Of Automata
Pumping lemma Theory Of Automata
 
Applications of Mealy & Moore Machine
Applications of  Mealy  & Moore Machine Applications of  Mealy  & Moore Machine
Applications of Mealy & Moore Machine
 
SINGLE-SOURCE SHORTEST PATHS
SINGLE-SOURCE SHORTEST PATHS SINGLE-SOURCE SHORTEST PATHS
SINGLE-SOURCE SHORTEST PATHS
 

Similar to Regular Grammar

hghghghhghghgggggggggggggggggggggggggggggggggg
hghghghhghghgggggggggggggggggggggggggggggggggghghghghhghghgggggggggggggggggggggggggggggggggg
hghghghhghghgggggggggggggggggggggggggggggggggg
adugnanegero
 
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
Ryoma Sin'ya
 
Formal Languages and Automata Theory unit 2
Formal Languages and Automata Theory unit 2Formal Languages and Automata Theory unit 2
Formal Languages and Automata Theory unit 2
Srimatre K
 
Ch2 automata.pptx
Ch2 automata.pptxCh2 automata.pptx
Ch2 automata.pptx
TemesgenAzezew
 
Logic (PROPOSITIONS)
Logic (PROPOSITIONS)Logic (PROPOSITIONS)
Logic (PROPOSITIONS)
D Nayanathara
 
Thoery of Computaion and Chomsky's Classification
Thoery of Computaion and Chomsky's ClassificationThoery of Computaion and Chomsky's Classification
Thoery of Computaion and Chomsky's Classification
PrafullMisra
 
Unit ii
Unit iiUnit ii
Unit ii
TPLatchoumi
 
dms.pptx
dms.pptxdms.pptx
dms.pptx
YagnaPriya11
 
Flat unit 2
Flat unit 2Flat unit 2
Flat unit 2
VenkataRaoS1
 
L3 cfg
L3 cfgL3 cfg
Prove that is L is regular and h is a homomorphism, then h(L) is.pdf
Prove that is L is regular and h is a homomorphism, then h(L) is.pdfProve that is L is regular and h is a homomorphism, then h(L) is.pdf
Prove that is L is regular and h is a homomorphism, then h(L) is.pdf
amitbagga0808
 
Unit2 Toc.pptx
Unit2 Toc.pptxUnit2 Toc.pptx
Unit2 Toc.pptx
viswanath kani
 
Regular expressions
Regular expressionsRegular expressions
Regular expressions
AtharvaSolanki2
 
Tree Based Regular Languages
Tree Based Regular LanguagesTree Based Regular Languages
Tree Based Regular Languages
Abhishek Mungoli
 
Maximal Ordered Leftideals in Ordered Ternarysemigroups
Maximal Ordered Leftideals in Ordered TernarysemigroupsMaximal Ordered Leftideals in Ordered Ternarysemigroups
Maximal Ordered Leftideals in Ordered Ternarysemigroups
irjes
 
Theory of Computation - Lectures 4 and 5
Theory of Computation - Lectures 4 and 5Theory of Computation - Lectures 4 and 5
Theory of Computation - Lectures 4 and 5
Dr. Maamoun Ahmed
 
rs1.ppt
rs1.pptrs1.ppt
rs1.ppt
ssuser47f7f2
 
re1.ppt
re1.pptre1.ppt
re1.ppt
PEzhumalai
 
Re1 (3)
Re1 (3)Re1 (3)
Re1 (3)
pepe3059
 
re1.ppt
re1.pptre1.ppt

Similar to Regular Grammar (20)

hghghghhghghgggggggggggggggggggggggggggggggggg
hghghghhghghgggggggggggggggggggggggggggggggggghghghghhghghgggggggggggggggggggggggggggggggggg
hghghghhghghgggggggggggggggggggggggggggggggggg
 
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
 
Formal Languages and Automata Theory unit 2
Formal Languages and Automata Theory unit 2Formal Languages and Automata Theory unit 2
Formal Languages and Automata Theory unit 2
 
Ch2 automata.pptx
Ch2 automata.pptxCh2 automata.pptx
Ch2 automata.pptx
 
Logic (PROPOSITIONS)
Logic (PROPOSITIONS)Logic (PROPOSITIONS)
Logic (PROPOSITIONS)
 
Thoery of Computaion and Chomsky's Classification
Thoery of Computaion and Chomsky's ClassificationThoery of Computaion and Chomsky's Classification
Thoery of Computaion and Chomsky's Classification
 
Unit ii
Unit iiUnit ii
Unit ii
 
dms.pptx
dms.pptxdms.pptx
dms.pptx
 
Flat unit 2
Flat unit 2Flat unit 2
Flat unit 2
 
L3 cfg
L3 cfgL3 cfg
L3 cfg
 
Prove that is L is regular and h is a homomorphism, then h(L) is.pdf
Prove that is L is regular and h is a homomorphism, then h(L) is.pdfProve that is L is regular and h is a homomorphism, then h(L) is.pdf
Prove that is L is regular and h is a homomorphism, then h(L) is.pdf
 
Unit2 Toc.pptx
Unit2 Toc.pptxUnit2 Toc.pptx
Unit2 Toc.pptx
 
Regular expressions
Regular expressionsRegular expressions
Regular expressions
 
Tree Based Regular Languages
Tree Based Regular LanguagesTree Based Regular Languages
Tree Based Regular Languages
 
Maximal Ordered Leftideals in Ordered Ternarysemigroups
Maximal Ordered Leftideals in Ordered TernarysemigroupsMaximal Ordered Leftideals in Ordered Ternarysemigroups
Maximal Ordered Leftideals in Ordered Ternarysemigroups
 
Theory of Computation - Lectures 4 and 5
Theory of Computation - Lectures 4 and 5Theory of Computation - Lectures 4 and 5
Theory of Computation - Lectures 4 and 5
 
rs1.ppt
rs1.pptrs1.ppt
rs1.ppt
 
re1.ppt
re1.pptre1.ppt
re1.ppt
 
Re1 (3)
Re1 (3)Re1 (3)
Re1 (3)
 
re1.ppt
re1.pptre1.ppt
re1.ppt
 

More from Ruchika Sinha

Greedy Algorithms WITH Activity Selection Problem.ppt
Greedy Algorithms WITH Activity Selection Problem.pptGreedy Algorithms WITH Activity Selection Problem.ppt
Greedy Algorithms WITH Activity Selection Problem.ppt
Ruchika Sinha
 
Greedy with Task Scheduling Algorithm.ppt
Greedy with Task Scheduling Algorithm.pptGreedy with Task Scheduling Algorithm.ppt
Greedy with Task Scheduling Algorithm.ppt
Ruchika Sinha
 
Greedy Algorithms Huffman Coding.ppt
Greedy Algorithms  Huffman Coding.pptGreedy Algorithms  Huffman Coding.ppt
Greedy Algorithms Huffman Coding.ppt
Ruchika Sinha
 
DynProg_Knapsack.ppt
DynProg_Knapsack.pptDynProg_Knapsack.ppt
DynProg_Knapsack.ppt
Ruchika Sinha
 
Dijkstra.ppt
Dijkstra.pptDijkstra.ppt
Dijkstra.ppt
Ruchika Sinha
 
Greedy with Task Scheduling Algorithm.ppt
Greedy with Task Scheduling Algorithm.pptGreedy with Task Scheduling Algorithm.ppt
Greedy with Task Scheduling Algorithm.ppt
Ruchika Sinha
 
Clipping
ClippingClipping
Clipping
Ruchika Sinha
 
Lec22 intel
Lec22 intelLec22 intel
Lec22 intel
Ruchika Sinha
 
Pc assembly
Pc assemblyPc assembly
Pc assembly
Ruchika Sinha
 
Casing
CasingCasing
Installation of motherboard
Installation of motherboardInstallation of motherboard
Installation of motherboard
Ruchika Sinha
 
Shortest path
Shortest pathShortest path
Shortest path
Ruchika Sinha
 
Bellman ford algorithm
Bellman ford algorithmBellman ford algorithm
Bellman ford algorithm
Ruchika Sinha
 
Python material
Python materialPython material
Python material
Ruchika Sinha
 
Python3
Python3Python3
Python3
Ruchika Sinha
 
Optimization problems
Optimization problemsOptimization problems
Optimization problems
Ruchika Sinha
 
Software Teting
Software TetingSoftware Teting
Software Teting
Ruchika Sinha
 
Backtrack search-algorithm
Backtrack search-algorithmBacktrack search-algorithm
Backtrack search-algorithm
Ruchika Sinha
 
XML
XMLXML
Software for encrypting and decrypting text file powerpointpresentation
Software for encrypting and decrypting text file powerpointpresentationSoftware for encrypting and decrypting text file powerpointpresentation
Software for encrypting and decrypting text file powerpointpresentation
Ruchika Sinha
 

More from Ruchika Sinha (20)

Greedy Algorithms WITH Activity Selection Problem.ppt
Greedy Algorithms WITH Activity Selection Problem.pptGreedy Algorithms WITH Activity Selection Problem.ppt
Greedy Algorithms WITH Activity Selection Problem.ppt
 
Greedy with Task Scheduling Algorithm.ppt
Greedy with Task Scheduling Algorithm.pptGreedy with Task Scheduling Algorithm.ppt
Greedy with Task Scheduling Algorithm.ppt
 
Greedy Algorithms Huffman Coding.ppt
Greedy Algorithms  Huffman Coding.pptGreedy Algorithms  Huffman Coding.ppt
Greedy Algorithms Huffman Coding.ppt
 
DynProg_Knapsack.ppt
DynProg_Knapsack.pptDynProg_Knapsack.ppt
DynProg_Knapsack.ppt
 
Dijkstra.ppt
Dijkstra.pptDijkstra.ppt
Dijkstra.ppt
 
Greedy with Task Scheduling Algorithm.ppt
Greedy with Task Scheduling Algorithm.pptGreedy with Task Scheduling Algorithm.ppt
Greedy with Task Scheduling Algorithm.ppt
 
Clipping
ClippingClipping
Clipping
 
Lec22 intel
Lec22 intelLec22 intel
Lec22 intel
 
Pc assembly
Pc assemblyPc assembly
Pc assembly
 
Casing
CasingCasing
Casing
 
Installation of motherboard
Installation of motherboardInstallation of motherboard
Installation of motherboard
 
Shortest path
Shortest pathShortest path
Shortest path
 
Bellman ford algorithm
Bellman ford algorithmBellman ford algorithm
Bellman ford algorithm
 
Python material
Python materialPython material
Python material
 
Python3
Python3Python3
Python3
 
Optimization problems
Optimization problemsOptimization problems
Optimization problems
 
Software Teting
Software TetingSoftware Teting
Software Teting
 
Backtrack search-algorithm
Backtrack search-algorithmBacktrack search-algorithm
Backtrack search-algorithm
 
XML
XMLXML
XML
 
Software for encrypting and decrypting text file powerpointpresentation
Software for encrypting and decrypting text file powerpointpresentationSoftware for encrypting and decrypting text file powerpointpresentation
Software for encrypting and decrypting text file powerpointpresentation
 

Recently uploaded

Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
AmarGB2
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
BrazilAccount1
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
manasideore6
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
Runway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptxRunway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptx
SupreethSP4
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
WENKENLI1
 

Recently uploaded (20)

Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
Runway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptxRunway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptx
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
 

Regular Grammar

  • 1. Regular Grammar ( Theory of Computation)
  • 2. A grammar is a 4-tuple G = (V,T,P,S)  V: set of variables or nonterminals  T: set of terminal symbols (terminals)  P: set of productions  S: a start symbol from V
  • 3.  V = { S }, T = { 0, 1 }  Productions: S   S  0S1 This grammar represents strings such as: 0011 000111 01 
  • 4.  Leftmost derivation: the leftmost variable is always the one replaced when applying a production  Rightmost derivation: rightmost variable is replaced
  • 5.  A tree in graph theory is a set of nodes such that › There is a special node called the root › Nodes can have zero or more child nodes › Nodes without children are called leaves › Interior nodes: nodes that are not leaves  A parse tree for a grammar G is a tree such that the interior nodes are non-terminals in G and children of a non-terminal correspond to the body of a production in G
  • 6.  Yield: concatenation of leaves from left to right  If the root of the tree is the start symbol, and all leaves are terminal symbols, then the yield is a string in L(G)  Note: a derivation always corresponds to some parse tree
  • 7.  Regular Language – Regular Language are those languages which are accepted by finite automaton.  Regular Expression – Regular Expression are used to denote Regular Languages.  Regular Set – Any set that represent the value of Regular Expression.
  • 8.  In order to find out a regular expression of a finite automaton we use Arden's theorem.  Statement 1 - Let P & Q be two regular expression.  Statement 2 – If P doesn’t contain null string, then R = Q + R P ( has a unique solution)  i.e. , R= Q P*
  • 9.  R = Q + R P R = Q + ( Q + R P ) P R = Q + Q P + R P 2 R = Q + Q P + ( Q + R P ) P 2 R = Q + Q P + Q P 2 + R P 3 R = Q ( Ф + P + P 2 + _ _ _ ) + R P n+ 1 R = Q ( P * ) + R P n + 1 R = Q P * + R P n + 1
  • 10.  Union of two regular language are always be regular.  Intersection of two regular language are always be regular.  Complement of two regular language are always be regular.  Difference of two regular language are always be regular.  Kleen closure operation over a regular language always be a regular.
  • 11.  Concatenation of two regular language are always be regular.  Reverse of two regular language are always be regular.
  • 12.  Pumping Lemma is used as a proof for irregularity of a language. Thus, if a language is regular, it always satisfies pumping lemma. If there exists at least one string made from pumping which is not in L, then L is surely not regular.
  • 13.  The opposite of this may not always be true. That is, if Pumping Lemma holds, it does not mean that the language is regular.
  • 14.  It always consist of three variables i.e., x, y, I, z.  Where, X can be null or can hold value  y can not be null and has a value in it.  I is the power upon y which increment by step .  Z can be null or can hold value .
  • 15.  x y z Ф aa Ф wxyiz i>0 Ф(aa)iФ = (aa)I aaФL i=1 aaaФL i=2