Computer Science

A.Y. 2026/2027
6
Max ECTS
60
Overall hours
SSD
INFO-01/A
Language
Italian
Learning objectives
The course aims at introducing basics of Computer Science, with a particular emphasis on Programming. Basic concepts on the digital
representation of information and on computer architetture are outlined. The notions of algorithm and program are presented, as long
as main tools involved in software design. Structured programming and the imperative paradigm are settled, focusing on modular
software design. Some relevant data strutture and algorithms are presente, addressing the evaluation of algorithmic time complexity.
Expected learning outcomes
The student will be able to:
1) Approach problems typically dealing with data analysis, and conceptually design solution algorithms.
2) Code modular algorithms by choosing appropriate data structure and constructions offered by the selected programming language.
3) Manage an operating system to code, compile, link and execute programs.
Single course

This course cannot be attended as a single course. Please check our list of single courses to find the ones available for enrolment.

Course syllabus and organization

Group 1

Responsible
Lesson period
First semester
Course syllabus
Theory Lectures Syllabus
- What Computer Science is: physical and theoretical means for information processing
- The notion of algorithm, examples: Euclid's algorithm, simple arithmetical algorithms
- From algorithms to programs: executors and programming languages
- The information and its numerical representation (texts, sound, images), digital information
- Number systems in different bases, octal, hexadecimal and binary (digital) bases
- Binary representation of numbers
- Negative numbers representation: signed and two's complement
- Floating point representation of rationals, mantissa, exponent, roundoff errors
- Measuring information: bit, byte, multiples
- Computer architecture, Von Neumann's machine
- CPU, RAM, BUS, peripherals, main features and functions
- Machine language and assembly, low-level programming, drawbacks
- High-level programming, languages and compilers
- Software Lifecycle: design, compiling, linking, loading, running
- Possible errors and debugging
- Structured programming and Boehm-Jacopini's Theorem. Control structures
- Forms of selection, examples
- Variables, types and operations
- Forms of iterations, examples: managing data streams and testing arithmetical properties
- The first C++ program. cout output stream
- C++ types, main features and operations. int, float, char, bool
- Variable declaration, variable setting by expressions and input operations. cin stream
- string type. C-strings, structure, use and main operations
- Control structures in C++. Selection, variants, nested if
- bool type for conditions, main features and boolean operators. The conditional operator
- Iteration in C++, variants. for loop. break statement
- Monodimensional arrays in C++. Main features and operations on arrays
- Arrays and memory allocation, array starting address. Bidimensional arrays, examples
- The notion of a struct
- File handling in C++. Main features of fstream library. Opening, using and closing file streams
- Output manipulation, iomanip library
- Dynamic arrays, features, definition and usage. Data loading from files to dynamic arrays
- Functions in C++. Top-down program design. Structure of functions returning values and void
- Argument passing, by value and reference, meaning. Software modularization and signatures
- Memory managing, activation record, stack, heap, stack overflow
- C++ recursive functions, inductive definition of functions and their implementation by recursion
- Stack dynamics along recursion. Iteration vs. recursion performance
- Introduction to worst-case time complexity of algorithms
- Searching arrays. Linear and binary search, implementations and time complexity analysis
- Sorting, time lower boundz. Selection sort, implementation and quadratic time complexity
- Mergesort, design and implementation
- Time complexity evaluation of mergesort by recurrence equation, optimal time
- Pointers, meaning, definition and usage. Pointing struct and objects
- Dynamic variables and pointers, dynamic arrays, new statement. Memory leak and delete statement
- Pointers operations, pointers arithmetics. Using pointers for array scanning, shallow and deep array copy
- Traditional arrays and constant pointers, differences with dynamic arrays. Functions returning arrays, arrays setting on stack and heap
- main arguments, line command arguments. Implementing simple commands in operating systems

