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 iv

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 iv (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

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
 
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
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLManishPatel169454
 
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 - VDineshKumar4165
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
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
 
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
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxfenichawla
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
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 Bookingdharasingh5698
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...SUHANI PANDEY
 

Recently uploaded (20)

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...
 
(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
 
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
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
 
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
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.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...
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
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
 
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...
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
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
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 

Grammar generated by language iv

  • 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