FOUNDATIONS OF COMPUTER SCIENCE A - E
Academic Year 2024/2025 - Teacher: Franco BARBANERAExpected 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
Attendance of Lessons
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
Course Planning
Subjects | Text References | |
---|---|---|
1 | Introduction to the theory of formal languages. Definitions of alphabet, string, language. Regular expressions | Link ai testi |
2 | Sigma* enumeration. Uncountability of languages on a Sigma alphabet. Countability of language recognition programs. Introduction to Chomsky Grammars: Definition, Classes of grammars. | Link ai testi |
3 | BNF. What does it mean to compute. Automata. Finite state automata and correspondence with regular languages. | Link ai testi |
4 | Decidable and semi-decidable language. Introduction to the Pumping Lemma | Link ai testi |
5 | Non-deterministic finite state automata. Pumping Lemma: statement and proof. Induction and its use to prove properties of programs. | Link ai testi |
6 | Use 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 |
7 | Introduction to Turing machines. Formal definition of Turing Machine. Example of a Turing machine. | Link ai testi |
8 | Complete induction and example of use to prove properties of programs. Transducers. Examples of transducers. Universal Turing Machine. | Link ai testi |
9 | Codes. Representation of numerical information. Positional representation and basic conversion algorithms. Fixed and variable length codes. | Link ai testi |
10 | Definition 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 |
11 | Intro to functional programming and lambda-calculus Lambda-terms; beta-reduction (informal). | Link ai testi |
12 | Free and bound variables; Alpha-conversion; Replacement; Normal forms and their uniqueness; reduction strategies; Introduction to lambda-definable functions; | Link ai testi |
13 | Lambda-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 |
14 | Formal systems. Main definitions related to formal systems. Example of formal system: Combinatory Logic | Link ai testi |
15 | Propositional Logic a la Hilbert. Deduction theorem. Semantics of Propositional Logic. Correctness and completeness theorem (statement), | Link ai testi |
16 | Propositional Logic in natural deduction. Correspondence of deductions-programs. | Link ai testi |
17 | First order logic: signature, wff, structures, semantics. | Link ai testi |
18 | Admissible and derivable rules. Natural deduction for first order logic. | Link ai testi |
19 | Correctness and completeness; Non-logical axioms of arithmetic (PA) and groups. | Link ai testi |
20 | Some 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 |
21 | Realisation of Abstract Machines. Hierarchies of Abstract Machines. Goedel incompleteness theorems, statements. | Link ai testi |
22 | Church's theorem. Semi-decision of derivability relation; Sketch of Prolog. Well-founded induction. | Link ai testi |
23 | Introduction to the formal semantics of programming languages. Structured Operational Semantics of imperative languages: the WHILE language | Link ai testi |
24 | The 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.
The test is structured so that each student is given a grade according to the following scheme:Not approved: the student has not acquired the basic concepts and is not able to answer at least 60% of the questions or carry out the exercises.
18-23: the student demonstrates minimal mastery of the basic concepts, his content connection skills are modest, he is able to solve simple exercises.
24-27: the student demonstrates good mastery of the course contents, his skills in connecting the contents are good, he solves the exercises with few errors.
28-30 cum laude: the student has acquired all the contents of the course and is able to master them completely and connect them with a critical spirit; solves the exercises completely and without errors.
Students with disabilities and/or DSA must contact the teacher, the CInAP contact person of the DMI (Prof. Daniele) and the CInAP
sufficiently in advance of the exam date to communicate that they intend to take the exam taking advantage of the appropriate compensatory measures.
Examples of frequently asked questions and / or exercises
The following web site all the previous written examinations.
Solutions of previous written examinations and many more exercises are present in