Lab Lectures Syllabus
- Operating systems, Linux and the file system
- Using the Linux shell, main commands
- Programming environments, editor, compilers
- First C++ programs
- Selection and iteration in C++
- Array and struct
- Functions in C++ and argument passing
- Design of library of functions. Library implementation, file header
- Object files creation e their linking
- make command and structure of a makefile
- Using files in C++
- Software design for data analysis and their presentation
Prerequisites for admission
None.
Teaching methods
The course consists of traditional theory lectures and lab lectures:

- Traditional theory lectures present basics of programming and algorithm design. A programming language is introduced, explaining syntax, semantics and reviewing programming techniques and relevant algorithms. During these lectures, exercises and problems are proposed and discussed, encouraging cooperation and team work, and discussing different proposed solutions.

- Lab lectures first of all aims at presenting basic features of an operating systems as well as typical programming tools (editors, compilers, ...). During these lectures, programming exercises and projects of increasing complexity are proposed. Actual software implementations of such projects are discussed and made available on the course website.
Teaching Resources
Textbooks:
- D.S. Malik: Introduction to C++ Programming. Cengage South-Western, 2009.
- L.J. Aguilar: Fondamenti di programmazione in C++. Algoritmi, strutture dati e oggetti. McGraw-Hill, 2008.

Websites:
- course website on myAriel university platform
Assessment methods and Criteria
The exam consists of a written exam plus a lab exam:

- In the written exam, some programming exercises are proposed, particularly aiming at checking the knowledge of the theoretical bases of programming and the ability of designing simple algorithms. The time allowed for the written exam is two hours, during which students are not enabled to consult any reference. In the evaluation of this written exam, rating from 1 to 30, both the ability of conceptually projecting algorithms and the correctness of the formal specification of such algorithms in the chosen programming language is taken under consideration.

- In the lab exam, a data analysis project of a certain complexity is proposed, for which the production of working and well structured software is required. The time allowed for the lab exam is about three hours, during which students are enabled to use their software developed during lab lectures. In the evaluation of this lab exam, rating from 1 to 30, the ability of projecting algorithms as well as producing modular, well structured and maintainable code is taken under consideration.

The final evaluation, rating from 1 to 30, earned by the student for this course originates by suitably averaging the evaluation of both the written and the lab exam. An evaluation between 18 and 23 indicates an appropriate level of knowledge of theoretical and practical basics of computer science and programming, an evaluation between 24 and 27 indicates a good knowledge of such basics, higher evaluations indicate a very good knowledge and originality in applying basics in computer science and programming.
INFO-01/A - Informatics - University credits: 6
Laboratories: 36 hours
Lessons: 24 hours
Professor: Mereghetti Carlo

Group 2

Responsible
Lesson period
First semester
INFO-01/A - Informatics - University credits: 6
Laboratories: 36 hours
Lessons: 24 hours
Professor: Tamascelli Dario

Group 3

