SlideShare a Scribd company logo
1 of 6
Prof.Neeraj Bhargava
Abhishek Kumar
Department of Computer Science
School of Engineering & System Sciences,
MDS, University Ajmer, Rajasthan, India
1
 A grammar express languages with the help of
four tuples:-
(Vn , ∑ , R , S)
• V is a finite set of variables/non-terminals
• Σ is a finite set of terminals
• S ∈ V is the start symbol
• R ⊆ (Σ∪V )∗×(Σ∪V )∗ is a finite set of
rules/productions.
We say γ1 α γ2 ⇒G γ1 β γ2 ,
iff (α → β) ∈ R. And L(G) = {w ∈ Σ∗|S ∗ ⇒G w}
2
Grammar Rules Languages
 Type 3 A → aB or A → a Regular
 Type 2 A → α Context
Free
 Type 1 α → β with |α|≤|β Context
Sensitive
 Type 0 α → β
Recursively
Enumerable
 Figure 2: In the above table, α,β ∈ (Σ∪V )∗,
A,B ∈ V and a ∈ Σ∪{}
3
 Example 2. Consider the grammar G with Σ = {a} with
S → $Ca# | a | ∈ Ca → aaC
$D → $C C# → D# | E a
D → Da aE → Ea
$E → ∈
The following are derivations in this grammar
S ⇒ $Ca# ⇒ $aaC# ⇒ $aaE ⇒ $aEa ⇒ $Eaa ⇒ aa
S ⇒ $Ca# ⇒ $aaC# ⇒ $aaD# ⇒ $aDa# ⇒ $Daa#
⇒ $Caa# ⇒ $aaCa# ⇒ $aaaaC# ⇒ $aaaaE
⇒ $aaaEa ⇒ $aaEaa ⇒ $aEaaa ⇒ $Eaaaa ⇒ aaaa
L(G) = {ai |i is a power of 2}
4
 Example 8. Consider the grammar G with Σ =
{a,b,c}, V = {S,B,C,H} and
S → aSBC | aBC CB → HB
HB → HC HC → BC
aB → ab bB → bb
bC → bc cC → cc
L(G) = {anbncn |n ≥ 0}
5
6

More Related Content

What's hot

The principle of inclusion and exclusion for three sets by sharvari
The principle of inclusion and exclusion for three sets by sharvariThe principle of inclusion and exclusion for three sets by sharvari
The principle of inclusion and exclusion for three sets by sharvariDeogiri College Student
 
Principal of inclusion & exclusion for two sets by vishal maher
Principal of inclusion & exclusion for two sets by vishal maherPrincipal of inclusion & exclusion for two sets by vishal maher
Principal of inclusion & exclusion for two sets by vishal maherDeogiri College Student
 
Mat 222 week 5 composition and inverse (ash)
Mat 222 week 5 composition and inverse (ash)Mat 222 week 5 composition and inverse (ash)
Mat 222 week 5 composition and inverse (ash)jackfruits
 
Aug 27th
Aug 27thAug 27th
Aug 27thcirilah
 
Chapter1.5
Chapter1.5Chapter1.5
Chapter1.5nglaze10
 
Algerba in everyday Life
Algerba in everyday LifeAlgerba in everyday Life
Algerba in everyday LifeGoodwill Khoa
 
Himpunan plpg
Himpunan plpgHimpunan plpg
Himpunan plpgNom Mujib
 
Discrete mathematics presentation
Discrete mathematics presentationDiscrete mathematics presentation
Discrete mathematics presentationMdZiad
 
7.7 Transforming Formulas
7.7 Transforming Formulas7.7 Transforming Formulas
7.7 Transforming FormulasJessca Lundin
 
Maths designed in interactive way examples
Maths designed in interactive way examplesMaths designed in interactive way examples
Maths designed in interactive way examplesSheeba C
 
Rearranging formulas A1
Rearranging formulas A1Rearranging formulas A1
Rearranging formulas A1vhiggins1
 
Unit rate from convenience store
Unit rate from convenience storeUnit rate from convenience store
Unit rate from convenience storeforeverun
 
