Algorithms - COMPLESSITÀ (2017/2018)

Course code
Name of lecturer
Ferdinando Cicalese
Number of ECTS credits allocated
Academic sector
Language of instruction
II sem. dal Mar 1, 2018 al Jun 15, 2018.

To show the organization of the course that includes this module, follow this link * Course organization

Lesson timetable

Go to lesson schedule

Learning outcomes

The goal of this module is to introduce students to the main aspects of the computational complexity theory, and, in particular, to the NP-completeness theory and to the computational analysis of problems with respect to their approximability. Within the overall objectives of the CdS, this course allows students to widen and specialise their expertise in the analysis of algorithms and computational systems. It provides some advanced analysis tools to cope with non-trivial tasks.

The students will acquire skills and knowledge to understand and cope with the computational difficulty in solving some common task. Students will be able to independently analyze a new problem, understand its structure and what makes it difficult and propose possible alternative approach to its solution (approximation, parametrisation) in the absence of provably efficient solutions.


Computational models, computational resources, efficient algorithms and tractable problems.

Relationships among computational problems. Polynomial reductions of one problem into another. The classes P, NP, co-NP. Notion of completeness. Proofs od NP-completeness: Cook's theorem; proofs of completeness using appropriate reductions. Search and Decision Problems. Self-Reducibility of NP-complete problems and existence of non-selfreducible problems. Recap of basic notions of computability: Turing Machines and Diagonalization. Hierarchy theorems for time complexity classes. Separability of classes and the existence of intermediate problem under the hypothesis the P is not equal NP.

Space Complexity. Models and fundamental difference between the use of time resource and the space resource. The space complexity classes NL and L and their relationship with the time complexity class P. The centrality of the reachability problem for the study of space complexity. Completeness for space complexity classes: Log-space reductions; NL-completeness of reachability. Non-determinism and space complexity. Savitch theorem and Immelmann-Szelepcsenyi theorem. The classes PSPACE and NPSPACE. Examples of reductions to prove PSPACE-completeness.

Introduction to the approximation algorithms for optimisation problems. Examples of approximation algorithms. Classification of problems with respect to their approximabuility. The classes APX, PTAS, FPTAS. Notion of inapproximability; the gap technique to prove inapproximability results; examples of approximation preserving reductions. Examples of simple randomised algorithms in solving hard problems.

Recommended Prerequisites
To attend the course in a productive way, a student should be confident with the following topics:
1. Basic data structures as list, stack, queue, tree, heap.
2. Graph representation and fundamental graph algorithms:
2.1 Graph visit: BFS, DFS.
2.2 Topological ordering. Connected component.
2.3 Minimal spanning tree. Kruskal and Prim algorithm.
2.4 Single-source shortest path: Dijkstra algorithm and Bellman-Ford one.
2.5 All-pairs shortest path: Floyd-Warshall algorithm and Johnson one.
2.6 Max flow: Ford-Fulkerson algorithm.

A recommended book to revise the above topics is ``Introduction to Algorithms" di T. H. Cormen, C. E. Leiserson, R. L. Rivest e C. Stein (3 ed.).

Reference books
Author Title Publisher Year ISBN Note
J. Kleinberg, É. Tardos Algorithm Design (Edizione 1) Addison Wesley 2006 978-0321295354
Ingo Wegener Complexity Theory Springer 2005
Christos H. Papadimitriou Computational complexity Addison Wesley 1994 0201530821
S. Arora, B. Barak Computational Complexity. A modern approach (Edizione 1) Cambridge University Press 2009 9780521424264
Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, Clifford Stein Introduction to Algorithms (Edizione 3) MIT Press 2009 978-0-262-53305-8
Michael Sipser Introduction to the Theory of Computation PWS 1997 053494728X
Cristopher Moore, Stephan Mertens The Nature of Computation Oxford 2011

Assessment methods and criteria

The exam verifies that the students have acquired sufficient understanding of the basic complexity classes and the necessary skills to analyse and classify a computational problem.

The exam consists of a written test with open questions. The test includes some mandatory exercises and a set of exercises among which the student can choose what to work on. The mandatory exercises are meant to evaluate the ability of the student to apply knowledge: reproducing (simple variants of) theoretical results and algorithms seen in class for classical problems. "Free-choice" exercises test the analytical skills acquired by the students to model "new" toy problems and analyse its computational complexity using reductions.

The grade for the module "complexity" is averaged (50%) with the grade for the module algorithm to determine the final grade.