1 / 10

Chomsky Hierarchy Language Operations and Properties

Chomsky Hierarchy Language Operations and Properties. You don’t have to know this line. The Chomsky Hierarchy. The Chomsky Hierarchy. Recursively Enumerable Languages. {<M>, H(<M>)}. Recursive Languages. {a n b n c n , n ≥ 0}. Context Free Languages. {a n b n , n ≥ 0}.

vin
Download Presentation

Chomsky Hierarchy Language Operations and Properties

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chomsky HierarchyLanguage Operations and Properties

  2. You don’t have to know this line The Chomsky Hierarchy

  3. The Chomsky Hierarchy Recursively Enumerable Languages {<M>, H(<M>)} Recursive Languages {anbncn, n ≥ 0} Context Free Languages {an bn , n ≥ 0} Regular Languages {am bn , 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 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.

  10. 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.

More Related