You are on page 1of 12

FREE VIDEO LECTURES FOR MCA

By:
video.edhole.com
CHOMSKY HIERARCHY
LANGUAGE OPERATIONS AND
PROPERTIES
video.edhole.com
THE CHOMSKY HIERARCHY
Typ
e
Language Grammar Automaton
0 Partially
Computable
Unrestricted DTM - NTM
1 Context Sensitive Context
Sensitive
Linearly
Bounded
Automaton
2 Context Free Context Free NPDA
3 Regular right regular,
left regular
DFA, NFA
0 Type 1 Type 2 Type 3 Type
You dont
have to
know this
video.edhole.com
THE CHOMSKY HIERARCHY
Context Free Languages
Computable Languages
Partially Computable Languages
{a
n
b
n
, n 0}
Regular Languages
{a
n
b
n
c
n
, n 0}
{a
m
b
n
, m,n 0}
{M, H(<M>)}
video.edhole.com
REGULAR LANGUAGES
To prove that a language is regular:
Find a DFA (NFA, NFA

) that recognizes it.


Find a regular expression that represents is.
Find a (right or left) regular grammar that generates
it.

video.edhole.com
CONTEXT FREE LANGUAGES
To prove that a language is context free:
Find a NPDA that recognizes it.
Find a context free grammar that generates it.
video.edhole.com
COMPUTABLE LANGUAGES
To prove that a language is computable you must find
a Turing Machine that decides membership in the
language:
If the string is in the language then the machine
should accept.
If the string is not in the language then the machine
should reject.
The machine shouldnt loop for any input.
video.edhole.com
PARTIALLY COMPUTABLE LANGUAGE
To prove that a language is partially computable:
Find a Turing Machine that recognizes it:
if the string is in the language the machine should
accept.
if the string is not in the language the machine should
loop.
Give an unrestricted grammar that represents it
(you wont be asked to do that)
video.edhole.com
CLOSURE UNDER OPERATIONS
Regular Languages are closed under: Union,
Concatenation, Star, Intersection and Complement
Context Free Languages are closed under: Union,
Concatenation, Star. They are not closed under:
Intersection, Complement.
Computable Languages are closed under: Union,
Concatenation, Star, Intersection, Complement
Partially Computable Languages are closed under:
Union, Concatenation, Star, Intersection. They are
not closed under Complement.
video.edhole.com
COMPUTABLE AND PARTIALLY COMPUTABLE
LANGUAGES
Computable languages most of the times are called
Decidable Languages because a Turing Machine can
decide membership in those languages (it can either
accept or reject a string). They are also called Recursive.
Partially Computable Languages most of the times are
called Recognizable because a Turing Machine can
recognize a string in the language (accept it) but it might
not be able to decide if a string is not in the language (it
might loop). They are also called Recursively
Enumerable.
video.edhole.com
COMPUTABLE LANGUAGES ARE ALSO
PARTIALLY COMPUTABLE
Proof:
If L is Computable then there is a Turing Machine M that
decides membership in L:
M accepts on x if x is in L
M rejects on x if x is not in L
Change M to M in the following way:
For all the combinations (q,a) for which the machine rejects
add the transition (q,a) = (q, a, S)
Now the new machine M:
Accepts on x if x is in L
Loops on x is x is not in L
So M recognizes L.

video.edhole.com
PROPERTIES OF COMPUTABLE AND PARTIALLY
COMPUTABLE LANGUAGES
If a language L and its complement are both
partially computable then the language is
computable
Both L and its complement have TMs M and M that
recognize them. To decide if x is in L: Run both
machines M and M in parallel. Eventually one will halt.
If M halts accept. If M halts reject.
video.edhole.com

You might also like