0% found this document useful (0 votes)
107 views10 pages

Week4 Day2 Chomsky Hierarchy

The document discusses the Chomsky hierarchy, which classifies formal languages according to the type of grammar used to generate them. It describes four language types - regular, context-free, context-sensitive, and recursively enumerable - as well as their corresponding grammars and machines used to recognize them. Regular languages can be recognized by finite state machines, context-free by pushdown automata, context-sensitive by linear bounded automata, and recursively enumerable by Turing machines. Examples are provided for each language type.

Uploaded by

sandyracha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
107 views10 pages

Week4 Day2 Chomsky Hierarchy

The document discusses the Chomsky hierarchy, which classifies formal languages according to the type of grammar used to generate them. It describes four language types - regular, context-free, context-sensitive, and recursively enumerable - as well as their corresponding grammars and machines used to recognize them. Regular languages can be recognized by finite state machines, context-free by pushdown automata, context-sensitive by linear bounded automata, and recursively enumerable by Turing machines. Examples are provided for each language type.

Uploaded by

sandyracha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

1

The Chomsky Hierarchy


Chomsky Hierarchy/Levels of Languages Types of Languages
A containment hierarchy of classes of formal languages

2
Chomsky Hierarchy
Type Language Grammar Machine Example
Type-3 Regular Grammar Accepted by
Regular  Right-linear Finite Automata a*
Language grammar
 Left-linear
grammar

Type-2 Context-free Context-free Accepted by anbn


Language grammar Push Down
Automata

Type-1 Context- Context-sensitive Accepted by anbncn


sensitive grammar Linear Bounded
Automata
Type-0 Recursively Unrestricted Turing Machine Any computable
enumerable grammar function
Regular Languages

• A language is regular if and only if it is the


accepted language of some DFA / NFA

• Construct an DFA / NFA for the language


described by the regular expression:
(ab*a)*
Context-Free Languages

• Contains a finite alphabet, S


• Contains a finite set of non-terminals, N
• S is an element of N and is the Start symbol
• R = Rules: Grammar:
X sY S = {a,b}
X s N = {S}
X l R = {S  aSb, S  l}
• Uses a stack to hold infinite memory
Context-Sensitive Languages
• The number of symbols on the LHS must not exceed the
number of symbols on the RHS
• A  l is not allowed unless A is the start symbol and does
not occur on the RHS of any rule
• Since we allow more than one symbol on the LHS, we refer
to those symbols other than the one we are replacing as the
context of the replacement.
• Linear-bounded automaton: a Turing Machine with a finite
amount of tape
• The syntax of some natural languages (including Dutch, and
Swiss German) is held to have structures of this type
R Recursively Enumerable
• Have no restrictions on their grammar rules (except,
of course, that there must be at least one non-
terminal on the LHS).
• Turing Machine is a finite-state machine in which a
transition prints a symbol on a tape. The tape head
may move in either direction, allowing the machine
to read and manipulate the input as many times as
desired.
• Predated and provided a model for the design and
development of the stored-program computer.
Theory Questions from I Unit

1. Explain the Steps involved in Inductive Proof?-5M

2. Difference between NFA and DFA?- 5M

3. Difference between NFA and Epsilon Closure of NFA?- 5M

4. Difference between Mealy and Moore Machine?- 5M

5. Explain in brief about the Chomsky Hierarchy?- 5M

6. Explain about Components involved in pictorial representation of a


Finite Automata ( Familiar Picture of Finite Automata)?- 5M

7. What are the steps involved in Myhill Nerode Method?-5M


References

Chomsky Hierarchy
https://www.javatpoint.com/automata-chomsky-hierarchy

You might also like