Number System & Set Theory
Number System & Set TheoryNumber System & Set Theory
Number System & Set TheoryRubel Islam
 

What's hot (17)

Mathematical skills II - Rearranging Equations
Mathematical skills II -  Rearranging EquationsMathematical skills II -  Rearranging Equations
Mathematical skills II - Rearranging Equations
 
Sets
SetsSets
Sets
 
2.3 notes
2.3 notes2.3 notes
2.3 notes
 
The principle of inclusion and exclusion for three sets by sharvari
The principle of inclusion and exclusion for three sets by sharvariThe principle of inclusion and exclusion for three sets by sharvari
The principle of inclusion and exclusion for three sets by sharvari
 
Principal of inclusion & exclusion for two sets by vishal maher
Principal of inclusion & exclusion for two sets by vishal maherPrincipal of inclusion & exclusion for two sets by vishal maher
Principal of inclusion & exclusion for two sets by vishal maher
 
Mat 222 week 5 composition and inverse (ash)
Mat 222 week 5 composition and inverse (ash)Mat 222 week 5 composition and inverse (ash)
Mat 222 week 5 composition and inverse (ash)
 
Aug 27th
Aug 27thAug 27th
Aug 27th
 
Chapter1.5
Chapter1.5Chapter1.5
Chapter1.5
 
Algerba in everyday Life
Algerba in everyday LifeAlgerba in everyday Life
Algerba in everyday Life
 
Himpunan plpg
Himpunan plpgHimpunan plpg
Himpunan plpg
 
02 more on sets
02   more on sets02   more on sets
02 more on sets
 
Discrete mathematics presentation
Discrete mathematics presentationDiscrete mathematics presentation
Discrete mathematics presentation
 
7.7 Transforming Formulas
7.7 Transforming Formulas7.7 Transforming Formulas
7.7 Transforming Formulas
 
Maths designed in interactive way examples
Maths designed in interactive way examplesMaths designed in interactive way examples
Maths designed in interactive way examples
 
Rearranging formulas A1
Rearranging formulas A1Rearranging formulas A1
Rearranging formulas A1
 
Unit rate from convenience store
Unit rate from convenience storeUnit rate from convenience store
Unit rate from convenience store
 
Number System & Set Theory
Number System & Set TheoryNumber System & Set Theory
Number System & Set Theory
 

Similar to Grammar generated by language

IIT JAM Math 2022 Question Paper | Sourav Sir's Classes
IIT JAM Math 2022 Question Paper | Sourav Sir's ClassesIIT JAM Math 2022 Question Paper | Sourav Sir's Classes
IIT JAM Math 2022 Question Paper | Sourav Sir's ClassesSOURAV DAS
 
Toc chapter 1 srg
Toc chapter 1 srgToc chapter 1 srg
Toc chapter 1 srgShayak Giri
 
Unit 1 Set Theory-Engineering Mathematics.pptx
Unit 1 Set Theory-Engineering Mathematics.pptxUnit 1 Set Theory-Engineering Mathematics.pptx
Unit 1 Set Theory-Engineering Mathematics.pptxG2018ChoudhariNikita
 
A Szemeredi-type theorem for subsets of the unit cube
A Szemeredi-type theorem for subsets of the unit cubeA Szemeredi-type theorem for subsets of the unit cube
A Szemeredi-type theorem for subsets of the unit cubeVjekoslavKovac1
 
Edicoes asa 12 ano 2020-21 - 3 teste
Edicoes asa   12 ano 2020-21 - 3 testeEdicoes asa   12 ano 2020-21 - 3 teste
Edicoes asa 12 ano 2020-21 - 3 testeMARIA CRUZ
 
Testing Forest-Isomorphism in the Adjacency List Model
Testing Forest-Isomorphismin the Adjacency List ModelTesting Forest-Isomorphismin the Adjacency List Model
Testing Forest-Isomorphism in the Adjacency List Modelirrrrr
 
Final maths presentation on sets
Final maths presentation on setsFinal maths presentation on sets
Final maths presentation on setsRahul Avicii
 
