SlideShare a Scribd company logo
1 of 4
Chomsky hierarchy of languages
According to Chomsky hierarchy, grammar is divided into 4 types as follows:
1. Type 0 is known as unrestricted grammar.
2. Type 1 is known as context-sensitive grammar.
3. Type 2 is known as a context-free grammar.
4. Type 3 Regular Grammar.
Type 0: Unrestricted Grammar:
Type-0 grammars include all formal grammar. Type 0 grammar languages are
recognized by turing machine. These languages are also known as the Recursively
Enumerable languages.
Grammar Production in the form of where
alpha
V : Variables T
: Terminals.
is ( V + T)* V ( V + T)*
is ( V + T )*.
In type 0 there must be at least one variable on the Left side of
production. For example:
Sab --> ba A --> S
Here, Variables are S, A, and Terminals a, b.
Type 1: Context-Sensitive Grammar
Type-1 grammars generate context-sensitive languages. The language generated by
the grammar is recognized by the Linear Bound Automata
In Type 1
First of all Type 1 grammar should be Type 0.
Grammar Production in the form of
|alpha |<=|beta |
That is the count of symbol in
Also β ∈ (V + T)+
i.e. β can not be ε
is less than or equal to
For Example:
S --> AB
AB --> abc B --> b
Type 2: Context-Free Grammar: Type-2 grammars generate context-free
languages. The language generated by the grammar is recognized by a Pushdown
automata. In Type 2:
 First of all, it should be Type 1.
 The left-hand side of production can have only one variable and there is
no restriction on
| = 1.
|alpha
For example:
S --> AB
A.--> a
B.--> b
Type 3: Regular Grammar: Type-3 grammars generate regular languages. These
languages are exactly all languages that can be accepted by a finite-state
automaton. Type 3 is the most restricted form of grammar.
Type 3 should be in the given form only :
V --> VT / T
(or)
V --> TV /T
For example:
S --> a
(left-regular grammar)
(right-regular grammar)
The above form is called strictly regular grammar.
There is another form of regular grammar called extended regular grammar. In this
form:
V --> VT* / T*.
(or)
V --> T*V /T*
For example :
S --> ab.
(extended left-regular grammar)
(extended right-regular grammar)

More Related Content

More from shruti533256

More on Emulsion.docx
More on Emulsion.docxMore on Emulsion.docx
More on Emulsion.docxshruti533256
 
More on Virtualization.ppt
More on Virtualization.pptMore on Virtualization.ppt
More on Virtualization.pptshruti533256
 
Virtualization Introduction.ppt
Virtualization Introduction.pptVirtualization Introduction.ppt
Virtualization Introduction.pptshruti533256
 
Virtualization summary b.docx
Virtualization summary b.docxVirtualization summary b.docx
Virtualization summary b.docxshruti533256
 
Virtualization summary a.docx
Virtualization summary a.docxVirtualization summary a.docx
Virtualization summary a.docxshruti533256
 
More on Virtualization 2.pptx
More on Virtualization 2.pptxMore on Virtualization 2.pptx
More on Virtualization 2.pptxshruti533256
 
Virtualization concepts 2.pptx
Virtualization concepts 2.pptxVirtualization concepts 2.pptx
Virtualization concepts 2.pptxshruti533256
 
6- Threaded Interpretation.docx
6- Threaded Interpretation.docx6- Threaded Interpretation.docx
6- Threaded Interpretation.docxshruti533256
 
More on Virtualization 3.pptx
More on Virtualization 3.pptxMore on Virtualization 3.pptx
More on Virtualization 3.pptxshruti533256
 
2-Virtualization in Cloud Computing and Types.docx
2-Virtualization in Cloud Computing and Types.docx2-Virtualization in Cloud Computing and Types.docx
2-Virtualization in Cloud Computing and Types.docxshruti533256
 
