- Teacher: Rossano Venturini
- CFU: 9
- Period: Second semester
- Language: English
- Telegram: here
- Teams: here
- Lectures schedule: Tuesday 9:00-11:00 (Aula Fib C), Wednesday 11:00-13:00 (Aula Fib E), and Friday 9:00-11:00 (Aula Fib C).
- Question time: After lectures or by appointment
The course introduces basic data structures and algorithmic techniques that allow students to solve computational problems on the most important data types, such as sequences, sets, trees, and graphs.
An intensive laboratory activity will complement the lectures. Students will experiment with algorithms and data structures by writing their own implementations or by using third-party libraries.
The class's goal is to enable students to design and implement efficient algorithms, choosing the most appropriate solutions for their future projects.
-
Introduction and basic definitions: algorithm, problem, instance.
-
Computational complexity analysis of algorithms.
-
Sorting: Mergesort, Quicksort, and Heapsort.
-
Searching: Binary Search, Binary Search Tree, Trie, and Hashing.
-
Algorithms on Trees: representation and traversals.
-
Algorithms on Graphs: representation, traversals, and the most important problems.
-
External memory model: sorting and searching.
Type | Date | Room | Note |
---|---|---|---|
Lab | 04/06/2025 14:00 | Google Meet | Please send your solutions to me by 01/06/2025. Important: Please Cut&Paste your solutions to this Jupyter Notebook and send me just this file with your name and surname on its filename. Please read the very important note below. |
Theory | 10/06/2025 9:30 | Room C | |
Lab | 25/06/2025 14:00 | Google Meet | Please send your solutions to me by 21/06/2025. Important: Please Cut&Paste your solutions to this Jupyter Notebook and send me just this file with your name and surname on its filename. Please read the very important note below. |
Theory | 02/07/2025 9:30 | Room C | |
Lab | 17/07/2025 14:00 | Google Meet | Please send your solutions to me by 14/07/2025. Important: Please Cut&Paste your solutions to this Jupyter Notebook and send me just this file with your name and surname on its filename. Please read the very important note below. |
Theory | 24/07/2025 11:00 | Room C |
Very important! You are allowed to verbally discuss solutions (e.g., a strategy to solve a problem) with other students, BUT you have to implement all the solutions yourself. Thus, sharing implementations or implementing a solution with others is strictly forbidden.
- Introduction to Algorithms, 3rd Edition, Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, Clifford Stein, The MIT Press, 2009 (Amazon) [CCLR]
- Algorithms, 4th Edition, Robert Sedgewick, Kevin Wayne, Addison-Wesley Professional, 2011 (Amazon) [RS]
- Algorithms, Sanjoy Dasgupta, Christos Papadimitriou, Umesh Vazirani, McGraw-Hill, 2006. (Amazon) [DPZ]
Date | Lecture | References | Material |
---|---|---|---|
19/02/2025 | Introduction to analysis of algorithms. | CCLR Sect. 2.1 | Notes next 3 lectures |
21/02/2025 | Insertion Sort: Correctness and analysis. | CCLR Sect. 2.2 | VisuAlgo Sorting |
25/02/2025 | Insertion Sort: Correctness and analysis. | CCLR Sect. 2.2 | VisuAlgo Sorting |
26/02/2025 | Selection Sort: Correctness and analysis. | Selection Sort vs Insertion Sort and VisuAlgo Sorting | |
28/02/2025 | Laboratory: Basic sorting algorithms | Jupyter Notebook Mandatory exercises | |
04/03/2025 | Divide and Conquer. Merge Sort. | CCLR Sect. 2.3 | VisuAlgo Sorting and Notes next 3 lectures |
05/03/2025 | Binary search. QuickSort. Best and worst cases. No average time analysis. | CCLR Sect 3.1. CCLR Sects 7.1, 7.2, and 7.3. | VisuAlgo Sorting and Notes next 2 lectures |
07/03/2025 | Laboratory: MergeSort and QuickSort. | Jupyter Notebook Mandatory exercises | |
11/03/2025 | QuickSort. Best and worst cases. No average time analysis. Asymptotic notation. | CCLR Sects 7.1, 7.2, and 7.3. | VisuAlgo Sorting and Notes next 2 lectures |
12/03/2025 | Lower Bound for sorting in the comparison model. | CCLR Sect. 8.1 | Notes |
14/03/2025 | Laboratory: Applications of sorting (I). | Jupyter Notebook Mandatory exercises | |
18/03/2025 | Sorting in linear time: Counting Sort and Radix Sort. | CCLR Sect. 8.2 adn 8.3 | VisuAlgo Sorting. Notes |
19/03/2025 | Dictionary problem with Hashing. | CCLR Sect. 11.1, 11.2, and 11.4 (no analysis) | Notes |
25/03/2025 | Dictionary problem with Hashing. | CCLR Sect. 11.1, 11.2, and 11.4 (no analysis) | |
26/03/2025 | Laboratory: Hashing. | Jupyter Notebook Mandatory exercises | |
28/03/2025 | Python best practices. | ||
01/04/2025 | Python best practices. | ||
02/04/2025 | Python best practices. | ||
04/04/2025 | Python best practices. | ||
11/04/2025 | Python best practices. | ||
15/04/2025 | QuickSelect. Priority queues: Heap. | CCLR Sect. 9.1, 9.2 and CCLR Ch. 6 | Notes next 3 lectures |
16/04/2025 | Priority queues: Heap. | CCLR Ch. 6 | VisuAlgo Heap |
23/04/2025 | Priority queues: Heap. | CCLR Ch. 6 | VisuAlgo Heap |
29/04/2025 | Binary Search tree. | CCLR Sect. 12.1, 12.2, and 12.3 | Visualgo BST |
30/04/2025 | Binary Search tree. | CCLR Sect. 12.1, 12.2, and 12.3 | Visualgo BST |
02/05/2025 | Laboratory: Hashing: Applications. | Jupyter Notebook Mandatory exercises | |
06/05/2025 | Binary Search tree. | CCLR Sect. 12.1, 12.2, and 12.3 | Visualgo BST |
07/05/2025 | Binary Search tree. | CCLR Sect. 12.1, 12.2, and 12.3 | Visualgo BST |
09/05/2025 | Laboratory: Applications of sorting (II). | Jupyter Notebook Mandatory exercises | |
13/04/2025 | Exercises: Visits of a tree. | Notes next 2 lectures | |
14/05/2025 | Exercises: Visits of a tree. | ||
16/05/2025 | Laboratory: Binary Search Tree. | Jupyter Notebook Mandatory exercises | |
20/05/2025 | Graphs: representations and BFS. | CCLR Sect. 22.1 and 22.2 (no proofs) | Notes next 2 lectures |
22/05/2025 | Graphs: DFS. | CCLR Sect. 22.3 (no proofs) | Graph representations and BFS/DFS |
23/05/2025 | Exercises | Notes | |
27/05/2025 | Exercises | Notes | |
28/05/2025 | Laboratory: Graphs. | Jupyter Notebook Mandatory exercises |