1 / 13

Closure properties of RE, Rec

[Section 10.1]. Closure properties of RE, Rec. Recall that a language L is - recursively enumerable (RE) if there exists a TM for L, recursive (Rec) if there exists a TM for L which halts on every input (i.e. also on strings not from L).

hogg
Download Presentation

Closure properties of RE, Rec

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. [Section 10.1] Closure properties of RE, Rec • Recall that a language L is • - recursively enumerable (RE) if there exists a TM for L, • recursive (Rec) if there exists a TM for L which halts on every input (i.e. also on strings not from L). • Is the class RE closed under union ? And intersection ? • Is the class Rec closed under union ? And intersection ? • What can we say about complement ?

  2. [Section 10.1] Closure properties of RE, Rec Lemma : RE languages are closed under union. Lemma : RE languages are closed under intersection.

  3. [Section 10.1] Closure properties of RE, Rec Lemma : Recursive languages are closed under union. Lemma : Recursive languages are closed under intersection.

  4. [Section 10.1] Closure properties of RE, Rec Lemma : Recursive languages are closed under complement. Lemma : RE languages are not closed under complement.

  5. [Section 10.1] Closure properties of RE, Rec Thm : L and L’ are RE iff L is recursive.

  6. [Section 10.4] The Chomsky Hierarchy • Noam Chomsky studied grammars as potential models for natural languages. He classified grammars according to these four types: • Type 0 Grammars: Unrestricted Grammars (generate RE languages) • Type 1 Grammars: Context-sensitive (monotone) Grammars (generate context-sensitive languages) • Type 2 Grammars: Context-free Grammars (generate context-free languages) • Type 3 Grammars: Regular Grammars (generate regular languages)

  7. [Section 10.3] Unrestricted Grammars (Type 0) • Def: An unrestricted grammar is a 4-tuple G=(V,,S,P) where • V is a finite set of variables •  is a finite set of terminal symbols • S 2 is the start symbol • P is a finite set of productions of the form  where 2 (V [)+ and 2 (V [)* • (V and  are assumed to be disjoint)

  8. [Section 10.3] Unrestricted Grammars (Type 0) Example: Give an unrestricted grammar for { akbkck | k ¸ 0 }

  9. [Section 10.3] Unrestricted Grammars (Type 0) Example: Give an unrestricted grammar for { aj | j = 2k, k ¸ 0 }

  10. [Section 10.3] Context-sensitive Gram. (Type 1) Def: A type 0 grammar G=(V,,S,P) is context-sensitive if for every production rule  in P, ||·||. Which of our examples of type 0 grammars are context-sensitive ?

  11. [Section 10.3] Context-sensitive Gram. (Type 1) Def: A type 0 grammar G=(V,,S,P) is context-sensitive if for every production rule  in P, ||·||. Lemma: Every context-free language which does not contain  is context-sensitive.

  12. [Section 10.3] Context-sensitive Gram. (Type 1) Def: A type 0 grammar G=(V,,S,P) is context-sensitive if for every production rule  in P, ||·||. Lemma: Every context-free language which does not contain  is context-sensitive. Def: A linear-bounded automaton A is a TM which never rewrites a blank to a non-blank symbol. Lemma: A language L is context-sensitive iff there exists a linear-bounded automaton accepting L.

  13. [Section 6.3] Regular Grammars (Type 3) Def: A type 0 grammar G=(V,,S,P) is regular if every production rule in P is of the form A B or A , where A,B 2 V and 2. Lemma: A language L is regular iff there exists a regular grammar for L-{}.

More Related