FOUNDATIONS OF COMPUTER SCIENCE F - N

Academic Year 2023/2024 - Teacher: Franco BARBANERA

Expected Learning Outcomes

Knowledge and understanding: students will acquire knowledge relative to some of the most important formal theories that are fundamental in Informatics. He will understand how all the aspects of applied Informatics have been realized or influenced by knowledge developed at a theoretical level.

Applying knowledge and understanding: students will acquire the ability of applying theoretical notions in applicative contexts.

Making judgements: students will be stimulated to search independently which aspects of theoretical computer science are used in topics covered in more applicative courses he followed in the same year. They will also be stimulated to understand how topics of other different courses could be formalized in mathematical logic.

Communication skills: students will acquire the necessary communication skills and expressive ability in order to express in a formal and non-ambiguous way scientific arguments.

Learning skills: students will get the competences to tackle independentlythe study of theoretical arguments when formally described.

Course Structure

Each lesson is divided into two parts. The first one (about one third of the time) is devoted to the solution of exercises and to the clarification of unclear topics of the previous lessons. The second part is devoted to the explanation of new topics.

Should teaching be carried out in mixed mode or remotely, it may be necessary to introduce changes with respect to previous statements, in line with the programme planned and outlined in the syllabus.

Required Prerequisites

None.

Attendance of Lessons

Non compulsory.

Detailed Course Content

Elements of Theory of formal languages:

  • Alphabet, string, language. Operations on languages. Regular expressions. Cardinality of languages.
  • Chomsky grammars. Type 0,1,2,3 grammars. Chomsky Hierarchy. Bakus normal form.
  • What does it mean ''to compute''
  • Recognition and decision of languages. Automata.
  • Finite state automata, deterministic and nondeterministic. 
  • Pumping Lemma for FSA. 
  • Context-free languages: a hint. 


Computational models and computability theory:

  • Turing machines and universal Turing machine.
  • Introduction to functional programming and the lambda-calculus
  • free and bound variables, alpha-conversion, substiturions, beta-reduction. Definition of formal system, Church numerals. Lambda-definable functions.
  • Lambda-definability of recursive functions. Uniqueness of normal form. Consistency of beta-conversion theory.
  • The formalism of primitive recursive functions and partial functions.
  • Informal introduction to recursion theory and some fundamental results. 
  • A logic-based computational model: a sketchy introduction to logic programming. 


Codes and representation of numerical information:

  • Codes and two-complements representation of integers.
  • Strings vs Numbers 


Abstract machines.  

  • Abstract machine definition.
  • Implementation of abstract machines; layered organization of computation systems.

Logics:

  • Formal systems. Admissible and derivable rules. Some properties of formal systems. Consistency.
  • Propositional logic definition and main properties. Deduction theorem.
  • Semantics of propositional logics. Soundness and completeness. 
  • Natural deduction for propositional logics-
  • The correspondence proofs as programsLa corrispondenza dimostrazioni-programmi
  • First-order logic: language and semantics.
  • Substitutions, natural deduction, axiomatic system.
  • Statements of fundamental theorems.
  • Arithmetic and group theory formalizations. 
  • Induction-Recursion correspondence: a hint.  

Programming-languages semantics:

  • Structured Operational Semantics

General

  • The work of the computer scientists in a  globalized  world.

Textbook Information

Most of the texts are in electronic format and are downloadable from the following web page

program and texts

Course Planning

 SubjectsText References
1Introduction to the theory of formal languages. Definitions of alphabet, string, language. Regular expressionsLink ai testi
2Sigma* enumeration. Uncountability of languages ​​on a Sigma alphabet. Countability of language recognition programs. Introduction to Chomsky Grammars: Definition, Classes of grammars.Link ai testi
3BNF. What does it mean to compute. Automata. Finite state automata and correspondence with regular languages.Link ai testi
4Decidable and semi-decidable language. Introduction to the Pumping LemmaLink ai testi
5Non-deterministic finite state automata. Pumping Lemma: statement and proof. Induction and its use to prove properties of programs.Link ai testi
6Use of the Pumping Lemma. Some characteristics of context-free languages. Syntactic derivation trees. Existence of languages ​​that cannot be generated from grammars: diagonalization method.Link ai testi
7Introduction to Turing machines. Formal definition of Turing Machine. Example of a Turing machine.Link ai testi
8Complete induction and example of use to prove properties of programs. Transducers. Examples of transducers. Universal Turing Machine.Link ai testi
9Codes. Representation of numerical information. Positional representation and basic conversion algorithms. Fixed and variable length codes. Link ai testi
10Definition of representation of integers in complement to the base. Properties of two's complement representation and their proofs. Introduction to functional programming.Link ai testi
11Intro to functional programming and lambda-calculus Lambda-terms; beta-reduction (informal).Link ai testi
12Free and bound variables; Alpha-conversion; Replacement; Normal forms and their uniqueness; reduction strategies; Introduction to lambda-definable functions;Link ai testi
13Lambda-definability of algorithms that compute functions. Fixed point theorem (statement). Lambda-definability of recursive algorithms. Introduction to formal systems. Example of a formal system: alpha-conversion.Link ai testi
14Formal systems. Main definitions related to formal systems. Example of formal system: Combinatory LogicLink ai testi
15Propositional Logic a la Hilbert. Deduction theorem. Semantics of Propositional Logic. Correctness and completeness theorem (statement),Link ai testi
16Propositional Logic in natural deduction. Correspondence of deductions-programs.Link ai testi
17First order logic: signature, wff, structures, semantics.Link ai testi
18Admissible and derivable rules. Natural deduction for first order logic.Link ai testi
19Correctness and completeness; Non-logical axioms of arithmetic (PA) and groups. Link ai testi
20Some fundamental results of Recursion Theory. Stop problem. Cantor isomorphism. Coding of strings with natural numbers. Definition of abstract machine. Correspondence Abstract machines and languages.Link ai testi
21Realisation of Abstract Machines. Hierarchies of Abstract Machines. Goedel incompleteness theorems, statements.Link ai testi
22Church's theorem. Semi-decision of derivability relation; Sketch of Prolog. Well-founded induction.Link ai testi
23Introduction to the formal semantics of programming languages. Structured Operational Semantics of imperative languages: the WHILE languageLink ai testi
24The work of the computer scientist in the globalized world.Link ai testi

Learning Assessment

Learning Assessment Procedures

The exam consists of a written and an oral part (the latter optional). In the written examination, questions of both a theoretical nature and exercises are proposed. The paper is generally composed of three subparts: the first, divided into three questions (the first usually of a theoretical nature), is based on the first part of the program. Compatibly with the subjective nature of the concept of "difficulty", the three questions are proposed in order of difficulty. Similarly for the second part of the written assignment. The third part instead consists of a single exercise or question which can focus on the first or second part of the program, but in any case on topics not taken into consideration by the two previous parts. A sufficient assessment of the written exam allows the student to accept the grade as conclusive or to access, upon request, the optional oral exam which will contribute to the final assessment. Verification of learning can also be carried out electronically, should conditions require it.

Examples of frequently asked questions and / or exercises

The following web site all the previous written examinations.

scritti passati

Solutions of previous written examinations and many more exercises are present in

esercizi