1 / 11

Chomsky Hierarchy Language Operations and Properties

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

tavon
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. The Chomsky Hierarchy You don’t have to know this

  3. The Chomsky Hierarchy Partially Computable Languages {M, H(<M>)} Computable Languages {an bn cn , 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) regular grammar that generates it.

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

  6. 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 shouldn’t loop for any input.

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

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

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

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

More Related