Chomsky Hierarchy in Language Theory

 
Chomsky Hierarchy
Language Operations and Properties
 
 
The Chomsky Hierarchy
 
You don’t
have to
 know this
line
 
The Chomsky Hierarchy
 
Context Free Languages
 
Recursive Languages
 
Recursively Enumerable 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>)}
 
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) linear grammar that
generates it.
 
Context Free Languages
 
To prove that a language is context free:
Find a PDA that recognizes it.
Find a context free grammar that generates it.
 
Recursive Languages
 
To prove that a language is recursive 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 should never loop (on any input).
 
Recursively Enumerable Language
 
To prove that a language is recursively
enumerable:
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 or reject.
Give an unrestricted grammar that represents
it (you won’t be asked to do that…)
 
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.
Recursive Languages are closed under: Union,
Concatenation, Star, Intersection, Complement
Recursively Enumerable Languages are closed
under: Union, Concatenation, Star, Intersection.
They are not closed under Complement.
 
Properties mixing languages
 
If a language L
1
 is context free and a language
L
2
 is regular then the intersection of L
1
 and L
2
is context free.
Given the fact that there is a PDA M
1
 recognizing L
1
and a DFA M
2
 recognizing L
2
 we can create a PDA
M for L
1
L
2
. M is going to simulate the run of M
1
while keeping track of transitions of M
2
. This idea
is quite similar to the proof that regular languages
are closed under intersection, we only have to
take additional care about the stack of M
1
.
 
Properties mixing languages
 
If a language L and its complement L
c
 are both
recursively enumerable then the language L is
recursive.
Both L and its complement have TMs M and M’ that
recognize them. To decide whether x is in L: Run
both machines M and M’ in parallel. One of them
will eventually halt:
 
- If M halts accept.
 
- If M’ halts reject.
Slide Note
Embed
Share

Explore Chomsky Hierarchy in language theory, including different types of languages, grammars, and automata. Learn how to prove if a language is regular, context-free, recursive, or recursively enumerable. Understand the closure properties of regular, context-free, recursive, and recursively enumerable languages under various operations.

  • Chomsky Hierarchy
  • Language Theory
  • Regular Languages
  • Context-Free Languages
  • Automata

Uploaded on Jul 31, 2024 | 3 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. Chomsky Hierarchy Language Operations and Properties

  2. You dont have to know this line The Chomsky Hierarchy Type Language Grammar Automaton 0 Recursively Enumerable Unrestricted DTM - NTM 1 Context Sensitive Context Sensitive Linearly Bounded Automaton 2 Context Free Context Free NPDA 3 Regular Right Linear, Left Linear DFA, NFA Type Type Type Type 3 2 1 0

  3. The Chomsky Hierarchy Recursively Enumerable Languages {<M>, H(<M>)} Recursive Languages {anbncn, n 0} Context Free Languages {anbn , n 0} Regular Languages {ambn , m,n 0}

  4. 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) linear grammar that generates it.

  5. Context Free Languages To prove that a language is context free: Find a PDA that recognizes it. Find a context free grammar that generates it.

  6. Recursive Languages To prove that a language is recursive 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 should never loop (on any input).

  7. Recursively Enumerable Language To prove that a language is recursively enumerable: 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 or reject. Give an unrestricted grammar that represents it (you won t be asked to do that )

  8. 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. Recursive Languages are closed under: Union, Concatenation, Star, Intersection, Complement Recursively Enumerable Languages are closed under: Union, Concatenation, Star, Intersection. They are not closed under Complement.

  9. Properties mixing languages If a language L1is context free and a language L2is regular then the intersection of L1and L2 is context free. Given the fact that there is a PDA M1recognizing L1 and a DFA M2recognizing L2we can create a PDA M for L1 L2. M is going to simulate the run of M1 while keeping track of transitions of M2. This idea is quite similar to the proof that regular languages are closed under intersection, we only have to take additional care about the stack of M1.

  10. Properties mixing languages If a language L and its complement Lcare both recursively enumerable then the language L is recursive. Both L and its complement have TMs M and M that recognize them. To decide whether x is in L: Run both machines M and M in parallel. One of them will eventually halt: - If M halts accept. - If M halts reject.

More Related Content

giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#