SETS - Vedantu.pdf
SETS - Vedantu.pdfSETS - Vedantu.pdf
SETS - Vedantu.pdfAneeshRenu
 
Lesson2_MathematicalLanguageAndSymbols _Lesson 2.1_VariablesAndTheLanguageOfS...
Lesson2_MathematicalLanguageAndSymbols _Lesson 2.1_VariablesAndTheLanguageOfS...Lesson2_MathematicalLanguageAndSymbols _Lesson 2.1_VariablesAndTheLanguageOfS...
Lesson2_MathematicalLanguageAndSymbols _Lesson 2.1_VariablesAndTheLanguageOfS...LouelaDePaz
 
P2-Chp3-SequencesAndSeries from pure maths 2.pptx
P2-Chp3-SequencesAndSeries from pure maths 2.pptxP2-Chp3-SequencesAndSeries from pure maths 2.pptx
P2-Chp3-SequencesAndSeries from pure maths 2.pptxArafathAliMathsTeach
 
DISCRETE LOGARITHM PROBLEM
DISCRETE LOGARITHM PROBLEMDISCRETE LOGARITHM PROBLEM
DISCRETE LOGARITHM PROBLEMMANISH KUMAR
 
Cs6660 compiler design november december 2016 Answer key
Cs6660 compiler design november december 2016 Answer keyCs6660 compiler design november december 2016 Answer key
Cs6660 compiler design november december 2016 Answer keyappasami
 
Mathematics JEE quick revision notes pdf
Mathematics JEE quick revision notes pdfMathematics JEE quick revision notes pdf
Mathematics JEE quick revision notes pdfgowhiksankar54
 
Introduction to set theory
Introduction to set theoryIntroduction to set theory
Introduction to set theoryNittaya Noinan
 

Similar to Grammar generated by language (20)

4898850.ppt
4898850.ppt4898850.ppt
4898850.ppt
 
IIT JAM Math 2022 Question Paper | Sourav Sir's Classes
IIT JAM Math 2022 Question Paper | Sourav Sir's ClassesIIT JAM Math 2022 Question Paper | Sourav Sir's Classes
IIT JAM Math 2022 Question Paper | Sourav Sir's Classes
 
set theory --.pptx
set theory --.pptxset theory --.pptx
set theory --.pptx
 
Toc chapter 1 srg
Toc chapter 1 srgToc chapter 1 srg
Toc chapter 1 srg
 
Unit 1 Set Theory-Engineering Mathematics.pptx
Unit 1 Set Theory-Engineering Mathematics.pptxUnit 1 Set Theory-Engineering Mathematics.pptx
Unit 1 Set Theory-Engineering Mathematics.pptx
 
maths 12th.pdf
maths 12th.pdfmaths 12th.pdf
maths 12th.pdf
 
A Szemeredi-type theorem for subsets of the unit cube
A Szemeredi-type theorem for subsets of the unit cubeA Szemeredi-type theorem for subsets of the unit cube
A Szemeredi-type theorem for subsets of the unit cube
 
2 homework
2 homework2 homework
2 homework
 
Edicoes asa 12 ano 2020-21 - 3 teste
Edicoes asa   12 ano 2020-21 - 3 testeEdicoes asa   12 ano 2020-21 - 3 teste
Edicoes asa 12 ano 2020-21 - 3 teste
 
Testing Forest-Isomorphism in the Adjacency List Model
Testing Forest-Isomorphismin the Adjacency List ModelTesting Forest-Isomorphismin the Adjacency List Model
Testing Forest-Isomorphism in the Adjacency List Model
 
Final maths presentation on sets
Final maths presentation on setsFinal maths presentation on sets
Final maths presentation on sets
 
SETS - Vedantu.pdf
SETS - Vedantu.pdfSETS - Vedantu.pdf
SETS - Vedantu.pdf
 
Lesson2_MathematicalLanguageAndSymbols _Lesson 2.1_VariablesAndTheLanguageOfS...
Lesson2_MathematicalLanguageAndSymbols _Lesson 2.1_VariablesAndTheLanguageOfS...Lesson2_MathematicalLanguageAndSymbols _Lesson 2.1_VariablesAndTheLanguageOfS...
Lesson2_MathematicalLanguageAndSymbols _Lesson 2.1_VariablesAndTheLanguageOfS...
 
