Algorithms and LAB A - L
Module LAB

Academic Year 2024/2025 - Teacher: SIMONE FARO

Expected Learning Outcomes

Knowledge and understanding: Students will acquire knowledge of the fundamental principles of algorithm performance analysis and key concepts related to computational complexity and algorithmic correctness.

Applying knowledge and understanding: Students will be able to apply analysis techniques to existing algorithms and learn to design algorithmic solutions to elementary problems that adhere to rigorous correctness standards.

Autonomy of judgment: Students will be able to identify situations where one algorithm is preferable to another and evaluate the computational complexity and the correctness of algorithms through formal proofs.

Communication skills: Students will learn to communicate the results of complexity analysis and correctness proofs clearly and effectively through written reports, informal presentations, and technical discussions, employing appropriate terminology adaptable to audiences of varying expertise.

Learning Skills: Students will master the algorithmic thinking acquired in the course and adapt it to new algorithms and computational problems they encounter. They will be capable of independent learning and acquiring new skills in areas such as computational complexity and algorithmic correctness.

Course Structure

Lecture sessions.

Required Prerequisites

Participation in the course requires a good knowledge of the elements of discrete mathematics and calculus and of the concepts introduced in programming courses. 


Additionally, enrollment in the Algorithms course is mandatory.

Attendance of Lessons

For a comprehensive understanding of the course topics and the techniques presented, regular attendance of the lectures is highly recommended.

Detailed Course Content

COURSE OVERVIEW

The course provides a thorough understanding of fundamental techniques for the analysis of computational complexity and methodologies for proving the correctness of computer algorithms.


COURSE TOPICS


Introduction

Tools for algorithm analysis. Analysis of elementary algorithms. Introduction to asymptotic notations.


Recursive Algorithms

Analysis of algorithms using the substitution method and the recursion-tree method. Heapify and Mergesort. Using the master method to solve recurrence equations.


Hashing

Analysis of hash tables: successful and unsuccessful search.


Red-Black Trees

Analysis of the height of a red-black tree. Insertion and deletion operations.


Dynamic Programming

Analysis of dynamic programming. Proof of the optimal substructure property. Example: Longest Common Subsequence.


Basics of Greedy Strategy

Selection of the optimal solution. Proof of the greedy choice for the activity selection problem and the Huffman algorithm case. Proof of the optimal substructure and greedy choice in knapsack and change-making problems.


Elementary Graph Algorithms

Correctness of the Bellman-Ford and Topological Sort algorithms with execution examples. Correctness of the Dijkstra's algorithm with execution examples.

Textbook Information

(*) T.H. Cormen, C.E. Leiserson, R.L. Rivest, C. Stein. Introduction to algorithms (Fourth Edition), The MIT Press, Cambridge - Massachusetts, 2022

disponibile anche nella traduzione italiana 

(1) T.H. Cormen, C.E. Leiserson, R.L. Rivest, C. Stein. Introduzione agli algoritmi e strutture dati 3/ed, McGraw-Hill Italia, 2010.

Course Planning

 SubjectsText References
1Tools for algorithms analysis. The asymptotic notation.chap. 2.2 and 3 of (*)
2Recursive algorithms analysis.chap. 2.3, intro to chap. 4, 4.3, and 4.4 of (*)
3The master method for solving recurrences. Example: Heapify. Analisys of Build-a-Heap. chap. 4.5, 6.2, and  6.3 of (*)
4Hash tables.chap. 11.2 and 11.4 of (*)
5Height of red-black trees. Insertion and deletion.chap. 13.1 of (*)
6Dynamic programming analysis.chap. 14.3-14.3, and 14.5 of (*)
7Elements of Greedy strategy.chap. 15.1 - 15.3 of (*)
8Greedy versus dynamic programming: Knapsack and fractional knapsack. PRoperties of Depth-First Searchchap. 15.2 and 20.3 of (*)
9Bellman-Ford algorithm and Topological Sortchap. 20.4 and 22.1 of (*)
10Dijkstra's Algorithm.chap. 22.3 of (*)
11Exercise classes.

Learning Assessment

Learning Assessment Procedures

The exam test for the Algorithms and Laboratory module is divided into two parts: a first written test (mandatory) and a subsequent oral test (which may be optional for students admitted without reservation). These tests may be held electronically, if conditions require it.
At the end of the written test, the student will receive one of the three following evaluations:
- NOT ADMITTED to the oral test
- ADMITTED WITH RESERVATION to the oral test
- ADMITTED to the oral test
In the latter case, the student will be notified of the grade obtained in the written test, which will be between 18 and 25.
The oral test may take place on the same day as the written test or a few days after it. This test will aim to evaluate in more detail the student's preparation, his/her reasoning ability in relation to the topics covered in class, as well as his/her command of language.
The evaluation of the oral test must be understood as integrating the grade obtained in the written test and not as increasing it.
Students ADMITTED to the oral exam may request to be exempted from taking this exam, thus accepting the grade given to them at the end of the written exam.
Students ADMITTED WITH RESERVATION will not be able to take advantage of the previous option and, if they wish to continue the exam process, they will be required to take the oral exam to conclude the exam of the Algorithms module.
Students NOT ADMITTED to the oral exam will have to repeat the written exam in a subsequent session.
The following criteria will normally be used to assign the final grade:
- not approved: the student has not acquired the basic concepts and is unable to complete the exercises.
- 18-23: the student demonstrates minimal mastery of the basic concepts, his/her skills in exposing and connecting the contents are modest, he/she can solve simple exercises.
- 24-27: the student demonstrates good mastery of the course contents, his/her skills in exposing and connecting the contents are good, he/she solves the exercises with few errors.
- 28-30 cum laude: the student has acquired all the contents of the course and is able to fully present them and connect them with a critical spirit; solves the exercises completely and without errors.
To participate in the exam, it is necessary to have made a reservation on the SmartEdu portal.
Please note that the exam of the Algorithms module and that of the Algorithms Laboratory module will take place at the same time and will therefore be evaluated at the same time.

Examples of frequently asked questions and / or exercises

Students will be able to find examples of frequently asked questions and/or exercises within the exercise system made available by the teacher and reachable at the address: https://www.dmi.unict.it/faro/coding/index.php (registration to the system is required to access the contents).