"Foundations of Computer Science II" (“Fondamenti dell’Informatica II”) (homepage: http://www.di.univaq.it/orefice/fond.html) Academic Year 2015-16 Second Level Degree in Computer Science (Laurea Magistrale) Lecturer: Prof. Sergio Orefice SYLLABUS 1. Formal language basic notions. Chomsky hierarchy 2. Finite automata. Nondeterministic finite automata. Finite automata with epsilon-transitions 3. Regular expressions. The Kleene theorem. Pumping Lemma for regular sets. Properties of regular sets 4. Context-free grammars. Pushdown automata. Properties of context-free languages. Chomsky Normal Form. Pumping Lemma for context-free languages. The CYK algorithm 5. Nonlinear and visual formal languages. Syntactical models 6. Context-free positional grammars DETAILED PROGRAM Points 1-4 of the syllabus: Textbooks (available at the Library): (English) -Hopcroft, Motwani, Ullman, “Introduction to Automata Theory, Languages, and Computation”, Addison-Wesley (Italian) -Hopcroft, Motwani, Ullman, “Automi, Linguaggi e calcolabilità”, Addison-Wesley Chapter 1: - Section 1.5 (the central concepts of automata theory) Chapter 2: - Section 2.2.1 (DFA) - Section 2.2.3 (transition diagrams, transition tables) - Section 2.2.4 (extended transition function) - Section 2.2.5 (the language of a DFA) - Section 2.3.2 (NFA) - Section 2.3.3 (extended transition function) - Section 2.3.4 (the language of an NFA) - Section 2.3.5 (equivalence of DFA and NFA: subset construction, accessible states) (note: TH 2.11 proof yes; TH 2.12: part “if” proof yes, part “only-if” only the construction of the equivalent NFA) - Section 2.5.2 (epsilon-NFA) - Section 2.5.3 (epsilon-closure) - Section 2.5.4 (extended transition function and language of an epsilon-NFA) - Section 2.5.5 (eliminating epsilon-transitions) (note: only the subset construction for epsilon-NFA, TH 2.22 proof no) Chapter 3: - Section 3.1 (operations on languages, regular expressions) (note: case-studies: example 3.2 and exercises 3.1.1.a, 3.1.1.b, 3.1.2.b) - Section 3.2.1 (Kleene’s theorem) (note: TH 3.4 proof yes) - Section 3.2.3 (Thompson’s algorithm) (note: TH 3.7 proof yes) - Section 3.4 (algebraic laws for regular expressions) (note: only the list of the laws, no proofs) Chapter 4: - Section 4.1 (pumping lemma for regular languages) (note: "pigeonhole principle" from Chapter 2; TH 4.1 proof yes, case-studies: examples 4.2, 4.3 and exercises 4.1.1.c, 4.1.2.a ) - Section 4.2 (closure properties of regular languages) (note: union, concatenation, star, intersection, difference: proof yes; complement, reversal: only the construction process; homomorphisms: only definitions; (TH 4.4, 4.10 proof yes; TH 4.5, 4.8, 4.11, 4.14, 4.16 proof no)) - Section 4.3.2 (testing emptiness of regular languages) - Section 4.3.3 (testing membership in a regular language) - Sections 4.4.1, 4.4.2 (testing equivalence of regular languages: equivalent/distinguishable states of a DFA + “table-filling” algorithm) (note: TH 4.20 proof no) - Section 4.4.3 (minimization of DFA’s) (note: only the algorithm for minimizing DFA’s, TH 4.23, 4.24 proof no) Chapter 5: - Sections 5.1, 5.2, 5.4 (context-free grammars and languages) (note: only formal definition of the following notions: context-free grammar, derivation, leftmost and rightmost derivation, language of a grammar, sentential form, parse tree and yield, ambiguity and inherent ambiguity. TH 5.14, 5.16 proof no) MIDTERM EXAM Chapter 6: - Section 6.1 (PDA and instantaneous descriptions) - Section 6.2 (the languages of a PDA: acceptance by final state and by empty stack) (note: TH 6.9 proof no, only the construction of PF; TH 6.11 proof no, only the construction of PN) - Section 6.3.1 (equivalence of PDA’s and CFG’s) (note: only the construction of a PDA from a grammar; TH 6.13 proof no) - Section 6.4 (DPDA) (note: only definition of DPDA and characterization of the languages accepted by DPDA, without proofs) Chapter 7: - Section 7.1.1 (eliminating useless symbols) (note: definitions of the following notions: useful symbols, useless symbols, generating symbols, reachable symbols; construction of a grammar without useless symbols, TH 7.2 proof no) - Section 7.1.2 (computing the generating and reachable symbols) (note: only the algorithms to compute generating and reachable symbols, TH 7.4 and 7.6 proof no) - Section 7.1.3 (eliminating epsilon-productions) (note: only the algorithms to compute the nullable symbols and to construct a grammar without epsilon-productions, TH 7.7 and 7.9 proof no) - Section 7.1.4 (eliminating unit productions) (note: only the algorithms to compute the unit pairs and to construct a grammar without unit productions, TH 7.11, 7.13 and 7.14 proof no) - Section 7.1.5 (chomsky normal form) (note: only definition and construction of the normal form; TH 7.16 proof no) - Section 7.2 (pumping lemma for CFL’s) (note: TH 7.17 proof no, TH 7.18 proof yes, case-study: example 7.19) - Sections 7.3.3, 7.3.4 (closure properties of CFL’s) (note: list of the properties; theorem and proof in “FileA” for ‘union’, ‘concatenation’ and ‘closure’; only grammar construction for ‘reversal’; example 7.26 for ‘intersection’; TH 7.25 and 7.27 proof no, TH 7.29 proof yes) - Section 7.4.4 (testing membership in a CFL: CYK algorihtm) From the book (available at the Library) Hopcroft, Ullman, "Introduction to Automata Theory, Languages, and Computation" Addison Wesley: - Chapter 9 (Chomsky hierarchy) (note: only definitions of type 0-1-2-3 grammar and characterization of the language hierarchy, without proofs) Points 5-6 of the syllabus: From “FileB”: - Introduction and Section 2 (syntax of visual/nonlinear languages) (note: just a quick look) - Section 3 (syntactical models) (note: characterization of the syntactical models: string, symbolic/iconic, box, plex, graph) From “FileC”: - Section 3 (syntax of visual/nonlinear languages) (note: just a quick look) - Section 4 (positional grammars) (note: only formal definition of context-free positional grammar, example 4.1 and 4.2 no) - Section 5 (positional grammars for plex languages) (note: case-study: example 5.2, example 5.1 no)