P2-Chp3-SequencesAndSeries from pure maths 2.pptx
P2-Chp3-SequencesAndSeries from pure maths 2.pptxP2-Chp3-SequencesAndSeries from pure maths 2.pptx
P2-Chp3-SequencesAndSeries from pure maths 2.pptx
 
Math.pptx
Math.pptxMath.pptx
Math.pptx
 
DISCRETE LOGARITHM PROBLEM
DISCRETE LOGARITHM PROBLEMDISCRETE LOGARITHM PROBLEM
DISCRETE LOGARITHM PROBLEM
 
Cs6660 compiler design november december 2016 Answer key
Cs6660 compiler design november december 2016 Answer keyCs6660 compiler design november december 2016 Answer key
Cs6660 compiler design november december 2016 Answer key
 
Mathematics JEE quick revision notes pdf
Mathematics JEE quick revision notes pdfMathematics JEE quick revision notes pdf
Mathematics JEE quick revision notes pdf
 
Introduction to set theory
Introduction to set theoryIntroduction to set theory
Introduction to set theory
 
SETS PPT-XI.pptx
SETS PPT-XI.pptxSETS PPT-XI.pptx
SETS PPT-XI.pptx
 

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
 
Pumping lemma for cfg
Pumping lemma for cfgPumping lemma for cfg
Pumping lemma for cfg
 
Power of authomata
Power of authomataPower of authomata
Power of authomata
 
Pda1
Pda1Pda1
Pda1
 

Recently uploaded

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.pdfRagavanV2
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
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 Bookingroncy bisnoi
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
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
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
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 engineeringmulugeta48
 
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
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...tanu pandey
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Christo Ananth
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 

Recently uploaded (20)

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
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
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
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
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)
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
(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
 
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
 
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...
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 

Grammar generated by language

  • 1. Prof.Neeraj Bhargava Abhishek Kumar Department of Computer Science School of Engineering & System Sciences, MDS, University Ajmer, Rajasthan, India 1
  • 2.  A grammar express languages with the help of four tuples:- (Vn , ∑ , R , S) • V is a finite set of variables/non-terminals • Σ is a finite set of terminals • S ∈ V is the start symbol • R ⊆ (Σ∪V )∗×(Σ∪V )∗ is a finite set of rules/productions. We say γ1 α γ2 ⇒G γ1 β γ2 , iff (α → β) ∈ R. And L(G) = {w ∈ Σ∗|S ∗ ⇒G w} 2
  • 3. Grammar Rules Languages  Type 3 A → aB or A → a Regular  Type 2 A → α Context Free  Type 1 α → β with |α|≤|β Context Sensitive  Type 0 α → β Recursively Enumerable  Figure 2: In the above table, α,β ∈ (Σ∪V )∗, A,B ∈ V and a ∈ Σ∪{} 3
  • 4.  Example 2. Consider the grammar G with Σ = {a} with S → $Ca# | a | ∈ Ca → aaC $D → $C C# → D# | E a D → Da aE → Ea $E → ∈ The following are derivations in this grammar S ⇒ $Ca# ⇒ $aaC# ⇒ $aaE ⇒ $aEa ⇒ $Eaa ⇒ aa S ⇒ $Ca# ⇒ $aaC# ⇒ $aaD# ⇒ $aDa# ⇒ $Daa# ⇒ $Caa# ⇒ $aaCa# ⇒ $aaaaC# ⇒ $aaaaE ⇒ $aaaEa ⇒ $aaEaa ⇒ $aEaaa ⇒ $Eaaaa ⇒ aaaa L(G) = {ai |i is a power of 2} 4
  • 5.  Example 8. Consider the grammar G with Σ = {a,b,c}, V = {S,B,C,H} and S → aSBC | aBC CB → HB HB → HC HC → BC aB → ab bB → bb bC → bc cC → cc L(G) = {anbncn |n ≥ 0} 5
  • 6. 6