4-Taxonomy of virtualization.docx
4-Taxonomy of virtualization.docx4-Taxonomy of virtualization.docx
4-Taxonomy of virtualization.docxshruti533256
 
Course Plan Virtualization concepts.docx
Course Plan Virtualization concepts.docxCourse Plan Virtualization concepts.docx
Course Plan Virtualization concepts.docxshruti533256
 
3-Types of Virtual Machines.docx
3-Types of Virtual Machines.docx3-Types of Virtual Machines.docx
3-Types of Virtual Machines.docxshruti533256
 
1-Introduction to Virtualization.docx
1-Introduction to Virtualization.docx1-Introduction to Virtualization.docx
1-Introduction to Virtualization.docxshruti533256
 
6-Nfa & equivalence with RE.pdf
6-Nfa & equivalence with RE.pdf6-Nfa & equivalence with RE.pdf
6-Nfa & equivalence with RE.pdfshruti533256
 
9-Pumping Lemma.pdf
9-Pumping Lemma.pdf9-Pumping Lemma.pdf
9-Pumping Lemma.pdfshruti533256
 
5-DFA and equivalence with RE.pdf
5-DFA and equivalence with RE.pdf5-DFA and equivalence with RE.pdf
5-DFA and equivalence with RE.pdfshruti533256
 

More from shruti533256 (19)

More on Emulsion.docx
More on Emulsion.docxMore on Emulsion.docx
More on Emulsion.docx
 
More on Virtualization.ppt
More on Virtualization.pptMore on Virtualization.ppt
More on Virtualization.ppt
 
Virtualization Introduction.ppt
Virtualization Introduction.pptVirtualization Introduction.ppt
Virtualization Introduction.ppt
 
Virtualization summary b.docx
Virtualization summary b.docxVirtualization summary b.docx
Virtualization summary b.docx
 
Virtualization summary a.docx
Virtualization summary a.docxVirtualization summary a.docx
Virtualization summary a.docx
 
More on Virtualization 2.pptx
More on Virtualization 2.pptxMore on Virtualization 2.pptx
More on Virtualization 2.pptx
 
Virtualization concepts 2.pptx
Virtualization concepts 2.pptxVirtualization concepts 2.pptx
Virtualization concepts 2.pptx
 
6- Threaded Interpretation.docx
6- Threaded Interpretation.docx6- Threaded Interpretation.docx
6- Threaded Interpretation.docx
 
Overview.ppt
Overview.pptOverview.ppt
Overview.ppt
 
More on Virtualization 3.pptx
More on Virtualization 3.pptxMore on Virtualization 3.pptx
More on Virtualization 3.pptx
 
2-Virtualization in Cloud Computing and Types.docx
2-Virtualization in Cloud Computing and Types.docx2-Virtualization in Cloud Computing and Types.docx
2-Virtualization in Cloud Computing and Types.docx
 
4-Taxonomy of virtualization.docx
4-Taxonomy of virtualization.docx4-Taxonomy of virtualization.docx
4-Taxonomy of virtualization.docx
 
Course Plan Virtualization concepts.docx
Course Plan Virtualization concepts.docxCourse Plan Virtualization concepts.docx
Course Plan Virtualization concepts.docx
 
3-Types of Virtual Machines.docx
3-Types of Virtual Machines.docx3-Types of Virtual Machines.docx
3-Types of Virtual Machines.docx
 
1-Introduction to Virtualization.docx
1-Introduction to Virtualization.docx1-Introduction to Virtualization.docx
1-Introduction to Virtualization.docx
 
5-Emulation.docx
5-Emulation.docx5-Emulation.docx
5-Emulation.docx
 
6-Nfa & equivalence with RE.pdf
6-Nfa & equivalence with RE.pdf6-Nfa & equivalence with RE.pdf
6-Nfa & equivalence with RE.pdf
 
9-Pumping Lemma.pdf
9-Pumping Lemma.pdf9-Pumping Lemma.pdf
9-Pumping Lemma.pdf
 