Responsible
Lesson period
First semester
Course syllabus
Theory Lectures Syllabus
- What Computer Science is: physical and theoretical means for information processing
- The notion of algorithm, examples: Euclid's algorithm, simple arithmetical algorithms
- From algorithms to programs: executors and programming languages
- The information and its numerical representation (texts, sound, images), digital information
- Number systems in different bases, octal, hexadecimal and binary (digital) bases
- Binary representation of numbers
- Negative numbers representation: signed and two's complement
- Floating point representation of rationals, mantissa, exponent, roundoff errors
- Measuring information: bit, byte, multiples
- Computer architecture, Von Neumann's machine
- CPU, RAM, BUS, peripherals, main features and functions
- Machine language and assembly, low-level programming, drawbacks
- High-level programming, languages and compilers
- Software Lifecycle: design, compiling, linking, loading, running
- Possible errors and debugging
- Structured programming and Boehm-Jacopini's Theorem. Control structures
- Forms of selection, examples
- Variables, types and operations
- Forms of iterations, examples: managing data streams and testing arithmetical properties
- The first C++ program. cout output stream
- C++ types, main features and operations. int, float, char, bool
- Variable declaration, variable setting by expressions and input operations. cin stream
- string type. C-strings, structure, use and main operations
- Control structures in C++. Selection, variants, nested if
- bool type for conditions, main features and boolean operators. The conditional operator
- Iteration in C++, variants. for loop. break statement
- Monodimensional arrays in C++. Main features and operations on arrays
- Arrays and memory allocation, array starting address. Bidimensional arrays, examples
- The notion of a struct
- File handling in C++. Main features of fstream library. Opening, using and closing file streams
- Output manipulation, iomanip library
- Dynamic arrays, features, definition and usage. Data loading from files to dynamic arrays
- Functions in C++. Top-down program design. Structure of functions returning values and void
- Argument passing, by value and reference, meaning. Software modularization and signatures
- Memory managing, activation record, stack, heap, stack overflow
- C++ recursive functions, inductive definition of functions and their implementation by recursion
- Stack dynamics along recursion. Iteration vs. recursion performance
- Introduction to worst-case time complexity of algorithms
- Searching arrays. Linear and binary search, implementations and time complexity analysis
- Sorting, time lower boundz. Selection sort, implementation and quadratic time complexity
- Mergesort, design and implementation
- Time complexity evaluation of mergesort by recurrence equation, optimal time
- Pointers, meaning, definition and usage. Pointing struct and objects
- Dynamic variables and pointers, dynamic arrays, new statement. Memory leak and delete statement
- Pointers operations, pointers arithmetics. Using pointers for array scanning, shallow and deep array copy
- Traditional arrays and constant pointers, differences with dynamic arrays. Functions returning arrays, arrays setting on stack and heap
- main arguments, line command arguments. Implementing simple commands in operating systems

Lab Lectures Syllabus
- Operating systems, Linux and the file system
- Using the Linux shell, main commands
- Programming environments, editor, compilers
- First C++ programs
- Selection and iteration in C++
- Array and struct
- Functions in C++ and argument passing
- Design of library of functions. Library implementation, file header
- Object files creation e their linking
- make command and structure of a makefile
- Using files in C++
Prerequisites for admission
No particular prerequisite required.
Teaching methods
Lectures: frontal lectures.
Laboratory: lectures in the computational laboratory.
Teaching Resources
Textbooks:
- D.S. Malik: Programmazione in C++. Apogeo, 2013.
- L.J. Aguilar: Fondamenti di programmazione in C++. Algoritmi, strutture dati e oggetti. McGraw-Hill, 2008.

Websites:
- Ariel: https://myariel.unimi.it/
Assessment methods and Criteria
The exam consists of a written exam plus a lab exam:

- In the written exam, some programming exercises are proposed, particularly aiming at checking the knowledge of the theoretical bases of programming and the ability of designing simple algorithms. The time allowed for the written exam is two hours, during which students are not enabled to consult any reference. In the evaluation of this written exam, rating from 1 to 30, both the ability of conceptually projecting algorithms and the correctness of the formal specification of such algorithms in the chosen programming language is taken under consideration.

- In the lab exam, a data analysis project of a certain complexity is proposed, for which the production of working and well structured software is required. The time allowed for the lab exam is about three hours, during which students are enabled to use their software developed during lab lectures. In the evaluation of this lab exam, rating from 1 to 30, the ability of projecting algorithms as well as producing modular, well structured and maintainable code is taken under consideration.

The final evaluation, rating from 1 to 30, earned by the student for this course originates by suitably averaging the evaluation of both the written and the lab exam.
INFO-01/A - Informatics - University credits: 6
Laboratories: 36 hours
Lessons: 24 hours
Professor: Carrazza Stefano
Professor(s)
Reception:
On appointment, via email
Room S 6008, VI floor, Dip. Informatica "Giovanni Degli Antoni", via Celoria 18, 20133 Milano, Italy
Reception:
Tuesday, 9am-10am or by appointment (ask via e-mail)
Room C12, 5th floor LITA Building, Physics Department, via Celoria 16.