Chomsky Hierarchy Language Operations and
Description: Chomsky Hierarchy Language Operations and Properties The Chomsky Hierarchy You dont have to know this line The Chomsky Hierarchy Context Free Languages Recursive Languages Recursively Enumerable Languages an bn , n 0 Regular Languages
Related Topics
Download Presentation
"Chomsky Hierarchy Language Operations and" is the property of its rightful owner. Permission is granted to download and print the materials on this website for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Presentation Transcript
slide1. Chomsky HierarchyLanguage Operations and Properties<br>
slide2. The Chomsky Hierarchy You don’t
have to
know this
line<br>
slide3. The Chomsky Hierarchy Context Free Languages Recursive Languages Recursively Enumerable Languages {an bn , n ≥ 0} Regular Languages {an bn cn , n ≥ 0} {am bn , m,n ≥ 0} {<M>, H(<M>)}<br>
slide4. 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.<br>
slide5. 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.<br>
slide6. 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).<br>
slide7. 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…)<br>
slide8. 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.<br>
slide9. Properties mixing languages If a language L1 is context free and a language L2 is regular then the intersection of L1 and L2 is context free.
Given the fact that there is a PDA M1 recognizing L1 and a DFA M2 recognizing L2 we 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.<br>
slide10. Properties mixing languages If a language L and its complement Lc 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.<br>
slide2. The Chomsky Hierarchy You don’t
have to
know this
line<br>
slide3. The Chomsky Hierarchy Context Free Languages Recursive Languages Recursively Enumerable Languages {an bn , n ≥ 0} Regular Languages {an bn cn , n ≥ 0} {am bn , m,n ≥ 0} {<M>, H(<M>)}<br>
slide4. 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.<br>
slide5. 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.<br>
slide6. 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).<br>
slide7. 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…)<br>
slide8. 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.<br>
slide9. Properties mixing languages If a language L1 is context free and a language L2 is regular then the intersection of L1 and L2 is context free.
Given the fact that there is a PDA M1 recognizing L1 and a DFA M2 recognizing L2 we 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.<br>
slide10. Properties mixing languages If a language L and its complement Lc 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.<br>