5-DFA and equivalence with RE.pdf
5-DFA and equivalence with RE.pdf5-DFA and equivalence with RE.pdf
5-DFA and equivalence with RE.pdf
 

Recently uploaded

scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...HenryBriggs2
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxSCMS School of Architecture
 
Augmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxAugmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxMustafa Ahmed
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdfKamal Acharya
 
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using PipesLinux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using PipesRashidFaridChishti
 
Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)ChandrakantDivate1
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network DevicesChandrakantDivate1
 
Worksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxWorksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxMustafa Ahmed
 
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...ronahami
 
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 ptxJIT KUMAR GUPTA
 
Memory Interfacing of 8086 with DMA 8257
Memory Interfacing of 8086 with DMA 8257Memory Interfacing of 8086 with DMA 8257
Memory Interfacing of 8086 with DMA 8257subhasishdas79
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiessarkmank1
 
fitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .pptfitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .pptAfnanAhmad53
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxSCMS School of Architecture
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...Amil baba
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdfKamal Acharya
 
Introduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdfIntroduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdfsumitt6_25730773
 
Post office management system project ..pdf
Post office management system project ..pdfPost office management system project ..pdf
Post office management system project ..pdfKamal Acharya
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdfKamal Acharya
 

Recently uploaded (20)

scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Augmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxAugmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptx
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using PipesLinux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
 
Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
Worksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxWorksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptx
 
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
 
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
 
Memory Interfacing of 8086 with DMA 8257
Memory Interfacing of 8086 with DMA 8257Memory Interfacing of 8086 with DMA 8257
Memory Interfacing of 8086 with DMA 8257
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
fitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .pptfitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .ppt
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
Introduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdfIntroduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdf
 
Post office management system project ..pdf
Post office management system project ..pdfPost office management system project ..pdf
Post office management system project ..pdf
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
 

2-Chomsky hierarchy of languages.ppt

  • 2. According to Chomsky hierarchy, grammar is divided into 4 types as follows: 1. Type 0 is known as unrestricted grammar. 2. Type 1 is known as context-sensitive grammar. 3. Type 2 is known as a context-free grammar. 4. Type 3 Regular Grammar. Type 0: Unrestricted Grammar: Type-0 grammars include all formal grammar. Type 0 grammar languages are recognized by turing machine. These languages are also known as the Recursively Enumerable languages. Grammar Production in the form of where alpha V : Variables T : Terminals. is ( V + T)* V ( V + T)* is ( V + T )*. In type 0 there must be at least one variable on the Left side of production. For example: Sab --> ba A --> S Here, Variables are S, A, and Terminals a, b. Type 1: Context-Sensitive Grammar
  • 3. Type-1 grammars generate context-sensitive languages. The language generated by the grammar is recognized by the Linear Bound Automata In Type 1 First of all Type 1 grammar should be Type 0. Grammar Production in the form of |alpha |<=|beta | That is the count of symbol in Also β ∈ (V + T)+ i.e. β can not be ε is less than or equal to For Example: S --> AB AB --> abc B --> b Type 2: Context-Free Grammar: Type-2 grammars generate context-free languages. The language generated by the grammar is recognized by a Pushdown automata. In Type 2:  First of all, it should be Type 1.  The left-hand side of production can have only one variable and there is no restriction on | = 1. |alpha For example: S --> AB A.--> a B.--> b Type 3: Regular Grammar: Type-3 grammars generate regular languages. These languages are exactly all languages that can be accepted by a finite-state automaton. Type 3 is the most restricted form of grammar. Type 3 should be in the given form only : V --> VT / T (or) V --> TV /T For example: S --> a (left-regular grammar) (right-regular grammar) The above form is called strictly regular grammar.
  • 4. There is another form of regular grammar called extended regular grammar. In this form: V --> VT* / T*. (or) V --> T*V /T* For example : S --> ab. (extended left-regular grammar) (extended right-regular grammar)